Question

I have setup MRTG-rrdtools-routers2.cgi and setup working fine and happy as a beginner :)

I have set 'ThreshDir:', 'ThreshMinI' and 'ThreshProgI' in MRTG cfgs. At the first run my script in 'ThreshProgI' is run without any issue but it not going to run in the next 5 minutes runs.

I see that in the 'ThreshDir:' location, there is a file generate at at first MRTG run. If I remove that file then my script in 'ThreshProgI' will run in the next MRTG run.

So far what I notice here is that after generating the 'ThreshDir:' file, 'ThreshProgI' will stop working in my setup. What could be the reason for this, how can I make 'ThreshProgI' run every 5 minutes (when 'ThreshMinI' fails).

Was it helpful?

Solution

This is by design.

MRTG only runs the threshold program on the FIRST time the threshold is broken, and not on the following runs, until it recovers. The last status is held in the ThreshDir in order to manage this.

There is another definition for a threshold program to run on recovery.

The only way to trick MRTG into running the threshold program on every run regardless of the previous status, is to delete the status history file in the ThreshDir each pass (as you are doing).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top