Hi,
I am trying to monitor the number of MSMQ messages in a particular queue under XP.
On the Nagios server, from the command line, there is no issue:
/usr/local/nagios/libexec/check_nt -H hostname -p 12489 -v COUNTER -l '\MSMQ Queue(server\private$\ex10_incoming_queue)\Messages in Queue’
Returns the correct counter.
But if I put this in the windows.cfg file of Nagios like this:
check_counter!-l ‘\MSMQ Queue(server\private$\ex10_incoming_queue)\Messages in Queue’!10!20
It always return 0.
Looking at the NSC.log on the windows server, in the first case (from the command line), I have:
2008-10-13 17:15:52: debug:.\NSClientListener.cpp:168: Data: \MSMQ Queue(server\private$\ex10_incoming_queue)\Messages in Queue
In the second case (from within windows.cfg), I have:
2008-10-13 17:17:09: debug:.\NSClientListener.cpp:168: Data: \MSMQ Queue(server\private$\ex10_incoming_queue)\Messages in Queue$
Note the $ at the end.
the error message in the second case is:
2008-10-13 17:17:09: error:.\CheckSystem.cpp:998: ERROR: Counter not found: \MSMQ Queue(server\private$\ex10_incoming_queue)\Messages in Queue$: The specified counter was not found in the performance object.
So, obviously, a “$” is added in the case of the windows.cfg, which is the origin of the problem.
What should I change in the windows.cfg to avoid this trailing $ in the counter name sent to the Windows box???
Thanks in advance for any help you could provide me,
Laurent.