Welcome to docs.opsview.com

Test service check

This functionality allows the user to configure service check arguments, execute them outside of the core monitoring system and check results from the web user interface. This allows you to assign rights to specific users to troubleshoot and debug plugins.

A user requires TESTSOME or TESTALL access to get this functionality.

The contextual menu for a service will have a menu option called “Test service check”. This will pop up a window showing the associated service check plugin, followed by its arguments. The rules are:

  • If the user has TESTCHANGE, then they can see the arguments and change the arguments for testing. Since Nagios Core allows execution of arbitrary commands and this feature is designed to give similar results, we recommend that you only allow trusted users to have the TESTCHANGE access
  • Otherwise if the service check does not have the sensitive_arguments flag set, then the arguments will be displayed but not editable
  • Otherwise the sensitive arguments flag is set and the arguments will not be shown

The submit button runs the plug-in with the appropriate arguments. The standard out and standard error are captured and displayed. The full command will be shown if appropriate.

Limitations

  • Restricted to service checks. Host checks are not included.
  • Restricted to service checks that are of “Active Plugin” only. It doesn't make sense for passive results, and SNMP polling has a helper already in the service checks edit page
  • The plugin is executed without the Nagios environment variables being set
  • The arguments that are provided do not support all Nagios macros. For example, Nagios has a $SERVICESTATEID$, but this is not applicable when run “outside of Nagios”. The following macros are supported:
    • $HOSTADDRESS$
    • $HOSTNAME$
    • $SERVICEDESC$
  • Plugin output is not filtered, so arguments may be seen by the user if the plugin chooses to return it
  • Plugins that submit results to Nagios, or take some action, could still run
  • Cascade service checks are ignored. You cannot the test the cascaded_from service check because it will actually put results into Nagios
  • There is no limit in the time taken for this check to run, whereas Nagios has an overall timeout value
  • While this functionality simulates Nagios' execution of plugins, there may be slight variations in shell argument handling
Navigation
Print/export
Toolbox