...
If you need more precise interaction with your web service than the SAPI scripts can provide (e.g. SSL/TLS or cookies or the like), then you'll need to use a custom script. NMIS 8.5.4g ships with an example script of that type in /usr/local/nmis8/install/scripts/webtest
, which should to be moved to a directory meant for binaries (e.g. /usr/local/nmis8/bin
or /usr/local/bin/
) if you want to use it.
NOTE - NMIS9 ships this script in /usr/local/nmis9/conf-default/scripts/webtest.
The example script downloads a web page (optionally following a number of redirections) using http or https, and optionally checks that the document content matches a given regular expression. You need to define this service with Service Type "program
", provide suitable Program settings for the program and activate the service for the server that you want to test (but please note: the custom program will always be run locally on your NMIS server!)
...
To use this, save the script somewhere NMIS can access it (as /usr/local/bin/bindpresent
for example), then configure NMIS with this service of type "program" and activate the service for the NMIS server itself:
MySQL Database
remote, port only
...