Linux Nagios Monitoring SNMP over time

I have setup Nagios under linux to monitor all our devices
I need to monitor our windows servers cpu load over SNMP.
I can do this, however, windows only reports the *Current* CPU Load, not a load average over time.
The problem with this, is there may be a process that is using 100% cpu at the instant that the snmp polls. Whereas I would like to take an average over say 5 minutes.
This would give a better indication that a runaway process is hogging the CPU.

Now, I have written a program/script that polls the server over x periods at y intervals and this works fine, however, nagios times out trying to run the process as normal processes return their results within 1 minute and I may need this script/process to wait for around 15 minutes

I can increase this limit by changing the service_check_timeout variable to allow a greater time than 60 seconds.
That solves the problem with nagios timing out the processes.

My problem is now, that normally nagios check processes, unlike my process, return quickly and don't stay active sleeping / waiting for each check to get an average.

I know this is a complicated problem, but I was simply wondering if you can somehow configure nagios to work with checks over time, or some other better way than this.

I DO NOT want to use the nagios service on our windows servers, ONLY SNMP.
DFPITCAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ashwin42Commented:
I used a work around for this issue wherein a shell script polls snmp regularly and stores the data in a flat file. Another external command which is run by nagios picks up that data and as per the period specified calculates the average from the flat file and then deletes the data which is not required any more.

for example. the script polls snmp every 10 seconds and stores the data in the flat file.
nagios runs an external command every five minutes which calculates the average and deletes the lines which were created before the external command was started.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DFPITCAuthor Commented:
I'm probably not going to bother doing this, but it is an acceptable solution, so thanks :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.