Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_inivalue.pl
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
If the value is a number (float) it is possible to get performance data with a label defined by you.
This Plugin comes AS IS with ABSOLUTELY NO WARRANTY! You may redistribute copies of the plugin under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
check_inivalue.pl - HowTo:
-----------------------------------------------------
Usage: $PROGNAME [-i infile] [-s section] [-k key] [-o OK_Value] [-w or -W WARNING_Value] [-c or -C CRTICAL_Value ] [-l LABEL]
Options:
-i --infile STRING
Path and file name to the ini/config file.
-s --section STRING
String to identify the ini/config Section.
-k --key STRING
String to identify the key of the value.
-o --ok STRING
Value for OK.
-w --warning STRING
Value for WARNING.
-c --critical STRING
Value for CRITICAL.
-W --WarnFloat FLOAT
Threshold for WARNING.
-C --CritFloat FLOAT
Threshold for CRITICAL.
-l --label STRING
String for label the performance data.
-h --help
Using this option to show this help info.
Attention:
-i, -s and -k are necessary!
The options -o and/or -w and/or -c are necessary if you want to check for a string value.
If only -w or -c are defined all other values end in OK State.
If -o and/or -w are defined (not -c) all values other then in this defined options end in CRITICAL State.
If -o and -c are defined (not -w) all values other then in this defined options end in WARNING State.
If -o and -w and -c are defined all values other then in this defined options end in UNKNOWN State.
(While checking for a string the options --WarnFloat and --CritFloat will be ignored)!
The options -W and/or -C are necessary if you want to check for a float value.
If only -W is defined, all values higher or equal will end in WARNING State.
If only -C is defined, all values higher or equal will end in CRITICAL State.
If -W and -C are defined and the value is between, it end in WARNING State.
If the option for -W is higher then for -C :
A value higher then the option defined by -W end in OK State.
Is the value less or equal the option defined by -C it end in CRITICAL State.
(Do not use -o, -w and/or -c if you want to check for float values)!
[Command Definition Examples - start]
# 'check_inivalue_string' command definition
define command{
command_name check_inivalue_string
command_line /usr/lib/nagios/plugins/custom/check_inivalue.pl -i $ARG1$ -s $ARG2$ -k $ARG3$ -o $ARG4$ -w $ARG5$
}
# 'check_inivalue_float' command definition
define command{
command_name check_inivalue_float
command_line /usr/lib/nagios/plugins/custom/check_inivalue.pl -i $ARG1$ -s $ARG2$ -k $ARG3$ -W $ARG4$ -C $ARG5$ -l $ARG6$
}
[Command Definition Examples - end]
[Service Check Definition Examples - start]
# 'Ini Value String' service check definition
define service{
use local-service
host_name localhost
service_description Ini Value String
check_command check_inivalue_string!/data/example.ini!Server-01!Cluster!Primary!Secondary
}
# 'Ini Value Float' service check definition
define service{
use local-service
host_name localhost
service_description Ini Value Float
check_command check_inivalue_float!/data/example.ini!Server-02!Temp!28.5!33.5!Temperature
}
[Service Check Definition Examples - end]
[INI File Example - start]
[Server-01]
Cluster=Secondary
[Server-02]
Temp=34.7
[INI File Example - end]
[check_inivalue.pl Output Example - start]
WARNING: Cluster=Secondary
CRITICAL: Temp=34.7|Temperature=34.7;28.5;33.5;;
[check_inivalue.pl Output - end]
This Plugin comes AS IS with ABSOLUTELY NO WARRANTY! You may redistribute copies of the plugin under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
check_inivalue.pl - HowTo:
-----------------------------------------------------
Usage: $PROGNAME [-i infile] [-s section] [-k key] [-o OK_Value] [-w or -W WARNING_Value] [-c or -C CRTICAL_Value ] [-l LABEL]
Options:
-i --infile STRING
Path and file name to the ini/config file.
-s --section STRING
String to identify the ini/config Section.
-k --key STRING
String to identify the key of the value.
-o --ok STRING
Value for OK.
-w --warning STRING
Value for WARNING.
-c --critical STRING
Value for CRITICAL.
-W --WarnFloat FLOAT
Threshold for WARNING.
-C --CritFloat FLOAT
Threshold for CRITICAL.
-l --label STRING
String for label the performance data.
-h --help
Using this option to show this help info.
Attention:
-i, -s and -k are necessary!
The options -o and/or -w and/or -c are necessary if you want to check for a string value.
If only -w or -c are defined all other values end in OK State.
If -o and/or -w are defined (not -c) all values other then in this defined options end in CRITICAL State.
If -o and -c are defined (not -w) all values other then in this defined options end in WARNING State.
If -o and -w and -c are defined all values other then in this defined options end in UNKNOWN State.
(While checking for a string the options --WarnFloat and --CritFloat will be ignored)!
The options -W and/or -C are necessary if you want to check for a float value.
If only -W is defined, all values higher or equal will end in WARNING State.
If only -C is defined, all values higher or equal will end in CRITICAL State.
If -W and -C are defined and the value is between, it end in WARNING State.
If the option for -W is higher then for -C :
A value higher then the option defined by -W end in OK State.
Is the value less or equal the option defined by -C it end in CRITICAL State.
(Do not use -o, -w and/or -c if you want to check for float values)!
[Command Definition Examples - start]
# 'check_inivalue_string' command definition
define command{
command_name check_inivalue_string
command_line /usr/lib/nagios/plugins/custom/check_inivalue.pl -i $ARG1$ -s $ARG2$ -k $ARG3$ -o $ARG4$ -w $ARG5$
}
# 'check_inivalue_float' command definition
define command{
command_name check_inivalue_float
command_line /usr/lib/nagios/plugins/custom/check_inivalue.pl -i $ARG1$ -s $ARG2$ -k $ARG3$ -W $ARG4$ -C $ARG5$ -l $ARG6$
}
[Command Definition Examples - end]
[Service Check Definition Examples - start]
# 'Ini Value String' service check definition
define service{
use local-service
host_name localhost
service_description Ini Value String
check_command check_inivalue_string!/data/example.ini!Server-01!Cluster!Primary!Secondary
}
# 'Ini Value Float' service check definition
define service{
use local-service
host_name localhost
service_description Ini Value Float
check_command check_inivalue_float!/data/example.ini!Server-02!Temp!28.5!33.5!Temperature
}
[Service Check Definition Examples - end]
[INI File Example - start]
[Server-01]
Cluster=Secondary
[Server-02]
Temp=34.7
[INI File Example - end]
[check_inivalue.pl Output Example - start]
WARNING: Cluster=Secondary
CRITICAL: Temp=34.7|Temperature=34.7;28.5;33.5;;
[check_inivalue.pl Output - end]
Reviews (0)
Be the first to review this listing!