CPU usage for Solaris, Linux and Windows

check_cpu_usage

  • Get the CPU Usage for Windows, Solaris and Linux servers.
  • Perfomance data can be graphed with pnp4nagios using the template.
  • Works for MS Windows, Solaris and Linux servers

Sample command definition:

define command{
       command_name     check_cpu_usage
       command_line /usr/lib/nagios/ops_plugins/check_cpu_usage -H $HOSTADDRESS$ -C $ARG1$ -w $ARG2$ -c $ARG3$
       }

The syntax:

check_cpu_usage -H |--hostname= [-C |--community=] [-v <1|2c>|--snmpversion=<1|2c>] [-t |--timeout=] [-n|--noperfdata] [-w |--warning=] [-c |--critical=]

or

check_cpu_usage -h|--help

or

check_cpu_usage -V|--version

This plugin check the CPU usage of solaris, linux and windows servers

-h|--help                               Print detailed help screen
-V|--version                            Print version information
-H |--hostname=             Hostname/IP-Adress to use for the check.
-C |--community=  SNMP community that should be used to access the switch.
                                        Default: public
-n|--noperfdata                         Don't print performance data.
-t |--timeout=        Seconds before plugin times out.
                                        Default: 60
-v <1|2c>|--snmpversion=<1|2c>          SNMP version details for command-line debugging (can repeat up to 3 times)
                                        Default: 1
-w |--warning=    Warning threshold in percent.
                                        Default: 80
-c |--critical=   Critical threshold in percent.
                                        Default: 90

Something about the perfdata template. This template includes a control break. You will always have 4 cpus in on graph with 4 different colors.If you wanna change it you have to play aorunt with $counter1 and $counter2 in the template.