Page 1 of 1

freeBSD nagios CPU

Posted: Sun Sep 25, 2011 10:09 am
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

Re: freeBSD nagios CPU

Posted: Mon Sep 26, 2011 12:10 pm
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.