Adding perfmon counters using nrpe and centreon

In this little tutorial a detailed description on how to succesfully monitor and add various windows counters using the check_nrpe command and the NSClient++ agent for windows using the Centreon configuration and Monitoring GUI for Nagios. Yup, its all open source, and free for usage…

First Create a Command Definition inside Centreon that looks like this. Naturally alter the globals to fit inside your organisation.

Notice the Argument example, when you test it in this form you might also notice that you get a valid response from the server. Sadly this argument will not work inside the service definition.

Next Create a Service definition that utilizes this check command to check a specific counter. In my example i am using the MSExchange OWA\Total Users counter that is part of the new Exchange 2007 Perfmon counters. It will not work with a older exchange version. Use Perfmon on the destination machine to locate the right counters for your organisation.

Notice the difference in the passed Argument. To make this check command work you need to slightly alter the argument because the application is making the strings “save” when these settings are stored. The result is that some of the characters will be escaped. This can luckly be countered by participating this behavior.

We need the check_nrpe binairy to parse the escaped characters as literals and make centreon believe that we have already escaped the unsafe chars by adding slashes to each present slash, and add a double qoute at the start and the end to make check_nrpe binary parse the argument correctly. The outcome should look somewhat like this.

If this is the counter you want to check, and lets make it chalanging🙂


\MSExchangeTransport Queues(_total)\Messages Queued For Delivery

Then the service argument for $ARG1$ in my example should look like this inside the Centreon service definition.


!\"\\MSExchangeTransport Queues(_total)\\Messages Queued For Delivery\"!(ARG2)!(ARG3)!

The result will be the following.

I hope this will help you tackle the “Counter” chalanges that Centreon will present when using the NSCLient++ and Check_NRPE commands.

Tools used in this setup

NSClient++ for Windows (32Bit / 64Bit) Using the NRPE option instead of the NS option.
http://nsclient.org/nscp/downloads

NSClient manual for Check_Counter
http://nsclient.org/nscp/wiki/CheckCounter

NSC.Ini file that we used on our remote machines (do add your nagios server IP to the allowed hosts section)
NSC.ini (Rename it by removing the .doc part or simply copy paste its contence)

Check_nrpe Command.
http://www.rpmfind.net/linux/rpm2html/search.php?query=check_nrpe

About Chris Gralike

Momenteel ben ik manager van de afdeling business continuity bij de zakelijke IT dienstverlener AMIS Services BV. Sinds 2003 ben ik actief in de ICT branche. Tussen 2003 en nu heb ik verschillende rollen vervuld. In de rollen: systeem- en netwerkbeheer, system engineer, servicemanager en nu practice manager ben ik in contact gekomen met uiteenlopende technologieën, methodologieën, ideeën, oplossingen en innovaties. Een rijke ervaring waarmee ik de klanten van Conclusion en AMIS elke dag probeer te ondersteunen. Mijn credo: 'Altijd opzoek een win-win tussen business en technologie.'

Posted on November 25, 2009, in centreon, Linux, Linux Commands, Nagios / Centreon, Network Monitoring, PHP and tagged , , , , , , , , , , , , , . Bookmark the permalink. 1 Comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: