Check_winprocess.exe
Check_winprocess.exe
Hi, im using Nagios XI and i need to do a passive checks from a windows 7 host.
To do that i use NRDS client, now i need to check if some process exist or not, for example "CMD.exe" and if exist say "OK" and if not say "Critical"
Can anyoone explain me what i have to type to do that?
that is my example and dosent work...
command[process_CMD]= .\plugins\check_winprocess.exe --filter "imagename eq cmd.exe" --compare le --critical 0
Thx a lot
To do that i use NRDS client, now i need to check if some process exist or not, for example "CMD.exe" and if exist say "OK" and if not say "Critical"
Can anyoone explain me what i have to type to do that?
that is my example and dosent work...
command[process_CMD]= .\plugins\check_winprocess.exe --filter "imagename eq cmd.exe" --compare le --critical 0
Thx a lot
Re: Check_winprocess.exe
Did you reference this document when setting up NRDS? It describes the process pretty efficiently:
https://labs.nagios.com/2014/07/31/how- ... nagios-xi/
You might also consider using NCPA to submit your passive checks since NCPA is a bit more modern and in active development:
https://assets.nagios.com/downloads/ncp ... g_NCPA.pdf
https://labs.nagios.com/2014/07/31/how- ... nagios-xi/
You might also consider using NCPA to submit your passive checks since NCPA is a bit more modern and in active development:
https://assets.nagios.com/downloads/ncp ... g_NCPA.pdf
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Check_winprocess.exe
i already use NRDS and works excellent with some plugins like check_log.exe, but i cant configure check_winprocess.exe as well...
so maybe someone can say me what i need to type in the config.ini (nrds) to check if one process exist or not..
so maybe someone can say me what i need to type in the config.ini (nrds) to check if one process exist or not..
Re: Check_winprocess.exe
Can you run your sample command from the command prompt and share it's output? This will help us in figuring out what is going wrong with the command itself (if anything).
The basic syntax looks correct. Here's the output I get from my sample command for Google Chrome processes:
And if I kill off the Chrome processes:
The basic syntax looks correct. Here's the output I get from my sample command for Google Chrome processes:
Code: Select all
C:\Program Files\NSClient++\scripts>check_winprocess.exe --filter "imagename eq chrome.exe" --compare le --critical 0
PROCESS OK - 3 process(es)|processes=3;;0;Code: Select all
C:\Program Files\NSClient++\scripts>check_winprocess.exe --filter "imagename eq chrome.exe" --compare le --critical 0
PROCESS CRITICAL - 0 process(es)|processes=0;;0;Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Check_winprocess.exe
I dont now how to do that.mcapra wrote:Can you run your sample command from the command prompt and share it's output?
If you guide me, i can share that information.
ty
Re: Check_winprocess.exe
Can you post your full config.ini file so we can review it?
Also, the first time a new check is run on the remote host, you will have to configure it in the XI web interface.
If you login to the XI GUI and go to the Admin > Unconfigured Objects menu, so you see that service there?
If so, click in it to configure it, then the XI server will start to monitor it after that.
Also, the first time a new check is run on the remote host, you will have to configure it in the XI web interface.
If you login to the XI GUI and go to the Admin > Unconfigured Objects menu, so you see that service there?
If so, click in it to configure it, then the XI server will start to monitor it after that.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_winprocess.exe
This is my config.ini
[settings]
CONFIG_VERSION=0
CONFIG_NAME=
URL="My IP"
TOKEN=1234567
PLUGIN_DIR=C:\Program Files\Nagios\NRDS_Win\plugins
UPDATE_CONFIG=1
UPDATE_PLUGINS=1
LOG_FILE=C:\Program Files\Nagios\NRDS_Win\logs\NRDS_debug.log
[services]
#<check_name> = <path location\file name> <check arguments>
Time = .\plugins\check_windows_time.bat 192.168.230.69 180 300
#<check_name> = <path location\file name> <check arguments>
LOG = .\plugins\check_log3.exe -s NUL -l "C:\ISALtda\PTPOS\terminal.properties" -p "usa_controladora=[Ss]i" --negate -c 1
#<check_name> = <path location\file name> <check arguments>
command[process_CMD]= .\plugins\check_winprocess.exe --filter "imagename eq cmd.exe" --compare le --critical 0
[extensions]
vbs = cscript //nologo $CHECK_COMMAND$
ps1 = powershell -ExecutionPolicy Bypass -File $CHECK_COMMAND$
Can you post your full config.ini file so we can review it?
[settings]
CONFIG_VERSION=0
CONFIG_NAME=
URL="My IP"
TOKEN=1234567
PLUGIN_DIR=C:\Program Files\Nagios\NRDS_Win\plugins
UPDATE_CONFIG=1
UPDATE_PLUGINS=1
LOG_FILE=C:\Program Files\Nagios\NRDS_Win\logs\NRDS_debug.log
[services]
#<check_name> = <path location\file name> <check arguments>
Time = .\plugins\check_windows_time.bat 192.168.230.69 180 300
#<check_name> = <path location\file name> <check arguments>
LOG = .\plugins\check_log3.exe -s NUL -l "C:\ISALtda\PTPOS\terminal.properties" -p "usa_controladora=[Ss]i" --negate -c 1
#<check_name> = <path location\file name> <check arguments>
command[process_CMD]= .\plugins\check_winprocess.exe --filter "imagename eq cmd.exe" --compare le --critical 0
[extensions]
vbs = cscript //nologo $CHECK_COMMAND$
ps1 = powershell -ExecutionPolicy Bypass -File $CHECK_COMMAND$
Can you post your full config.ini file so we can review it?
Im already do it, the service work find, but i got problems with the report of "Check_winprocess.exe" i need they show me "OK" if the process are runninig and critical if process isn't.tgriep wrote:Also, the first time a new check is run on the remote host, you will have to configure it in the XI web interface.
If you login to the XI GUI and go to the Admin > Unconfigured Objects menu, so you see that service there?
If so, click in it to configure it, then the XI server will start to monitor it after that.
Re: Check_winprocess.exe
I tested that command like your example and it worked for me like it should.
Can you post a screen capture of what you are seeing in the XI GUI?
Can you post a screen capture of what you are seeing in the XI GUI?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_winprocess.exe
Without a cmd process running it show me ok 1 process

When i have 1 cmd process running in nagios show me 2 ok.

So, never show me critical...

When i have 1 cmd process running in nagios show me 2 ok.

So, never show me critical...
Re: Check_winprocess.exe
I tested that command using notepad.exe and it worked.
What I am guessing is that when the plugin is ran, is spawns a command prompt to run it and that is why you always see 1 process.
Try changing the critical threshold to 1 and you should get the outcome you are looking for.
What I am guessing is that when the plugin is ran, is spawns a command prompt to run it and that is why you always see 1 process.
Try changing the critical threshold to 1 and you should get the outcome you are looking for.
Be sure to check out our Knowledgebase for helpful articles and solutions!