Using the Global-Plugin-Execution service model

On the page

Need some help?

Disclaimer :

The release of this new service model is accompanied by new ServiceNav product terms and conditions 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:

  • The support provided by Coservit is limited to the execution of the code provided by the customer, and Coservit does not provide support on the product code provided by the customer.
  • Coservit no longer provides support on a ServiceNav Box whose elements may have been modified (in addition to the file submitted by the customer), particularly in the event of installation or updating of additional software (packages) or the ServiceNav Box operating system.
  • In the event of a support request and/or abnormal activity on the platform and in case of reasonable doubt by the support technician, Coservit reserves the right to move/modify the product code 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 client program

The objective of the Global-Plugin-Execution service model is to allow the execution of a program customized by the customer and deposited on the ServiceNav Box.

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

  • The program must have a return code according to the table below
Value Interpreted status 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 which case the return must be in the form :

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

    • list of metric name / value names separated by spaces
    • the name of the metric can contain any character except the equal sign or the quote sign (')
    • single quotation marks for the metric name are optional. Mandatory if name contains spaces
    • the name of the metric is free, must be less than 19 characters long and unique in the return line and must not contain the quote sign (')
    • alert threshold]; [critical threshold]; [min value]; [max value] can be zero (e.g., if the threshold is not defined or if min and max do not apply). Semi-colons that are not filled in can be deleted. Min and max are not required if the unit is %.
    • value, alert threshold, critical threshold, min and max are in class [-0-9] and must all be in 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.
      • A few examples:
        • no units 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 set it up on the ServiceNav Boxes.

If you have more than one ServiceNav Box, it should be deployed across your entire ServiceNav Box fleet.

Drop your file into the ServiceNav Box folder:


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

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


Go to the ServiceNav interface and add a :

The field Plugin file to execute must contain the name of your file (dropped in the directory as indicated above)

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

  • Arguments are passed in the form -H 'value' or -host 'value' (example -c 'public' or -url '' )
  • To surround the values of the arguments, use the double-quote sign (" ) or the single-quote sign (').
  • If the value of an argument surrounded by double quotes contains a double quote it is necessary to escape it with " (backslash 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 quote double 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 attachment equipment as specified in ServiceNav
  • $HOSTADDRESS$ returns the IP address of the Service Attachment Equipment 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 service attachment equipment company
  • $_HOSTHOST_CATEGORY_NAME$ returns the name of the ServiceNav equipment class of the service attachment

It is not possible to use the account variables specified at company and/or equipment level in ServiceNav. If the program requires any identifying information, this should be specified in the field Argument of the plugin.

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

This may also be of interest to you

Using generic PowerShell - GLOBAL-PS-Values models

1 - Configuring the box to receive traps

2 - Create a Trap definition file

fr_FRFrench en_USEnglish

Welcome to ServiceNav!

Need help? More information about our products? Write to us!
You have taken note of our privacy policy.


While the epidemic lasts, ensure the availability and performance of your IT services for teleworking, with ServiceNav!

Following the government's call to mobilize to help businesses overcome the current health and economic context, we help you, free of charge, to ensure the complete monitoring of your teleworking environments: VPN, VDI, Teams, Skype Enterprise, Citrix... Objectives: collection, availability and usage indicators, dashboards to support your communication.
We use cookies to ensure that you have the best possible experience on our site, and 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.