Page 1 of 1

Using External script.

Posted: Wed Dec 01, 2021 11:42 am
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")'

Re: Using External script.

Posted: Thu Dec 02, 2021 11:12 am
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")'

Re: Using External script.

Posted: Fri Dec 03, 2021 8:12 am
by RIDS_I2MP
NSC CLient ++ Version
2021-12-03_183655.png
Commands Output
2021-12-03_183655.png

Re: Using External script.

Posted: Mon Dec 06, 2021 5:04 am
by RIDS_I2MP
can you provide an update?

Re: Using External script.

Posted: Mon Dec 06, 2021 12:22 pm
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.