how to monitor the total number of processes in windows

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

how to monitor the total number of processes in windows

Postby h4doukeeN » Thu Feb 15, 2018 1:14 pm

Hi,

I would like to see how to monitor the total of processes in windows, for example by default in localhost comes check_local_procs! 250! 300! RSZDT. I would like to see if you can give me a hand for something similar but be able to count the processes of a windows server. I do not know if with the same check_nt it will be possible or if someone can guide me how to do it. Thank you very much and sorry for the English (google translator)

regards
h4doukeeN
 
Posts: 62
Joined: Wed Aug 09, 2017 9:32 am

Re: how to monitor the total number of processes in windows

Postby kyang » Thu Feb 15, 2018 5:04 pm

There are a number of ways. Finding a plugin from our Nagios Exchange site is probably the easiest.

I'll just reference one that I use which uses SNMP.
https://exchange.nagios.org/directory/P ... MP/details
My example of running it.
Code: Select all
[root@localhost libexec]# ./check_nproc_snmp 192.168.3.242 nagiosprivate 20 25
Critical - NProcs => 115


tasks.PNG
tasks.PNG (2.25 KiB) Viewed 319 times


Otherwise, there is a lot you can look at depending on your requirement.
https://exchange.nagios.org/directory/P ... /Processes

Do you have an agent? NRPE? NSClient++? NCPA?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1636
Joined: Tue Jul 25, 2017 3:35 pm

Re: how to monitor the total number of processes in windows

Postby h4doukeeN » Thu Feb 15, 2018 5:16 pm

kyang wrote:There are a number of ways. Finding a plugin from our Nagios Exchange site is probably the easiest.

I'll just reference once that I use which uses SNMP.
https://exchange.nagios.org/directory/P ... MP/details
My example of running it.
Code: Select all
[root@localhost libexec]# ./check_nproc_snmp 192.168.3.242 nagiosprivate 20 25
Critical - NProcs => 115


tasks.PNG


Otherwise, there is a lot you can look at depending on your requirement.
https://exchange.nagios.org/directory/P ... /Processes

Do you have an agent? NRPE? NSClient++? NCPA?


I have NSclient



