NetSaint Plugins


Obtaining Plugins

Plugins are no longer included with the "core" NetSaint distribution. Since plugins are required to actually use NetSaint, you'll need to download some from www.netsaint.org. As the plugins are updated and distributed separately from NetSaint, this documentation may contain some information which is inaccurate. There are severak plugins which are not documented here, mostly because I don't have the time to keep up with everything. You should consult the documentation supplied with the plugins (or the plugin source code itself) for the latest information.

About The Plugins

You may have to tweak the source code for some plugins in order to get them to compile on your system. If you are interested in writing new plugins, check out the documentation here. If you modify or enhance an existing plugin (or if you write a new one), let me know.

The following is a basic description of the some of the plugins that are available for use with NetSaint. If you have further questions, try running the plugins manually using the "manual execution" examples I've provided.

Other Resources

If you are confused about what the macros are all about, read up on them here. If you have questions about configuring services to actually make use these plugin examples, read up on the configuration documentation here. If you read the documentation and still can't figure things out, feel free to email me and I'll give you a hand.

Documented Plugins

TCP port plugin (check_tcp)
UDP port plugin (check_udp)
SMTP plugin (check_smtp)
POP3 plugin (check_pop)
FTP plugin (check_ftp)
NNTP plugin (check_nntp)
HTTP plugin (check_http)
Time plugin (check_time)
Ping plugin (check_ping)
DNS plugin (check_dns)
SSH plugin (check_ssh)
SNMP plugin (check_snmp)
Disk space plugin (check_disk)
Current users plugin (check_users)
Process plugin (check_procs)
Processor load plugin (check_load)
HP printer plugin (check_hpjd)
MRTG traffic plugin (check_mrtgtraf)
MRTG generic plugin (check_mrtg)
Novell server statistics plugin (check_nwstat)
Over-CR collector plugin (check_overcr)
Process image size plugin (check_vsz)
Swap usage plugin (check_swap)
Oracle database server plugin (check_oracle)
PostgresQL database plugin (check_pgsql)
Log file pattern detector plugin (check_log)
UPS plugin (check_ups)
SSH plugin executor (check_by_ssh)
NetSaint process plugin (check_netsaint)

Other Undocumented Plugins

These are some other plugins which are included in the core plugin distribution, but are not documented because of a lack of time on my part. Help for each plugin is usually available by running the plugin with no command line arguments.

  • Dummy plugin (check_dummy)
  • FPing plugin (check_fping)
  • Game server plugin (check_game)
  • IMAP plugin (check_imap)
  • LDAP plugin (check_ldap)
  • MySQL plugin (check_mysql)
  • REAL server plugin (check_real)
  • Reply plugin (check_reply)
  • Breezecom wireless signal strength plugin (check_breeze.pl)
  • WaveLAN wireless signal strength plugin (check_wave.pl)
  • FlexLM license manager plugin (check_flexlm.pl)
  • IRCD server plugin (check_ircd.pl)
  • NFS plugin (check_nfs.pl)
  • NTP plugin (check_ntp.pl)
  • SMB share disk space plugin (check_disk_smb.pl)

TCP Port Plugin (check_tcp)

Command Line Format:check_tcp <host_address> [-p port] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_tcp 192.168.0.2 -p 23
Command Definition Example: command[check_tcp]=/usr/local/netsaint/libexec/check_tcp $HOSTADDRESS$ -p $ARG1$

This plugin is fairly simple - it just checks to see if it can connect to the specified host on the specified port number. A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

UDP Port Plugin (check_udp)

Command Line Format:check_udp <host_address> [-p port] [-s send] [-e expect] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_udp 192.168.0.2 -p 20796 -s "Hello, Mr. Server" -e "Hi there, Mr. Client"
Command Definition Example: command[check_udp]=/usr/local/netsaint/libexec/check_udp $HOSTADDRESS$ -p $ARG1$ -s $ARG2$ -e $ARG3$

This plugin will attempt to connect to the specified UDP port on the given host. The plugin will send the string specified by the send argument upon making a connection. The plugin will expect to recieve a response from the server, which should include the substring specified by the expect argument. If the plugin does not receive a response that contains the substring specified by the expect argument, it will return a critical status. A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

SMTP Plugin (check_smtp)

Command Line Format:check_smtp <host_address> [-p port] [-e expect] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_smtp 192.168.0.2
Command Definition Example: command[check_smtp]=/usr/local/netsaint/libexec/check_smtp $HOSTADDRESS$

