Special operation modes for the Engine and the Portal


Special operation modes for the Engine and the Portal

When operating normally, the Engine receives and processes all information coming from the Collectors and sends data to the Portal over time. For demo purposes or other special reasons, you may want to alter the normal functioning of the Engine and the Portal. In this chapter, learn how to freeze the time in the Engine and in the Portal (demo mode) or how to make the Engine store device information only and filter all other events (zero config mode).

In addition, if you have the Web and Cloud module activated, learn how to configure the Engine for recording HTTP connections with extended status codes from a proxy.

Setting up demo mode

While working with the Portal, imagine that you detect an interesting occurence in your network, such as a high rate of failures in a service at a particular time of the day. You may want to share your findings with other people in your team our with management. Ideally, you would like to replay the same situation at a later time to analyze what happened at that point in time with the help of all Nexthink products. To that end, you can back up the databases of the Engine and the Portal and restore them later in other instances in demo mode.

Demo mode consists in freezing the time of the Engine and the Portal, so they do not evolve with the passing of time. Therefore, you consistently find the same data that was present when you made the backup in both the Engine and the Portal. To prevent data loss in your production environment, you must not use the production Engine and Portal to play your demos, but dedicated instances of the Engine and the Portal that you have installed elsewhere; for instance, a virtual machine in your personal desktop.

When running in demo mode, the Engine does not require any kind of license and it has all features enabled. You can connect to it with the Finder and perform all kind of investigations as you would do on a normally operating Engine. On the other hand, an Engine in demo mode does not process any packet coming from the Collector nor performs any kind of activity: it does not create new events in the database, it does not notify new alerts, it does not send or retrieve information from the application library, etc.

To set up the demo mode in the Engine:

  1. Log in to the CLI of the appliance that hosts the demo Engine.
  2. Edit the configuration file of the Engine that is found in /var/nexthink/engine/01/etc/nxengine.xml and set the mode tag to static_time:
  3. Restart the Engine:
    nxinfo launch --restart

The keyword static_time forces the Engine to freeze its internal date and time to the moment right after the end of the last event included in its database. Since the time is frozen, the Engine no longer sends real-time service information to the Portal. For the Portal to work in sync with your demo Engine, the time set in the Portal must match the time in the Engine and the Portal must receive real-time services data from the Engine.

To get the time settings from the Engine and send the data of real-time services to the Portal, take these additional steps in the Engine appliance:

  1. Call the function now in the Engine and note down the result. The function gives you the frozen time:
    nxinfo shell -e "call now()"
  2. Schedule a cron job to send real-time service data to the Portal every 10 minutes:
    1. Execute in the CLI of the Engine:
      sudo crontab -e
    2. In the vi text editor that opens, type in the following line:
      */10 * * * * /usr/bin/nxinfo lua --command "monitor:send_data_to_portal()"
    3. Save your changes and quit the editor with the command

After Engine configuration, set the demo mode in the Portal:

  1. Log in to the CLI of the appliance that hosts the demo Portal.
  2. Edit the configuration time of the Portal that is found in /etc/nxt-tomcat.conf and set the following line, where EngineTime is the frozen time in the Engine that you noted down previously:
    JAVA_OPTS="-DPORTAL_STATIC_NOW=<EngineTime> -DPORTAL_MODE=demo -Xmx768m"
  3. Restart the Portal:
    sudo service nxportal restart

Now you have your Engine and Portal ready in demo mode. You may have to wait up to ten minutes for real-time services to receive data from the Engine though.

Stopping the time in the Engine

With the static_time option, the Engine selects the optimal point in time to freeze the time in the Engine for a demo. This time corresponds to the instant right after the occurrence of the last event recorded in the database of the Engine. In the case that you want to freeze the time of the Engine to a different point in time, you can do it by setting the following option in the configuration file of the Engine (/var/nexthink/engine/01/etc/nxengine.xml):


Where time is in the format YYYY-MM-DDTHH:MM:SS (e.g. 2014-01-01T18:00:00).

This option should be used with care because it can leave events that were originally in the database out of the time range of the Engine or make them too old. Use preferably the static_time option for your demos unless you have a very specific requirement.

Storing only device information in the Engine

This mode of operation can be used to deploy a large number of Collectors in a setup with several Engines. The deployment is done in two phases. During the first phase, all Collectors send information to one special Engine that is configured to store device information only. Then, in the second phase, Collectors are classified and definitively configured to send data to a normally operating Engine. For the details on the procedure, please contact Nexthink Professional Services.

This special mode of operation of the Engine is known as zero config mode. An Engine in zero config mode shows the following properties:

  • The Engine processes and stores only device information coming from the Collectors, namely, the MAC address, IP address and SID of the devices. All activities and information related to other objects are discarded.
  • Devices are created with a special storage policy called inventory. A device with this storage policy is never removed from the database in spite of having no events associated.
  • The Engine does not require a license to run and it accepts an unlimited number of devices.
  • The Engine rejects any connection from the Portal.
  • The communication of the Engine with the application library is disabled.

To set up zero config mode, add the following option to the configuration file of the Engine (/var/nexthink/engine/01/etc/nxengine.xml):


Recording web requests with extended connection status codes

During normal operation, the Engine ignores web requests with connection status codes between 300 and 499 by default. These extended status codes may be issued by proxies when establishing a secure connection with a server on a client request.

Starting from Engine 5.2.8, you can tell the Engine to record these connections by logging in to the CLI and typing the following command:

  • sudo nxinfo config --set \

Restart the Engine for the new configuration to take effect and beware that acknowledging this kind of connections may significantly increase the number of recorded web request events and, therefore, decrease your time interval for data retention.

The operations described in this article should only be performed by a Nexthink Engineer or a Nexthink Certified Partner.

If you need help or assistance, please contact your Nexthink Certified Partner.