Hi,
I've encountered an issue with the way Nagios processes external commands coming from snmptt,
Below is an example of SNMP traps sent from a Cisco router,
The traps come in by this order: badPattern -> Failed -> Available
But Nagios processes them like: badPattern -> Available -> Failed
I highly doubt this is an issue with how nagios is processing the traps, but instead the snmptrapd\tt daemons, although I could certainly be incorrect. The reason I believe this, is that snmptrapd puts new traps into files in a spool directory, snmptt then reaps these and acts accordingly which may or may not include sending to nagios, finally nagios displays the notifications in the order received. With that being said, I do not know if there is any control over how or the order that snmptt reaps files. If it is not taking them in order of date\time, and instead say just listing the directory and taking them as they come, I would completely understand this happening. However I know that when something is sent to the nagios.cmd file it should be processed in the order received, and such my reasoning for why it is not truly a nagios issue. However it would be great to know if we could alter how the files are reaped to ensure that this doesn't happen!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Hi sreinhardt,
I've read your comment but I have to disagree.
The log clearly shows the external commands (snmptt -> snmptraphandling.py -> nagios.cmd) arrive by the correct order:
Only then Nagios processes the check results in the wrong order.
My guess is that because both external commands were written at the same exact second (08:13:41) there was some mix up and the latter was processed later on.
Could you post the portion of snmptt.log that would correlate to these same three traps? As for debugging, this is an interesting one that we are going to have to think on for a little bit.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
OK thanks for the additional info. I am going to speak with our core dev who is in tomorrow and see if there is some logic that I am missing or should be added to handle these in the order submitted.
edit: just an update, the core dev confirmed my thinking that nagios.cmd (what receives from snmptt) should be processing in the order recieved. We are testing this internally to see what we can find.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Hard to say. We have a ton (100+) open feature requests and a dozen or so bug reports of varying importance. Looking at your ticket it seems it hasn't been claimed yet, but we just got a new dev so we'll see how the workload shifts.