This plugin will check to see if it can connect to the SMTP port on the specified host. The plugin will look for the string specified by the expect argument in the first line of the response from the host (default is "220"). Specifying an optional port number on the command line will override the default port (25). A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

POP3 Plugin (check_pop)

Command Line Format:check_pop <host_address> [-p port] [-e expect] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_pop 192.168.0.2
Command Definition Example: command[check_pop]=/usr/local/netsaint/libexec/check_pop $HOSTADDRESS$

This plugin will check to see if it can connect to the POP3 port on the specified host. The plugin will look for the string specified by the expect argument in the first line of the response from the host (default is "+OK"). Specifying an optional port number on the command line will override the default port (110). A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

FTP Plugin (check_ftp)

Command Line Format:check_ftp <host_address> [-p port] [-e expect] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_ftp 192.168.0.2
Command Definition Example: command[check_ftp]=/usr/local/netsaint/libexec/check_ftp $HOSTADDRESS$

This plugin will check to see if it can connect to the FTP port on the specified host. The plugin will look for the string specified by the expect argument in the first line of the response from the host (default is "220"). Specifying an optional port number on the command line will override the default port (21). A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

NNTP Plugin (check_nntp)

Command Line Format:check_nntp <host_address> [-p port] [-e expect] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_nntp 192.168.0.2
Command Definition Example: command[check_nntp]=/usr/local/netsaint/libexec/check_nntp $HOSTADDRESS$

This plugin will check to see if it can connect to the NNTP port on the specified host. The plugin will look for the string specified by the expect argument in the first line of the response from the host (default is "220"). Specifying an optional port number on the command line will override the default port (119). A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option.

HTTP Plugin (check_http)

Command Line Format:check_http <host_address> [-e expect] [-u url] [-p port] [-hn host_name] [-wt warn_time] [-ct crit_time] [-to to_sec] [-nohtml]
Manual Execution Example: check_http 192.168.0.1
Command Definition Example: command[check_http]=/usr/local/netsaint/libexec/check_http $HOSTADDRESS$

This plugin will check to see if it can connect to the HTTP port on the specified host and retrieve the specified URL. If no URL is specified on the command line, the plugin will fetch the root document. The plugin looks for a "HTTP/1." message from the host or whatever you specify for the expect argument. Specifying an optional port number on the command line will override the default port (80). Specifying the optional host_name argument will cause the plugin to send a "Host: [host_name]" header string to the HTTP server immediately after the GET request. This is useful when trying to monitor virtual servers that use host headers. A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds). By default, this plugin produces HTML output which provides a link to host/url that you specify on the command line. If you want to suppress the HTML output, use the nohtml argument.

Time Plugin (check_time)

Command Line Format:check_time <host_address> [-p port] [-wd warn_diff] [-cd crit_diff] [-wt warn_time] [-ct crit_time] [-to to_sec]
Manual Execution Example: check_ttime 192.168.0.2 -wd 300 -cd 600
Command Definition Example: command[check_time]=/usr/local/netsaint/libexec/check_tcp $HOSTADDRESS$ -wd 300 -cd 600

This plugin will attempt to check the time on a remote host. Specifying an optional port number on the command line will override the default (37). The plugin will return a critical status if the time difference in seconds between the remote and local hosts exceeds the value of the crit_diff argument (if the -cd option is supplied). It will return a warning status if the time difference exceeds the value of the warn_diff argument (assuming the -wd option is supplied). A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

Ping Plugin (check_ping)

Command Line Format:check_ping <host_address> <wpl> <cpl> <wrta> <crta> [-p packets] [-nohtml]
Manual Execution Example: check_ping 192.168.0.1 40 100 100.0 1000.0
Command Definition Example: command[check_ping]=/usr/local/netsaint/libexec/check_ping $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$

This plugin will check to see if it can ping the specified host. It will also check the packet loss and round trip average and compare that against the warning and critical threshold levels specified for each. The <wpl> and <cpl> arguments are the warning and critical thresholds for percent packet loss, respectively. Likewise, the <wrta> and <crta> arguments are the warning and critical thresholds for round trip average (in milliseconds). The optional packets argument allows you to control how many ICMP ECHO packets are sent to the specified host (default is 5). By default, this plugin produces HTML output which provides a link to a traceroute CGI, which allows you to run a traceroute to the specified host via the web interface. If you want to suppress the HTML output, use the nohtml argument.

DNS Plugin (check_dns)

