User Guide Functional Overview Requirements Architecture System Installation NetEye Additional Components Installation Setup The neteye Command Director NetEye Self Monitoring Tornado Business Service Monitoring IT Operation Analytics - Telemetry Geo Maps NagVis Audit Log Shutdown Manager Reporting ntopng Visual Monitoring with Alyvix Elastic Stack IT Operations (Command Orchestrator) Asset Management Service Level Management Cyber Threat Intelligence - SATAYO NetEye Update & Upgrade How To NetEye Extension Packs Troubleshooting Security Policy Glossary
module icon Shutdown Manager
Overview Shutdown Manager user Shutdown Manager GUI Shutdown Commands Advanced Topics
Director NetEye Self Monitoring Tornado Business Service Monitoring IT Operation Analytics - Telemetry Geo Maps NagVis Audit Log Shutdown Manager Reporting Introduction to NetEye Monitoring Business Service Monitoring IT Operation Analytics Visualization Network Visibility Log Management & Security Orchestrated Datacenter Shutdown Application Performance Monitoring User Experience Service Management Service Level Management & Reporting Requirements for a Node Cluster Requirements and Best Practices NetEye Satellite Requirements TCP and UDP Ports Requirements Additional Software Installation Introduction Single Node Cluster NetEye Master Master-Satellite Architecture Underlying Operating System Acquiring NetEye ISO Image Installing ISO Image Single Nodes and Satellites Cluster Nodes Configuration of Tenants Satellite Nodes Only Nodes behind a Proxy Additional NetEye Components Single Node Cluster Node Satellites Nodes only Verify if a module is running correctly Accessing the New Module Cluster Satellite Security Identity and Access Management External Identity Providers Configure federated LDAP/AD Emergency Reset of Keycloak Configuration Advanced Configuration Authorization Resources Tuning Advanced Topics Basic Concepts & Usage Advanced Topics Monitoring Environment Templates Monitored Objects Import Monitored Objects Data Fields Deployment Icinga 2 Agents Configuration Baskets Dashboard Monitoring Status VMD Permissions Notifications Jobs API Configuring Icinga Monitoring Retention Policy NetEye Self Monitoring 3b Concepts Collecting Events Add a Filter Node WHERE Conditions Iterating over Event fields Retrieving Payload of an Event Extract Variables Create a Rule Tornado Actions Test your Configuration Export and Import Configuration Example Under the hood Development Retry Strategy Configuration Thread Pool Configuration API Reference Configure a new Business Process Create your first Business Process Node Importing Processes Operators The ITOA Module Configuring User Permissions Telegraf Metrics in NetEye Telegraf Configuration Telegraf on Monitored Hosts Visualizing Dashboards Customizing Performance Graph The NetEye Geo Map Visualizer Map Viewer Configuring Geo Maps NagVis 3b Audit Log 3b Overview Shutdown Manager user Shutdown Manager GUI Shutdown Commands Advanced Topics Overview User Role Management Cube Use Cases ntopng and NetEye Integration Permissions Retention Advanced Topics Overview User Roles Nodes Test Cases Dashboard Use Cases Overview Architecture Authorization Elasticsearch Overview Enabling El Proxy Sending custom logs to El Proxy Configuration files Commands Elasticsearch Templates and Retentions El Proxy DLQ Blockchain Verification Handling Blockchain Corruptions El Proxy Metrics El Proxy Security El Proxy REST Endpoints Agents Logstash Elastic APM Elastic RUM Log Manager - Deprecated Overview Authorization in the Command Orchestrator Module Configuring CLI Commands Executing Commands Overview Permissions Installation Single Tenancy Multitenancy Communication through a Satellite Asset collection methods Display asset information in monitoring host page Overview Customers Availability Event Adjustment Outages Resource Advanced Topics Introduction Getting Started SATAYO Items Settings Managed Service Mitre Attack Coverage Changelog Before you start Update Procedure Single Node Upgrade from 4.42 to 4.43 Cluster Upgrade from 4.42 to 4.43 Satellite Upgrade from 4.42 to 4.43 DPO machine Upgrade from 4.42 to 4.43 Create a mirror of the RPM repository Sprint Releases Feature Troubleshooting Tornado Networking Service Management - Incident Response IT Operation Analytics - Telemetry Identity Provider (IdP) Configuration Introduction to NEP Getting Started with NEPs Online Resources Obtaining NEP Insights Available Packages Advanced Topics Upgrade to NetEye 4.31 Setup Configure swappiness Restarting Stopped Services Enable stack traces in web UI How to access standard logs Director does not deploy when services assigned to a host have the same name How to enable/disable debug logging Activate Debug Logging for Tornado Modules/Services do not start Sync Rule fails when trying to recreate Icinga object How to disable InfluxDB query logging Managing an Elasticsearch Cluster with a Full Disk Some logs are not indexed in Elasticsearch Elasticsearch is not functioning properly Reporting: Error when opening a report Debugging Logstash file input filter Bugfix Policy Reporting Vulnerabilities Glossary 3b

