I have the updated one attached.
But another question, am I able to use this:
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
Found in my nrpe config? Do I have to use an external script to monitor users on a Windows machine?
Using NRPE to Count Users Signed in Help
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE to Count Users Signed in Help
I see the problem
You have this
and what you need is this
You have this
Code: Select all
[/settings/external scripts/scripts]
allow nasty characters = 1
allow arguments=true
;check_user_count = check_user_count.bat
check_users=scripts\\perl\\check_users.exe $ARG1$ $ARG2$ "$ARG3$"
Code: Select all
[/settings/external scripts]
allow nasty characters = 1
allow arguments=true
[/settings/external scripts/scripts]
;check_user_count = check_user_count.bat
check_users=scripts\\perl\\check_users.exe $ARG1$ $ARG2$ "$ARG3$"
Re: Using NRPE to Count Users Signed in Help
Awesome so that worked for the -a flag error. But we are back at the original error when I run "./check_nrpe -H 192.168.0.99 -c check_users -a 2 3 'cadprod.com\administrator' ":
*******************
'query' is not recognized as an internal or external command,
operable program or batch file.
OK: 0 users logged in
Active Sessions:
********************
*******************
'query' is not recognized as an internal or external command,
operable program or batch file.
OK: 0 users logged in
Active Sessions:
********************
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE to Count Users Signed in Help
Can you run this from the windows command line?
Code: Select all
scripts\perl\check_users.exe 2 3 "cadprod.com\administrator"
Re: Using NRPE to Count Users Signed in Help
Same error:
'query' is not recognized as an internal or external command,
operable program or batch file.
OK: 0 users logged in
Active Sessions:
'query' is not recognized as an internal or external command,
operable program or batch file.
OK: 0 users logged in
Active Sessions:
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE to Count Users Signed in Help
Ok, you are getting the correct response at the nagios server then, now you have an issue with the plugin, you need to maybe run the help command or something on the plugin as to make sure you are passing the arguments properly.
Re: Using NRPE to Count Users Signed in Help
Thank you Scott but another question. I able to use this in my nrpe config file to monitor users on a Windows machine?
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE to Count Users Signed in Help
No that's not possiblehglod wrote:Thank you Scott but another question. I able to use this in my nrpe config file to monitor users on a Windows machine?
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10