Command Line Format:check_dns <host_query> [dns_server]
Manual Execution Example: check_dns www.onepermanentdomain.com 192.168.0.1
Command Definition Example: command[check_dns]=/usr/local/netsaint/libexec/check_dns www.onepermanentdomain.com $HOSTADDRESS$

This plugin will check to see if it can resolve the host or domain name specified by the <host_query> option. If you don't want to use the default DNS servers specified in /etc/resolv.conf you can specify a different one by supplying it as the second argument. The most useful purpose of this plugin is to check the status of one of your DNS servers. If you want to monitor one of your DNS servers, supply a well known host/domain name as the first argument and the address of your DNS server as the second argument. The "well known host/domain name" should be something that is widely know and is should always resolve to a valid IP address - try picking the name of a big search engine or corporate website.

Notes:

SSH Plugin (check_ssh)

Command Line Format:check_ssh <host_address> [port]
Manual Execution Example: check_ssh 192.168.0.1
Command Definition Example: command[check_ssh]=/usr/local/netsaint/libexec/check_ssh $HOSTADDRESS$ $ARG1$

This plugin will attempt to connect to the SSH server on the port number specified by the port argument (default is port 22). Upon successfully contacting the SSH server and receiving a valid response, the plugin will display the protocol and server version information. If the plugin receives and invalid response it will display the message returned from the server and generate a warning state.

Notes:

SNMP Plugin (check_snmp)

Command Line Format:check_snmp <host_address> [-c community] [-o object_id] [-e eval_method] [-wv warn_value] [-cv crit_value] [-l label] [-r rate]
Manual Execution Examples: check_snmp 192.168.0.1 -o ip.ipOutNoRoutes.0 -e GT -wv 5000 -cv 10000 -l "IP Packets Out W/ No Route" -r "total packets"
Command Definition Example: command[check_ssnmp]=/usr/local/netsaint/libexec/check_snmp $HOSTADDRESS$ -c $ARG1$ -o $ARG2$ -e $ARG3$ -wv $ARG4$ -cv $ARG5$ -l $ARG6$ -r $ARG7$

This plugin will attempt to obtain the value of the objectID (specified by the object_id argument) from the SNMP source. The value can then be evaluated with a variety of methods (listed in the table below) against optionally specified warning and critical thresholds.

Evalution Methods

Method Description
PR The plugin will check only see see if some sort of value was present in the server response
GT The plugin will return a non-OK state if the data receieved is greater than either the warning or the critical threshold values
LT The plugin will return a non-OK state if the data receieved is less than either the warning or the critical threshold values
GTE The plugin will return a non-OK state if the data receieved is greater than or equal to either the warning or the critical threshold values
LTE The plugin will return a non-OK state if the data receieved is less than or equal to either the warning or the critical threshold values
EQ The plugin will return a non-OK state if the data receieved is equal to either the warning or the critical threshold values
NE The plugin will return a non-OK state if the data receieved is not equal to either the warning or the critical threshold values

Notes:

Disk Space Plugin (check_disk)

Command Line Format:check_disk <wusp> <cusp> <file_system>
Manual Execution Example: check_disk 85 95 /dev/hda1
Command Definition Example: command[check_disk]=/usr/local/netsaint/libexec/check_disk 85 95 $ARG1$

This plugin will check the free disk space on a specific file system. If used disk space percentage exceeds the <cusp> threshold value, a critical state results. If the used disk space percentage exceeds the <wusp> threshold value, a warning state results. The <file_system> argument should be in the form of /dev/hda1, /dev/hdb2, etc.

Notes:

Current Users Plugin (check_users)

Command Line Format:check_users <wusers> <cusers>
Manual Execution Example: check_users 50 75
Command Definition Example: command[check_users]=/usr/local/netsaint/libexec/check_users $ARG1$ $ARG2$

This plugin will check the number of currently logged in users. If the number of logged in users exceeds the <cusers> threshold value, a critical state results. If it exceeds the <wusers> threshold value, a warning state results.

Notes:

Process Plugin (check_procs)

Command Line Format:check_procs <wprocs> <cprocs> [process_flags]
Manual Execution Example: check_procs 5 10 ZT
Command Definition Example: command[check_procs]=/usr/local/netsaint/libexec/check_procs $ARG1$ $ARG2$ $ARG3$

This plugin will check the number of processes on the current machine. Optional process flags include R (Running), S (Sleeping), Z (Zombie), T (Stopped or Traced), and D (Uninterruptible Sleep). If no process flags are specified, the plugin will count all types of processes. The example above will check for processed that are in either a zombie state or are stopped/traced.