Shutdown Commands

The Shutdown Command

A so-called shutdown command must be associated with each monitored Host that should be shut down by the module. This is the exact command which will be executed by the Shutdown Manager module on the host to shut it down. The link between monitored host and shutdown command is created by assigning a dedicated Custom Property in the host’s configuration form in Icinga Director.

To actually trigger the shutdown of a host, you will need to go to the Shutdown Manager module and invoke the command from there.

Each shutdown command is run using icingacli.

Shutdown commands return the result of the operation as a JSON structure. For list commands, this structure will be an array of the returned objects. For the other commands (create, delete, etc.) it will contain:

  • result: Whether the command succeeded or failed (‘ok’ or ‘failed’)

  • message: A text-based confirmation message

  • info: Detailed information on relevant parameters

Warning

Once you finish configuring the Shutdown Command objects, you need to deploy the Director configuration in order to execute the Commands.

Create

The create command lets you add a new shutdown command which you can then apply to the Shutdown command custom property of the host or host group in Director.

Usage:

# icingacli shutdownmanager shutdowncommand create [parameters]

Available Parameters:

-name:

(mandatory) Name of the command.

-command:

(mandatory) The command field must consist of a JSON Array that represents the command and its associated parameters needed to correctly shut down the host. If the command requires host-related parameters, the user can specify them using the pattern $<property>$, and they will be replaced by the Shutdown Manager (if correctly specified in the host definition). Currently the supported parameters are:

  • $host$

  • $hostAddress$

  • $hostAddress6$

  • $hostAlias$

  • $hostIpv4$

  • $objectType$

  • $hostName$

–run-on-agent:

(mandatory) Determines whether the command should be executed on the master, or on an Icinga agent. This will only succeed if the Icinga agent is running on the host, and is connected to either the master or a satellite when the shutdown command is triggered. The value to pass is either 0 (false, i.e. run on the master) or 1 (true, i.e. run on the agent).

Edit

The edit command lets you change one or more values on an existing shutdown command using the same parameters as the shutdowncommand create command above.

Usage:

# icingacli shutdownmanager shutdowncommand edit [parameters]

List

The list command lets you see a list of all existing shutdown commands in JSON format.

Usage:

# icingacli shutdownmanager shutdowncommand list

Available Parameters:

–id:

(mandatory) The ID of the definition to list

Delete

The delete command lets you remove a shutdown command you have created, provided that it is not in use on any hosts. It requires the shutdown command’s ID, which you can obtain from the list command.

Usage:

# icingacli shutdownmanager shutdowncommand delete [parameters]

Available Parameters:

–id:

(mandatory) The ID of the shutdown command to delete

Triggering the Shutdown of All Hosts in a Shutdown Group

All hosts in a Shutdown Group can be shut down directly using this dedicated icingacli command:

icingacli shutdownmanager shutdown shutdowngroup --id <ID>

The shutdown shutdowngroup command requires the group’s ID, which you can obtain by using the group’s list command. During command execution, all hosts in that group will be sent their individual shutdown command.

The shutdown shutdowngroup icingacli command will return one of the following values:

  • 0 : Ok

  • 1 : The mandatory ID parameter is missing

  • 2 : The group with the given ID does not exist

  • 3 : At least one error occurred while sending the shutdown command to the hosts in the group

Triggering the Shutdown of a Single Host

A single host can be shut down directly using the dedicated icingacli command:

icingacli shutdownmanager shutdown host --host-name <host name>

The shutdown host command requires a parameter for the host name. During command execution, a check is performed which validates that the specified host exists. In addition, the command itself verifies whether a shutdown command has been assigned to the given host.

The Shutdown Manager will then substitute the supported macro parameters and communicate to Icinga the resulting shutdown command. Icinga will take care of executing the shutdown command.

The shutdown host icingacli command will return one of the following values:

  • 0 : Ok

  • 1 : The mandatory host-name parameter is missing

  • 2 : No hosts or more than one host was passed as the host-name parameter

  • 3 : An error occurred while sending the shutdown command to Icinga

