Using External script.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Using External script.

Post by RIDS_I2MP »

Hi Team,

We have created a script to fetch logged in users details and we are passing arguments(user names) through nagios commad.
We have made script in a way if a personal name is not present in the argument list and that user logs in then we should get critical alert.
It is a PowerShell script for windows server and we are using NSC client. When we are executing script on windows server it is giving proper results
not able fetch arguments executing it from nagios. We are not getting alert as critical always.

Attaching script:
Untitled8.zip
Attaching changes made on NSC configuration file:
Untitled8.zip
Command executing on nagios server.
/usr/local/nagios/libexec/check_nrpe -2 -H 10.148.156.30 -t 30 -c check_users -a '@("gautam.s","rashi.kansara","kanhaiyadas.m")'
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Using External script.

Post by ssax »

It looks like you're using an old version of NSClient++, what version is listed next to NSClient++ on the remote system in Add/Remove programs in the Control Panel?

Send us the full output of these commands:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -V
/usr/local/nagios/libexec/check_nrpe -2 -H 10.148.156.30
/usr/local/nagios/libexec/check_nrpe -2 -H 10.148.156.30 -t 30 -c check_users -a '@("gautam.s","rashi.kansara","kanhaiyadas.m")'
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Using External script.

Post by RIDS_I2MP »

NSC CLient ++ Version
2021-12-03_183655.png
Commands Output
2021-12-03_183655.png
You do not have the required permissions to view the files attached to this post.
Thanks & Regards,
I2MP Team.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Using External script.

Post by RIDS_I2MP »

can you provide an update?
Thanks & Regards,
I2MP Team.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Using External script.

Post by ssax »

Tickets/posts are answered in the order they are received, they also have a one business day response time. You can see our hours of operation here:

https://www.nagios.com/contact/

What does the nsclient.log show on the remote system when that check fails?

I would upgrade the remote agent as it's using a really old version:

https://nsclient.org/download/

Then try again and see if that resolves it.
Locked