I have been using all my plugins from ITL templates…At this time there is a custom plugin check_cpu.sh which i wanted to use… I have downloaded check_cpu.sh plugin on client host from exchange under /usr/lib/nagios/plugins.
At this time how can we update the check_command syntax? when i do the check_cpu.sh help its coming as below
check_cpu.sh Revision 1.0 - CPU Utilization check script for Nagios
Usage: check_cpu.sh [flags]
Flags:
-w : Global Warning level in % for user/system/io-wait cpu
-uw : Warning level in % for user cpu
-iw : Warning level in % for IO_wait cpu
-sw : Warning level in % for system cpu
-c : Global Critical level in % for user/system/io-wait cpu
-uc : Critical level in % for user cpu
-ic : Critical level in % for IO_wait cpu
-sc : Critical level in % for system cpu
-i : Interval in seconds for iostat (default : 1)
-n : Number report for iostat (default : 3)
-h Show this page
Usage: check_cpu.sh
Usage: check_cpu.sh --help
but under ITL templates check_command & arguments are different approach as below.
object CheckCommand “cpu-utlization” {
command = [ PluginDir + “/check_cpu_usage” ]
arguments = {
"-w" = {
value = "$load_wload1$,$load_wload5$,$load_wload15$"
description = "Exit with WARNING status if load average exceeds WLOADn"
}
"-c" = {
value = "$load_cload1$,$load_cload5$,$load_cload15$"
description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
}
"-r" = {
set_if = "$load_percpu$"
description = "Divide the load averages by the number of CPUs (when possible)"
}
}
I want to understand how can i make these templates files (check_command syntax for check_cpu)?
I am also not able to understand for custom-pluggins where i should i add the checkcommand syntax?