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?
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.