Notes:

Processor Load Plugin (check_load)

Command Line Format:check_load <wload1> <cload1> <wload5> <cload5> <wload15> <cload15>
Manual Execution Example: check_load 95 100 90 95 80 90
Command Definition Example: command[check_load]=/usr/local/netsaint/libexec/check_load $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$

This plugin will check the load average on the local machine over 1, 5, and 15 minute time periods using the data found in the /proc/loadavg file. A critical status is returned if the 1, 5, or 15 minute load averages exceed the <cload1>, <cload5>, or <cload15> thresholds specified. A warning status is returned if the 1, 5, or 15 minute load averages exceed the <wload1>, <wload5>, or <wload15> thresholds specified.

Notes:

HP Printer Plugin (check_hpjd)

Command Line Format:check_hpjd <address> [community]
Manual Execution Example: check_hpjd 192.168.0.1
Command Definition Example: command[check_hpdj]=/usr/local/netsaint/libexec/check_hpdj $HOSTADDRESS$ $ARG1$

This plugin will check the status of an HP printer that has a JetDirect© card installed. This plugin will return a critical status when the printer is turned off, a warning status when it has a paper jam, is offline, out of paper, low on toner, etc. Specifying an optional [community] argument on the command line will override the default SNMP community used in the communication with the printer (public).

My guess is that you don't want to get alert emails or pages everytime a printer jams or gets turned off at the end of the day, right? If so, read the FAQ on monitoring printers.

Notes:

MRTG Traffic Plugin (check_mrtgtraf)

Command Line Format:check_mrtgtraf <log_file> <expire_minutes> <AVG|MAX> <iwl> <icl> <owl> <ocl>
Manual Execution Example: check_mrtgtraf /home/httpd/html/mrtg/router1.log 10 AVG 1000000 1500000 1000000 1500000
Command Definition Example: command[check_mrtgtraf]=/usr/local/netsaint/libexec/check_mrtgtraf $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$

This plugin will check a traffic log file generated by MRTG and generate alerts if the incoming or outgoing rates (in Bytes/sec) exceed the specified thresholds. If the newest entry in the log file is more than <expire_minutes> old, the plugin will return a warning level. Specifying AVG or MAX as the third argument will control whether the plugin looks at average or maximum values in the log file (default is average). If the incoming or outgoing rates exceed the <iwl> or <owl> warning thresholds, respectively, a warning status is returned. If the rates exceed the <icl> or <ocl> critical thresholds, a critical status is returned. Command line thresholds are in Bytes/sec.

Notes:

MRTG Generic Plugin (check_mrtg)

Command Line Format:check_mrtg <log_file> <expire_minutes> <AVG|MAX> <column> <vwl> <vcl> <label> [rate]
Manual Execution Example: check_mrtg /home/httpd/html/mrtg/router1.log 10 AVG 1 1000000 1500000 In Bytes/Sec
Command Definition Example: command[check_mrtg]=/usr/local/netsaint/libexec/check_mrtg $ARG1$ 10 AVG $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$

This plugin will check a log file generated by MRTG and generate alerts if the value of the specified variable exceeds the specified thresholds. If the newest entry in the log file is more than <expire_minutes> old, the plugin will return a warning level. Specifying AVG or MAX as the third command line argument will control whether the plugins looks at the average or maximum value of the variable in the log file (default is average). This plugin will only check one of the two possible variables recorded by MRTG. If you want to monitor the first variable, specify 1 as the <column> argument. If you want to monitor the second variable, specify 2 as the argument. If the value of the specified variable exceeds the <vcl> threshold, a critical status is returned. If it exceeds the <vwl> threshold, a warning status is returned. The <label> argument is used in the output to identify what type of data is being monitored. Examples include Connections, "User Connections", "Processor Utilization", "Traffic In", etc. The optional [rate] argument is used to give the variable value som meaning. Examples include %, Packets/Sec, Bytes/Sec, "Errors Per Second", etc.

Notes:

Process Image Size Plugin (check_vsz)

Command Line Format:check_vsz <wsize> <csize> [command_name]
Manual Execution Example: check_vsz 100000 150000 betaprogram
Command Definition Example: command[check_vsz]=/usr/local/netsaint/libexec/check_vsz $ARG1$ $ARG2$ $ARG3$

This plugin will check for processes whose total image size (in bytes) exceeds the warning or critical thresholds given on the command line (<wsize> and <csize>, respectively). With no [command_name] specified, every command that shows up in the ps command is evaluated. Otherwise, only jobs with names matching the [command_name] argument are examined. This program is particularly useful if you have to run a piece of commercial software that has a potential memory leak and you want to watch its memory usage carefully.

