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, know how to deal with the compatibility mode of Internet Explorer when browsing the Portal. Lastly, 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 freezes 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.

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: <config> <mode>static_time</mode> </engine> </config>

  3. Restart the Engine: sudo systemctl restart nxengine@1

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: :wq

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. Optional: If the Portal has no configuration file yet, that is, if portal.conf does not exist in folder /var/nexthink/portal/conf, create it by copying the defaults from the sample configuration file: sudo -u nxportal cp /var/nexthink/portal/conf/portal.conf.sample \ /var/nexthink/portal/conf/portal.conf

  3. Edit the configuration file of the Portal: sudo vi /var/nexthink/portal/conf/portal.conf

  4. Add the following lines, where EngineTime is the frozen time in the Engine that you noted down previously: # Demo mode globalconfig.portal.special.demo = true globalconfig.portal.special.static.time = "EngineTime"

  5. Save your changes and quit the editor: :wq

  6. Restart the Portal: sudo systemctl restart nxportal

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):

time \

<config> <engine> <tweak> <static_now>time</static_now> </tweak> </engine> </config>

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 Customer Success 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 number of devices is not enforced by the license.

  • 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, please contact Nexthink Support.

Dealing with compatibility mode of IE in the Portal

The Portal is usually best displayed with the latest rendering capabilities of modern browsers. When working with Internet Explorer, though, you or your organization may have set the browser to compatibility mode because of some legacy web applications which are key to your business and are best rendered in older versions of IE.

Even with compatibility mode on, web sites can still indicate Internet Explorer to use its latest rendering engine instead. To that end, they use a particular HTTP header when serving web pages. To make the Portal work in this mode, so it tells Internet Explorer to use its most recent render version:

  1. Log in to the CLI of the appliance hosting the Portal.

  2. Optional: If the Portal has no configuration file yet, that is, if portal.conf does not exist in folder /var/nexthink/portal/conf, create it by copying the defaults from the sample configuration file: sudo -u nxportal cp /var/nexthink/portal/conf/portal.conf.sample \ /var/nexthink/portal/conf/portal.conf

  3. Edit the configuration file of the Portal: sudo vi /var/nexthink/portal/conf/portal.conf

  4. Add the following line,: globalconfig.portal.http.compatibility-mode = true

  5. Save your changes and quit the editor: :wq

  6. Restart the Portal: sudo systemctl restart nxportal

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 \ web_monitoring_accept_proxy_extended_status_codes=true

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.


RELATED TASKS

Last updated