» IT tipps and howto's
Nagios Plugin: Check Confixx License
Last Update 03. April 2010
This is a plugin to monitor the license of a Confixx installation in Nagios. Its written in shell
so it should run on almost all Linux/Unix based systems. To be able to use the
script, please also check the requirements.
 |
check_confixxlicense
Download plugin and save it in your Nagios plugin folder (e.g. /usr/local/nagios/libexec)
178 downloads so far... |
Version History
20100402 Started Script programming
20100403 Small Bugfixes in Output
Requirements
- The following shell commands must exist and be executable by your Nagios user: mysql, grep, cut
- The SQL-user must have at least SELECT rights for the table register in database confixx
Definition of the parameters:
-H Hostname or IP address of Server to check
[-P] Port on which SQL server listens (default is 3306) OPTIONAL
-u SQL-Username (needs Select Rights on confixx.register)
-p Password for SQL-User
[-d] Name of Confixx Database (default is confixx) OPTIONAL
[-w] How many days before end of license do you want the warning OPTIONAL
[-c] How many days before end of license do you want the critical OPTIONAL
--help Help text for correct use of this script
------
Command definition in your commands.cfg without optional parameters:
# 'check_confixxlicense' command definition
define command{
command_name check_confixxlicense
command_line $USER1$/check_confixxlicense -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}
Service checks without optional parameters:
# Check Confixx License
define service{
use generic-service
host_name host1
service_description Confixx License
check_command check_confixxlicense!nagios!sqlpassword
}
Note: If no warning or critical thresholds are set, the plugin checks for
the current validity and returns OK. If the license is not valid anymore, the
plugin will send a CRITICAL notification.
------
Command definition in your commands.cfg with optional parameters:
# 'check_confixxlicense' command definition
define command{
command_name check_confixxlicense
command_line $USER1$/check_confixxlicense -H $HOSTADDRESS$ -P $ARG1$ -u $ARG2$ -p $ARG3$ -d $ARG4$ -w $ARG5$ -c $ARG6$
}
Service checks with warning and critical thresholds:
# Check Confixx License
define service{
use generic-service
host_name host1
service_description Confixx License
check_command check_confixxlicense!3306!nagios!sqlpassword!confixx!10!5
}
Note: This will connect to the SQL-Server using port 3306 and connect to
database confixx with user nagios and password sqlpassword. The check will send
a warning 10 days before end of license and a critical 5 days before end of
license.
------
Nagios Screenshots:

Status OK (Confixx License still valid for 186 days)

Warning threshold set to 188 days -> Warning

Critical threshold set to 187 days -> Critical
|