Notes:

Swap Usage Plugin (check_swap)

Command Line Format:check_swap <wswap> <cswap>
Manual Execution Example: check_swap 100000 120000
Command Definition Example: command[check_swap]=/usr/local/netsaint/libexec/check_swap $ARG1$ $ARG2$

This plugin will check all the swap partitions on the local machine and return a warning or critical status if the percent of swap usage is above the <wswap> or <cswap> thresholds.

Notes:

Novell Server Statistics Plugin (check_nwstat)

Command Line Format:check_nwstat <host_address> [-p port] [-v variable] [-wv warn_value] [-cv crit_value] [-to to_sec]
Manual Execution Example: check_nwstat 192.168.1.5 -v LOAD5 -wv 80 -cv 95
Command Definition Example: command[check_nwstat]=/usr/local/netsaint/libexec/check_nwstat $HOSTADDRESS$ -v $ARG1$ -wv $ARG2$ -cv $ARG3$

This plugin allows you to monitor disk usage, connections, cache buffers, and LRU sitting time on your Novell servers. The plugin obtains server information by talking to the MRTGEXT NLM (distributed with James Drews' MRTG extension - see below) on the Novell server. The default port used to communicate with the server NLM is 9999. If the value for a given variable is higher than the specified critical threshold (or possibly lower - see note below), a critical status is returned. If the value is highter than the specified warning threshold (or possibly lower - see note below), a warning status is returned. Only one variable can be checked at a time. Valid variables are listed below. A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

Variable Description
LOAD1 1 minute load average
LOAD5 5 minute load average
LOAD15 15 minute load average
CONNS Number of licensed connections
LTCH Percentage of long term cache hits
CBUFF Number of total cache buffers
CDBUFF Number of dirty cache buffers
LRUM LRU sitting time in minutes
VPF<volume> Percent free space on volume <volume>
VKF<volume> KB of free space on volume <volume>

Notes:

Over-CR Collector Plugin (check_overcr)

Command Line Format:check_overcr <host_address> [-p port] [-v variable] [-wv warn_value] [-cv crit_value] [-to to_sec]
Manual Execution Example: check_overcr 192.168.1.5 -v LOAD5 -wv 80 -cv 95
Command Definition Example: command[check_overcr]=/usr/local/netsaint/libexec/check_overcr $HOSTADDRESS$ -v $ARG1$ -wv $ARG2$ -cv $ARG3$

This plugin allows you to monitor active network connections, uptime, running processes, disk usage, and processor load on remote servers. The plugin obtains server information by talking to Over-CR collector that runs on the remote server (see note below). The default port used to communicate with the Over-CR collector is 2000. If the value for a given variable is higher than the specified critical threshold (or possibly lower - see note below), a critical status is returned. If the value is highter than the specified warning threshold (or possibly lower - see note below), a warning status is returned. Only one variable can be checked at a time. Valid variables are listed below. A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

Variable Description
LOAD1 1 minute load average
LOAD5 5 minute load average
LOAD15 15 minute load average
DPU<filesys> Percent used disk space on file system filesys
PROC<process> Number of running processes with a name of process
NET<port> Number of active TCP/IP connection on port port
UPTIME System uptime in seconds

Notes:

Oracle Database Server Plugin (check_oracle)

Command Line Format:check_oracle <host_address>
Manual Execution Example: check_oracle 192.168.0.2
Command Definition Example: command[check_oracle]=/usr/local/netsaint/libexec/check_oracle $HOSTADDRESS$

This plugin will attempt to see if an Oracle database server on the specified host can be contacted. The plugin returns a critical status if the database server cannot be reached.

Notes:

PostgresQL Database Plugin (check_pgsql)

Command Line Format:check_pgsql [twarn] [tcrit] [host] [port] [db] [user] [password]
Manual Execution Example: check_pgsql 120 3600 192.168.0.1 5432 mydatabase
Command Definition Example: command[check_pgsql]=/usr/local/netsaint/libexec/check_pgsql 120 3600 $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$

This plugin will attempt to connect to the specified postgresQL database on the host. Connection refusals and timeouts result in a critical status. If the connection time exceeds the tcrit value in seconds, a critical status results. If the connection time exceeds the twarn value in seconds, a warning status results. All other errors result in an unknown status.

All arguments to this plugin are optional. The defaults are equivalent to "check_pgsql 120 3600 localhost 5432" and assume that the user that runs the plugin can connect to the database without a password.

Security Tip: If you use the [username] and [password] arguments in a command or service definition, you should take steps to ensure that this information does not end up getting displayed in the HTML pages that NetSaint generates!

Notes:

Log File Pattern Detector Plugin (check_log)

Command Line Format:check_log <log_file> <old_log_file> <pattern>
Manual Execution Example: check_oracle /var/log/messages /usr/local/netsaint/var/check_log.old.loginfailure 'LOGIN FAILURE'
Command Definition Example: command[check_log]=/usr/local/netsaint/libexec/check_log $ARG1$ $ARG2$

This plugin will scan a log file (specified by the log_file option) for a specific pattern (specified by the pattern option). Successive calls to the plugin script will only report new pattern matches in the log file, since an copy of the log file from the previous run is saved to old_log_file. The plugin returns a critical status if the log file cannot be located. The first time the plugin is executed it will initialize the data it needs and return with an ok status. Successive executions will return an OK status if no pattern matches are detected in the changes to the original log file. If one or more pattern matches are found, the plugin will return a CRITICAL status and print a string in the following format: (x) last_entry, where x is the total number of matches found and last_entry is the last matching entry from the log file.

Notes:

UPS Plugin (check_ups)

Command Line Format:check_ups <host_address> [-p port] [-u ups] [-v variable] [-wv warn_value] [-cv crit_value] [-to to_sec]
Manual Execution Example: check_ups 192.168.0.3 -u mybigups -v BATTPCT -wv 80 -cv 40
Command Definition Example: command[check_ups]=/usr/local/netsaint/libexec/check_ups $HOSTADDRESS$ -u $ARG1$ -v $ARG2$ -wv $ARG3$ -cv $ARG4$

This plugin attempts to determine the status of an UPS (Uninterruptible Power Supply) on a remote host (or the local host) that is being monitored with Russel Kroll's "Smart UPS Tools" package. If the UPS is online or calibrating, the plugin will return an OK state. If the battery is on it will return a WARNING state. If the UPS is off or has a low battery the plugin will return a CRITICAL state. You may also specify a variable to check (such as temperature, utility voltage, battery load, etc.) as well as warning and critical thresholds for the value of that variable. If the remote host has multiple UPS that are being monitored, you will have to use the ups option to specify which UPS to check. A critical status is returned if the host cannot be contacted within crit_time seconds (if the -ct option is supplied) and a warning status is returned if the host cannot be contacted within warn_time seconds (if the -wt option is supplied). A critical status is returned if the plugin cannot contact the host within the timeout period specified by the to_sec option (default is 10 seconds).

Variable Description
UTILITY The difference (absolute value) between 120.0 VAC and the voltage that is being supplied to the UPS via the utility line
BATTPCT Percent of battery charge remaining
LOADPCT Percent load being put on the UPS by the electronic devices attached to it
TEMP The temperature (in degrees Farenheit) of the UPS

Notes:

SSH Plugin Executor (check_by_ssh)

Command Line Format:check_by_ssh <user> <host> <command>
Manual Execution Example: check_by_ssh
Command Definition Example: command[check_by_ssh]=/usr/local/netsaint/libexec/check_by_ssh $ARG1$ $ARG2$ $ARG3$

This is not so much a plugin as it is a plugin wrapper. It basically allows you to execute plugins on a remote host by using SSH. The SSH username on the remote host is specified with the user argument, the address of the remote host is specified by the host argument, and the command that should be executed on the remote host is specified by the command argument.

Notes:

NetSaint Process Plugin (check_netsaint)

Command Line Format:check_netsaint <status_log> <expire_minutes> <process_string>
Manual Execution Example: check_netsaint /usr/local/netsaint/var/status.log 5 "/usr/local/netsaint/bin/netsaint -d /usr/local/netsaint/etc/netsaint.cfg"
Command Definition Example: command[check_netsaint]=/usr/local/netsaint/libexec/check_netsaint $ARG1$ $ARG2$ $ARG3$

This plugin is used to check the status of the NetSaint process on the local host. The plugin will check the contents of the status log (specified by the status_log argument) and make sure that the most recent entry is no older than the number of minutes specified by the expire_minutes argument. If the status log is older than this value, a warning state results. The plugin will also use the ps command to search for a running process that matches the process_string argument. If the plugin cannot locate a match of the process string, it assumes that NetSaint is not running and returns a critical state.

Notes: