Using the Global-Plugin-Execution service model

On the page

Do you need help?

warning svgrepo com Warning:

The release of this new service model is accompanied by new terms of use for the ServiceNav product available here : . See in particular articles 8 and 4.5 for SaaS platforms and article 6.7 of the support conditions for OnPremise platforms.

The use of this service model therefore implies the following conditions:

  • Coservit's support is limited to the execution of the code provided by the customer, and Coservit does not provide support on the code produced by the customer
  • Coservit will no longer provide support for a ServiceNav Box where elements may have been modified (in addition to the file submitted by the customer), in particular in the event of the installation or updating of additional software (packages) or the operating system of the ServiceNav Box
  • In case of support request and/or abnormal activity on the platform and in case of reasonable doubt of the support technician, Coservit reserves the right to move/modify the code produced by the customer and to stop its operation, informing the customer according to the usual support procedures.

How the Global-Plugin-Execution service model works

Preparation and prerequisites of the customer program

The purpose of the Global-Plugin-Execution service model is to enable the execution of a program customized by the customer and placed on the ServiceNav Box.

In order to function, this program must meet various requirements:

  • File encoding : LATIN
  • The program must have a return code according to the table below
Value Status interpreted in ServiceNav
0 OK (green)
1 Alert (orange)
2 Critical (red)
3 Unknown (grey)
  • Return of the program on a single line
  • The return may contain performance data. In this case, the return must be of the form :

text displayed in the ServiceNav detail field| 'nommetrique'=value[unit];[threshold alert];[critical threshold];[min value];[max value]

    • space-separated list of metric/value names
    • the metric name can contain any character except the equal sign or the quote sign (')
    • single quotes for the metric name are optional. Mandatory if nomenclature contains spaces
    • the name of the metric is free. It must be less than 19 characters long and unique in the return line and not contain the quote sign (')
    • [Warning threshold];[critical threshold];[min value];[max value] may be null (for example, if the threshold is not defined or if min and max do not apply). Unfilled semicolons can be deleted. Min and max are not required if the unit is %
    • value, alert threshold, critical threshold, min and max are in the class [-0-9] and must all be of the same unit for a given metric.
    • Unit is a string of one or more characters. The following characters are excluded numbers, semicolons, single or double quotation marks.
      • Some examples:
        • no unit specified - Indicates a number (int or float) of entities (e.g. users, processes, load averages)
        • s - seconds (also min, ms, ...)
        • % - percentage
        • B - bytes (also KB, MB, TB)

If your program meets the above requirements, you can implement it on the ServiceNav Boxes.

If you have more than one ServiceNav Box, you should deploy it to your entire ServiceNav Box fleet.

Put your file in the ServiceNav Box folder:


It is then necessary to assign the right execution and membership rights with the command lines below:

chown nagios:nagios /usr/local/nagios/libexec/custom_plugin/
chmod 755 /usr/local/nagios/libexec/custom_plugin/

Putting into supervision

Go to the ServiceNav interface and add a service:


Global-Plugin-ExecutionThe field Plugin file to run must contain the name of your file (placed in the directory as shown above)

The field Arguments of the plugin contains all the arguments of the plugin with the following constraints:

  • Arguments are passed as -H 'value' or -host 'value' (e.g. -c 'public' or -url '' )
  • To surround the values of the arguments, use the double quotes sign (" ) or the single quotes sign (')
  • If the value of an argument surrounded by double quotes contains a double quote it is necessary to escape it with "(antislash double quote)
  • If the value of an argument surrounded by single quotes contains a single quote it is necessary to escape it with ' "' "' (quote double quote double quote quote)

Example: -h $HOSTADDRESS$ -URI 'mylogin.php' -pwd 'eyi "kim58' -text 'Rue de l' "' "'alma'

Example: -h $HOSTADDRESS$ -URI 'mylogin.php' -pwd " eyi "kim58 " -text " Rue de l'alma "

The following variables can be used:

  • $_SERVICEHOSTALIAS$ returns the name of the service's home device as specified in ServiceNav
  • $HOSTADDRESS$ returns the IP address of the service's home device as specified in ServiceNav
  • $_SERVICEDISPLAYNAME$ returns the service name as specified in ServiceNav
  • $_SERVICEIDSERVICE$ returns the unique ServiceNav identifier of the service
  • $_HOSTCOMPANYNAME$ returns the name of the parent company of the service's parent equipment
  • $_HOSTHOST_CATEGORY_NAME$ returns the name of the ServiceNav equipment category to which the service belongs

It is not possible to use account variables specified at company and/or equipment level in ServiceNav. If the program requires identifying information, this should be entered in the Plugin's argument.

This information is stored encrypted in the ServiceNav database but remains visible to anyone who has access to the unit service configuration page.

You may also be interested in

Global-Api-Value & Global-Api-Status

ps 1

Using PowerShell generic templates - GLOBAL-PS-Values

Configure the box to receive traps


Welcome to ServiceNav!

Do you need some help? More information about our products? Write to us!
You have taken note of our privacy policy.
We use cookies to ensure the best experience on our site. If you continue to use this site, we will assume that you are satisfied with it.

Reserve your place

You have taken note of our privacy policy.