Services
The NMIS Server Services Poll Table enables the polling of ports or services on a server - or any other NMIS collected device. User defined scripts are used to poll application layer ports such as smtp, pop3, dns etc. The scripts are located in the conf/script directory,
See Nodes to add a defined service port/script to a NMIS device.
Service up/down events will be logged and notified in the usual escalation/notify system. Add a service event in Escalation
If you wish to create your own script:
send: data_to_send expect: string_to_match send: more_data_to_send expect: another_string_to_match For example, to see if a HTTP server is responding you might use the following script: send: HEAD / HTTP/1.0 send: expect: 200 OK All expect values are case-insensitive with the exception of a special value: EOF which means to wait until an EOF condition occurs. For example, to query a HTTP server for all header information you might use the following script: send: HEAD / HTTP/1.0 send: expect: EOF (Note to send a blank line "\n" as in the above example, do not give send: any value)
for debugging, a services only collect may be manually run:
./nmis.pl debug=true type=services [node=xxx]
Note that services can be polled for those devices that dont snmp collect, so you may have some servers set 'collect=false' so no snmp is collected, but reachability and services up/down stats may be collected.
A unique name for indexing the table, that can then be selected in the Nodes Table.
port80 port22 Netlogon Spooler HTTPD ....
Interval to poll the device - not as yet implemented !
The port to be scanned with Linux utility 'nmap'. You can specify a particular protocol by preceding the port numbers by "tcp:" or "udp:". See 'nmap' for other port modifiers.
The name of a running, or not running, service to be checked, the service name is as gathered by snmp.
Predefined service types are:
dns port service script
Service_Type is 'script' and lib/sapi.pm will look for the script name in conf/scripts and execute the script.
Service_Type is 'port' for nmap poll, and then 'port' should be preceded by nmap style prefix; udp:port or tcp:port
Service_Type is 'service' for snmp service check - then use 'Service_Name' for testing that service running, or not.
Service_Type is 'dns' looks up the nodename of the remote DNS server on itself - should always work.
An example:
Name Poll_Interval Port Service_Name Service_Type dns 5m null dns http 5m 80 null script HTTP_Server 5m null httpd service master_daemon 5m null master.pl service pop3 5m 110 null script port80 5m tcp:80 null port