[root@localhost plugins]# ./check_nproc_snmp 10.10.10.30 public 300 500
Timeout: No Response from 10.10.10.30.
./check_nproc_snmp: línea 17: [: -ge: se esperaba un operador unario
./check_nproc_snmp: línea 24: [: -ge: se esperaba un operador unario
./check_nproc_snmp: línea 29: [: -lt: se esperaba un operador unario
[root@localhost plugins]#
h4doukeeN
 
Posts: 62
Joined: Wed Aug 09, 2017 9:32 am

Re: how to monitor the total number of processes in windows

Postby npolovenko » Thu Feb 15, 2018 5:25 pm

@h4doukeeN

I have NSclient

Then use either this command if you use NSClient + NRPE:

Code: Select all
./check_nrpe -H windows_server_ip -c check_process


Or this command if you use NSCLient check_nt:

Code: Select all
./check_nt -H windows_server_ip  -p 12489 -s 'Str0ngP@ssw0rd' -v PROCSTATE -l spoolsv.exe -d SHOWALL
User avatar
npolovenko
Support Tech
 
Posts: 1518
Joined: Mon May 15, 2017 5:00 pm

Re: how to monitor the total number of processes in windows

Postby h4doukeeN » Mon Feb 19, 2018 12:06 pm

Hello, I have managed to integrate the process enumeration, but I have a problem with only one server and it is as if I did not have the NCPA agent installed, but if it is, I can monitor the memory in all the servers that have it and list the processes in all the servers that I have it except in one and I do not know what is the reason that throws me "UNKNOWN"

Image



Code: Select all
#  'check_ncpa.py' definicion de comando
define command{
         command_name    check_ncpa
         command_line    $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
        }


Code: Select all
define service{
        use                     generic-service
        host_name               01-Sv-10.68
        service_description     Numero Procesos
        check_command           check_ncpa!-t public -P 5693 -M processes -w 1000 -c 1100
        check_interval          0.1
        retry_interval          1
        notification_interval   1
        max_check_attempts      1
        }
h4doukeeN
 
Posts: 62
Joined: Wed Aug 09, 2017 9:32 am

Re: how to monitor the total number of processes in windows

Postby h4doukeeN » Mon Feb 19, 2018 1:38 pm

when typing script by console the same problem is maintained for the server 10.10.10.68, but when using another ip as in this case the 10.10.10.69 works without problems

Image

h4doukeeN wrote:Hello, I have managed to integrate the process enumeration, but I have a problem with only one server and it is as if I did not have the NCPA agent installed, but if it is, I can monitor the memory in all the servers that have it and list the processes in all the servers that I have it except in one and I do not know what is the reason that throws me "UNKNOWN"

Image



Code: Select all
#  'check_ncpa.py' definicion de comando
define command{
         command_name    check_ncpa
         command_line    $USER1$/check_ncpa.py -H $HOSTADDRESS$ $ARG1$
        }


Code: Select all
define service{
        use                     generic-service
        host_name               01-Sv-10.68
        service_description     Numero Procesos
        check_command           check_ncpa!-t public -P 5693 -M processes -w 1000 -c 1100
        check_interval          0.1
        retry_interval          1
        notification_interval   1
        max_check_attempts      1
        }
h4doukeeN
 
Posts: 62
Joined: Wed Aug 09, 2017 9:32 am

Re: how to monitor the total number of processes in windows

Postby npolovenko » Mon Feb 19, 2018 5:06 pm

@h4doukeeN, Can you put processes in a single quotes and then try to run the command locally one more time?
Code: Select all
./check_ncpa.py -H <ncpaserver> -t mytoken -M 'processes' --warning=100 --critical=200

What version of NCPA is installed on that server? Can you upload the ncpa.cfg config here?
Also, did you try running the command with a verbose flag?
User avatar
npolovenko
Support Tech
 
Posts: 1518
Joined: Mon May 15, 2017 5:00 pm

Re: how to monitor the total number of processes in windows

Postby h4doukeeN » Tue Feb 20, 2018 10:28 am

hello, the NCPA version is 2.1.1, attached image with the command executed for server 68 and 69 plus both cfg

ncpa-servidor68.cfg
(7.55 KiB) Downloaded 21 times

ncpa-servidor69.cfg
(7.55 KiB) Downloaded 14 times


Image

npolovenko wrote:@h4doukeeN, Can you put processes in a single quotes and then try to run the command locally one more time?
Code: Select all
./check_ncpa.py -H <ncpaserver> -t mytoken -M 'processes' --warning=100 --critical=200

What version of NCPA is installed on that server? Can you upload the ncpa.cfg config here?
Also, did you try running the command with a verbose flag?
h4doukeeN
 
Posts: 62
Joined: Wed Aug 09, 2017 9:32 am

Re: how to monitor the total number of processes in windows

Postby npolovenko » Wed Feb 21, 2018 5:20 pm

If you encounter problems with the plugin, you can use the -v argument to enable verbose output of problems. There is also a -D argument that enables debugging output.

@h4doukeeN, We should try that. Please run the command locally against the .68 server and add the -v argument at the end, also try the -D argument for debugging.
Can you put the word processes in single quotes and then try the command?
Do both servers have the same version of NCPA agent?
On the .68 server you may check out the log files in C:\Program Files (x86)\Nagios\NCPA\var\log\ directory. You might find something useful.
User avatar
npolovenko
Support Tech
 
Posts: 1518
Joined: Mon May 15, 2017 5:00 pm

Re: how to monitor the total number of processes in windows

Postby h4doukeeN » Thu Feb 22, 2018 9:17 am

npolovenko wrote:
If you encounter problems with the plugin, you can use the -v argument to enable verbose output of problems. There is also a -D argument that enables debugging output.

@h4doukeeN, We should try that. Please run the command locally against the .68 server and add the -v argument at the end, also try the -D argument for debugging.
Can you put the word processes in single quotes and then try the command?
Do both servers have the same version of NCPA agent?
On the .68 server you may check out the log files in C:\Program Files (x86)\Nagios\NCPA\var\log\ directory. You might find something useful.



Hello, when you put -v -D it throws the following in the server 68, in the 69 it executes the command without problems. The command is also sent with single quotes and the same goes without quotation marks. Regarding the version of NCPA 2.1.1 is the same for all the servers I installed them myself

Image
h4doukeeN
 
Posts: 62
Joined: Wed Aug 09, 2017 9:32 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: Ravikimt and 27 guests