Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using nagios for monitoring and nagiosgraph for charting. I would like to issue an alert based on history (for example if the measurement value changed since last reading).

I've read that it is not wise to store historical information in a plugin, probably because of the possible scheduling issues. So what is the best way to implement such measurements?

share|improve this question
    
measurement of what exactly? cpu/mem is pretty easy –  pablo Feb 11 '11 at 11:11
    
app specific measurements. Most of the time I'm writing my own plugins that communicate with Nagios over NRPE. The question is how to access values of previous measerements. –  sumek Feb 11 '11 at 11:20

1 Answer 1

The only possibility I see is writing your measured values to a file and compare the actual ones with the previous ones stored in the measured data file.

I don't do what you are trying to do, but something similar.

On system startup I start some scripts that run in a non-terminating loop collecting values (temperatures and Air Conditioning data) and store these values every 1 minute in a file. Nagios checks this file with a plugin I wrote.

You could write your nagios plugin to compare using the last 2 lines in your data file and give a return value to nagios based on that comparison.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.