Check_nrpe send command with parameter

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
StanicaVlad
Posts: 1
Joined: Thu Oct 27, 2022 5:03 am

Check_nrpe send command with parameter

Post by StanicaVlad »

Hello everyone,

I need to call a script directly without showing it in the nagios monitoring.

get_log_transactions.sh

Code: Select all

#!/bin/bash

if [[ $# -gt 0 ]]
then
  echo "Parameter $1 received"
else
  echo "No parameter received"
fi

exit 0
In nrpe.cfg on remote I have this command:

Code: Select all

command[get_log_transactions]=/opt/nagios/libexec/IM/get_log_transactions.sh
This remote is listening from X server for example

And from X server when I try to run:

Code: Select all

./check_nrpe -H X -c get_log_transactions -a 'test'
No parameter received
What am I doing wrong?
Thank you.
Post Reply