Shutdown Management Configuration CLI Commands

You can use the Shutdown Manager directly from the shell with the icingacli command.

Using the Shutdown Manager’s CLI commands, you can perform create, edit, delete and list actions on the following shutdownmanager objects:

  1. Shutdown Definition: A Shutdown Definition that specifies how to shut down multiple computers when a condition is met.

  2. Shutdown Group: A Shutdown Group which should all be shut down at the same time.

Below you can find detailed descriptions of the available commands and their parameters.

Shutdown Definition Commands

Create

The create command lets you construct a new shutdown definition. It requires a name and a Shutdown Condition, expressed as a Host State or a Service State depending on the command’s parameters.

Usage:

# icingacli shutdownmanager shutdowndefinition create [parameters]

Available Parameters:

–name:

(mandatory) The name of the shutdown definition to be created.

–host-name:

(mandatory) The name of the host whose status will trigger the shutdown, or which is running the service that will trigger the shutdown.

–service-description:

(optional) If this parameter is empty, then the host’s status will be compared to the target status. If instead it is set to the name of a valid service on the host, then the service’s status will be used.

–status:

(mandatory) The monitoring status that will trigger the shutdown procedure when it matches the host or service status.

Edit

The edit command lets you change one or more of the values for the fields in an existing shutdown definition using the same parameters as the shutdowndefinition create command above.

Usage:

# icingacli shutdownmanager shutdowndefinition edit [parameters]

List

The list command lets you see a list of all existing shutdown definitions in JSON format.

Usage:

# icingacli shutdownmanager shutdowndefinition list

Delete

The delete command lets you remove an existing shutdown definition given that definition’s ID, which you can obtain from the list command.

Usage:

# icingacli shutdownmanager shutdowndefinition delete [parameters]

Available Parameters:

–id:

(mandatory) The ID of the definition to delete

Shutdown of a definition

The shutdowndefinition command lets you trigger the shutdown of a pre-configured shutdown definition.

Once a shutdown group is triggered, a timer will count down while the hosts in that shutdown group are powering down. Once the timeout period has expired, the subsequent shutdown group will be triggered and its timer set, until no more shutdown groups remain.

Usage:

# icingacli shutdownmanager shutdown shutdowndefinition [parameters]

Available Parameters:

–id:

(mandatory) The ID of the shutdown definition which has to be shutdown

Shutdown Group Commands

Create

The create command lets you construct a new shutdown group. It requires a name, a set of monitored objects, a shutdown definition to belong to, and an ordering relative to other groups.

Usage:

# icingacli shutdownmanager shutdowngroup create [parameters]

Available Parameters:

–name:

(mandatory) The name of the shutdown group to be created.

–filter:

(mandatory) A monitoring filter that will return a set of monitored objects to be included in this new group.

–shutdown-definition-id:

(mandatory) The ID of a shutdown definition (obtainable via the list command) which this new group will then belong to.

–timeout:

(mandatory) The number of seconds after which the shutdown process for the next group will be initiated.

–group-order:

(optional) A number representing the order of this group relative to other groups in the shutdown definition. Lower-numbered groups are shut down before higher-numbered groups, and any groups having the same order number in the shutdown definition will be shut down in a random order relative to themselves. If no group order parameter is specified, then the value will default to the next highest available number (for instance, if you have only one group with order 3 in the definition, the new group will have order 4). If no groups yet exist in the shutdown definition, it will be set to 1.

Edit

The edit command lets you change one or more values for the fields in an existing shutdown group using the same parameters as the shutdowngroup create command above.

Usage:

# icingacli shutdownmanager shutdowngroup edit [parameters]

List

The list command lets you see all existing shutdown groups in JSON format.

Usage:

# icingacli shutdownmanager shutdowngroup list

Available Parameters: None

Delete

The delete command lets you remove an existing shutdown group given that group’s ID, which you can obtain from the list command.

Usage:

# icingacli shutdownmanager shutdowngroup delete [parameters]

Available Parameters:

–id:

(mandatory) The ID of the group to delete

Listhosts

The listhosts command lets you see all hosts that belong to a shutdown group in JSON format. Each entry in the output list represents a host and contains:

  • The host name

  • The host address

  • The ID of the shutdown command associated with the host (null if the host is not associated with any shutdown command)

Usage:

# icingacli shutdownmanager shutdowngroup listhosts [parameters]

Available Parameters:

–id:

(mandatory) The ID of the shutdown group whose hosts are to be displayed