Opsview Knowledge Center

Host Check Commands

Overview of Commands in Opsview Monitor

What are Host Check Commands and How do They Work?

Host Check Commands are used by the Opsview Monitor service to actively check if a Host is 'UP'.

The Host Check Command can be modified on a Host by Host basis, as covered in Host tab, or it can be changed on multiple Hosts by using the bulk edit functionality covered in Bulk editing.

The primary purpose of the Host Check Command is to ensure that the monitored Host is responding, i.e. is considered 'UP' and online. By default, Opsview Monitor ships with 14 Host Check Commands:

  • Ping
  • tcp port 21 (FTP)
  • tcp port 22 (SSH)
  • tcp port 23 (Telnet)
  • tcp port 25 (SMTP)
  • tcp port 80 (HTTP)
  • tcp port 135 (MC RPC)
  • tcp port 443 (HTTP/SSL)
  • tcp port 5900 (VNC)
  • NRPE (on port 5666)
  • NRPE (on port 5666 ' non-SSL)
  • tcp port 161 (SNMP)
  • Slow ping
  • Tolerant ping

These Host Check Commands essentially provide 14 different ways to detect if a Host is 'UP'.

For example, if ICMP is blocked across the network then using the default Host Check Command of 'Ping' will imply that all Hosts are reported as 'DOWN'. However, SSH may be enabled on the Hosts, or they may be responding on port 80 (if they are web servers). Therefore, changing the Host Check Command on our Hosts to 'tcp port 80 (HTTP)' instead of 'Ping' may allow the Host Check Command to successfully work, and thus all of the Hosts will be correctly reported as 'UP'.

Adding a Host Check Command

Sometimes the Host Check Commands that Opsview Monitor has by default are not sufficient for the environment in which it is deployed. In this scenario you have the option to add your own Host Check Command using the section located at 'Settings > Host Check Commands':

Example menu showing the 'Host Check Commands' menu option

Example menu showing the 'Host Check Commands' menu option

The 'Host Check Commands' menu option is located on page 2/2 within the 'Settings' tab, as seen in the screen above.

Once clicked the 'Host Check Commands' page will load, which should look similar to the screen below:

Host Check Commands list page within the 'Settings' section.

Host Check Commands list page within the 'Settings' section.

To add a new Host Check Command, click on the 'Add New' button within the tool bar:

Add New' button is visible below the 'signpost' icon

Add New' button is visible below the 'signpost' icon

Once the 'Add New' button has been clicked, a 'New Host Check Command' modal window will appear. Within this window are three boxes that are user-configurable:

  • Name: A friendly name for the new Host Check Command. This name will be displayed in the drop-down menus when configuring Hosts.
  • Plugin: The plugin to use when executing the Host Check Command.
  • Arguments: The arguments to pass to the aforementioned plugin. The Host Check Command comprises of the 'plugin + arguments'.

When the plugin is changed, the 'Plugin Help' text will change based on the help text for the chosen plugin. If the plugin has no help text, then this section will be displayed without any text.

In the example below, we have created a new Host Check Command that checks for a TCP response on port 8080 (in an example scenario of having changed the default Apache2 port to 8080):

Example 'New Host Check Command' that checks for a response on TCP port 8080

Example 'New Host Check Command' that checks for a response on TCP port 8080

Once the new Host Check Command is configured, click 'Submit Changes'. The new Host Check Command will appear in the list of all Host Check Command's but will be highlighted yellow to depict that while it has been added, a reload is required to enable it to be used within the system:

A Host Check Command 'HTTP (8080)' has been added yet a reload is required to apply the changes

A Host Check Command 'HTTP (8080)' has been added yet a reload is required to apply the changes

To apply this newly created Host Check Command to one or more Hosts, please follow the guides outlined in Sections Host Tab and How to edit multiple Hosts in bulk.

Cloning a Host Check Command

Cloning a Host Check Command is very simple. First, click on the contextual menu of the Host Check Command you wish to clone. From the menu, select 'Clone'. This will load a 'New Host Check Command' modal window which is pre-populated with all the data of the original Host Check Command. The only field that requires modification is the 'Name' field, which must be unique between Host Check Commands:

Cloned Host Check Command ' Name must be modified before 'Submit Changes

Cloned Host Check Command ' Name must be modified before 'Submit Changes

Cloned Host Check Command ' Name has been changed which has removed the warning label

Cloned Host Check Command ' Name has been changed which has removed the warning label

Once the name has been modified and the red warning message has disappeared, the Host Check Command can be saved via the 'Submit Changes' button, and then applied to one or more Hosts via the guides outlined in Sections Host Tab and How to edit multiple Hosts in bulk.

Deleting a Host Check Command

The deletion of a Host Check Command is done via the contextual menu option 'Delete'. Once 'Delete' is clicked, a modal window will load asking you to confirm:

Confirmation window that is displayed when 'delete' has been pressed

Confirmation window that is displayed when 'delete' has been pressed

If a Host Check Command is being used by one or more Hosts it cannot be deleted without first re-configuring those Hosts to use a different Host Check Command. It is easy to detect if a Host Check Command is in use by looking at the 'Hosts' column and if there is a number there it means that the Host Check Command is used on the aforementioned number of Hosts. In the example below, 'ping' is being used to monitor 23 Hosts:

Host Check Commands: List

Host Check Commands: List

To view the individual '23' Hosts, click on the number which will expand the row to display each Host individually:

Expanded 'Hosts' column, displaying which Hosts are using this Host Check
Command

Expanded 'Hosts' column, displaying which Hosts are using this Host Check
Command

To hide the Hosts, re-click the number which will collapse the row back to its original format.

If you attempt to delete a Host Check Command that is being used by one or more Hosts, you will notice that the delete option is 'greyed out'/deselected:

Host Check Command with 'Delete' button disabled

Host Check Command with 'Delete' button disabled

The message box will appear when the mouse is placed over the delete button, telling the user 'Cannot delete this Host Check Command as it has Hosts attached to it'. To resolve this issue, follow the guides outlined in Host Tab and How to edit multiple Hosts in bulk to change the Host Check Command for the affected Host(s), and then navigate back to this section to re-attempt the deletion.

Host Check Commands

Overview of Commands in Opsview Monitor