freeBSD nagios CPU

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gsuwal
Posts: 1
Joined: Sun Sep 25, 2011 10:05 am

freeBSD nagios CPU

Post by gsuwal »

Hi all,

I am not being able to monitor CPU of freeBSD machine from my

CentOS server. I have used check_aix_cpu but always gives garbage

value, seems wrong in scripting.

i want to monitor CPU usage of my freeBSD machine from my centOS

server. I am able to monitor many services of that machine like

mailq, processes, free space, uptime but not CPU.

Kindly please help.

Regards,
Franklin
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: freeBSD nagios CPU

Post by nscott »

Franklin,

If you've tried other plugins and they don't work for you perhaps its a good time to right your own, this should get you started:

Code: Select all

sar -p | tail -2 | head -1 | awk '{ print 100-$9 }'
That will return 100 - CPU Idle would would give CPU load time on that machine, and I believe that will work on most *nix systems. All you'd have to do is return that value, and if you wanted to get fancy you could add critical/warning values.
Nicholas Scott
Former Nagios employee
Locked