How to run custom scripts using NRPE agent?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
saasuser
Posts: 2
Joined: Thu Nov 21, 2013 9:59 am

How to run custom scripts using NRPE agent?

Post by saasuser »

Hi

Appreciate if someone can share their knowledge on setup /process involved in executing custom scripts using NRPE setup in Nagios XI environment?

scenario:
Want to track Active MQ store usage or Queu message count on ActiveMQ Server.

1. I have some custom scripts that I can run on active mq server to get Active MQ store usage and Queue count,

2. What I need to do get to those metrics in to my Nagios XI server?

Thanks in advance for your time and info.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to run custom scripts using NRPE agent?

Post by tmcdonald »

Nagios expects a specific format for check results. Have you looked at the Nagios Plugins Development Guidelines?
Former Nagios employee
saasuser
Posts: 2
Joined: Thu Nov 21, 2013 9:59 am

Re: How to run custom scripts using NRPE agent?

Post by saasuser »

Thanks for the quick reply. I did not, I will go through that doc.

Appreciate if you can share your thoughts on :
- Share an example (both client(server we monitor) and server(Nagios server) or implementation steps that one need to do on Nagios Server and on Client (monitored server) to achieve custom scripts implementation in NagiosXI.

-Regards,
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to run custom scripts using NRPE agent?

Post by tmcdonald »

A custom script can actually be extremely short. It really only needs to exit with a code of 0 for OK, 1 for WARNING, 2 for CRITICAL, or 3 for UNKNOWN. You can output an optional informational message (human-readable) and performance data, but only the exit code is required. As for client-side vs server-side checks, they really only differ in that client checks are usually used when firewalls are an issue, or when you need to expose internal metrics of a system (CPU, memory, etc) that is not available outside of that machine.
Former Nagios employee
Locked