Anyway, you know this particular entry in the nagios.cfg file:
Code: Select all
# USE RETAINED PROGRAM STATE
# This setting determines whether or not Nagios will set
# program status variables based on the values saved in the
# retention file. If you want to use retained program status
# information, set this value to 1. If not, set this value
# to 0.
use_retained_program_state=1
So what I'm thinking is that if Nagios is restarted with this is set to 0, next_comment_id is not always set properly based on the highest comment_id in the retention.dat file (I'm assuming it should do that) but instead will be set back to 1. What makes it more odd is that I'm positive next_comment_id wasn't always resetting when we restarted Nagios which is why we were having issues tracking it down.
I'm going to keep it running for another ~24 hours and if it still doesn't reset then I think that's what the problem was. I feel kind of stupid now after finding that, although I guess it's all worth it if this has identified a small bug.