Shutdown and Restart

This section provides an example of the order to follow when shutting down and restarting a sample Horizon system: Horizon core layer, persistence and messaging layer, and database layer.

process

Note that restarting the whole stack is rare. Usually, restarting the Horizon core happens for reconfiguration or to run upgrades. A core restart takes between 2–5 minutes depending on memory configuration. Minion and Sentinel restart faster.

Keep in mind that when shutting down the Horizon core, there will be no notifications, alarms, outage detection, performance data collection, thresholding, or flows. After restarting there will be gaps in your performance graphs for the shutdown time.

Restarting components in the persistence and messaging layer normally happens only for upgrades or catastrophic failures. Exercise caution with restarting components in this layer, since there is the risk of data loss.

The steps below are illustrative for a sample Linux setup. Your Horizon may be different. Documenting procedures for each setup is beyond the scope of this document. You must be root to run the commands listed below.

Shutdown

Shutdown components in the following order:

  1. Dashboard applications such as Grafana and Kibana.

    systemctl stop grafana-server
    systemctl stop kibana
  2. Horizon Core application (Core, Sentinel, Minion), in any order.

    1. Turn off notifications first.

      1. Login to the Horizon UI.

      2. In the top right corner choose User name→Configure OpenNMS:

        login 200
      3. Under Event Management, turn off Notification Status and click Update.

      status
    2. Access the Horizon system via CLI (putty, SecureCRT, etc.).

    3. Become a root user via the following command: sudo su -

    4. Type the following commands:

    systemctl stop opennms
    systemctl stop minion
    systemctl stop sentinel
  3. Persistence and messaging components such as PostgreSQL, Cassandra, Kafka, etc., in any order:

systemctl stop postgresql-12
systemctl stop cassandra
systemctl stop elasticsearch
Neither Kafka nor Zookeeper have systemd definitions. The way to control the processes depends on how they were installed, and is beyond the scope of this documentation.

Restart

Restart components in the following order:

  1. Persistence and messaging components such as PostgreSQL, Cassandra, Kafka, etc., in any order:

    systemctl start postgresql-12
    systemctl start cassandra
    systemctl start elasticsearch
  2. Horizon Core application second, in any order.

    systemctl start opennms
    systemctl start minion
    systemctl start sentinel
    1. In the UI, turn the Notification Status to On and click Update.

  3. Dashboard applications like Grafana and Kibana last so they function properly.

systemctl start grafana-server
systemctl start kibana
You can restart dashboard applications at any time, but they will not show any useful information until all components in the persistence and Horizon layers have started.