Monitor process CPU and Memory utilization
Monitor process CPU and Memory utilization
I have a process that according to the application vendor support is using too much memory > 2GB. I am running the NSClient++ and cannot for the life of me figure out how on Windows I can monitor this process and be alerted when this process goes about my threshold. In this case I would want notified if this process consumed more than 1.5GB of RAM and consumed more than 55% of CPU. If I look at the Task Manager I can see the Processes and CPU|Memory|Disk|Network etc just not sure how I can get Nagios to read these and monitor processes CPU and Memory utilization. The performance graphs that Nagios would track would be awesome as well for reporting to prove that this is or is not the root cause of our issues.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitor process CPU and Memory utilization
I think I'm missing something. The Windows wizard does both Memory and CPU. What have you tried, and what isn't working?
Also, if you want to run more advanced checks from NSClient, I think https://assets.nagios.com/downloads/nag ... ios-XI.pdf will be useful.
Also, if you want to run more advanced checks from NSClient, I think https://assets.nagios.com/downloads/nag ... ios-XI.pdf will be useful.
-
SteveBeauchemin
- Posts: 524
- Joined: Mon Oct 14, 2013 7:19 pm
Re: Monitor process CPU and Memory utilization
You may want to use this as an example. I grabs a process by name. Use the Task Manager - Processes column - Image Name.
Gives me this response
I have the Service defined like this
The NSClient++ version used is
I cannot get it to work on chrome.exe. So I need to learn more.
I hope this helps.
Steve B
Code: Select all
./check_nrpe -H [a MS host] -c Check_Process -a process=conhost.exe "detail-syntax=%(exe) ws:%(working_set), handles: %(handles), user time:%(user)s" "top-syntax=%(status): %(problem_list)" "warn=working_set gt 3m" "crit=working_set gt 4m"
Code: Select all
WARNING: conhost.exe ws:3252224, handles: 32, user time:0s, conhost.exe ws:3289088, handles: 35, user time:0s, conhost.exe ws:3735552, handles: 31, user time:0s, conhost.exe ws:3674112, handles: 29, user time:0s|'conhost.exe ws_size'=3.10156MB;3;4 'conhost.exe ws_size'=3.13671MB;3;4 'conhost.exe ws_size'=2.98046MB;3;4 'conhost.exe ws_size'=3.5625MB;3;4 'conhost.exe ws_size'=3.5039MB;3;4
Code: Select all
Command view:
$USER1$/check_nrpe -2 -t 60:3 -H $HOSTADDRESS$ -c $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$ $ARG8$Code: Select all
$ARG1$ = Check_Process
$ARG2$ = -a process=[your process]
$ARG3$ = "detail-syntax=%(exe) ws:%(working_set), handles: %(handles), user time:%(user)s"
$ARG4$ = "top-syntax=%(status): %(problem_list)"
$ARG5$ = "warn=working_set gt 3m"
$ARG6$ = "crit=working_set gt 4m"Code: Select all
./check_nrpe -H [MS Host]
I (0.5.0.62 2016-09-14) seem to be doing fine...
I hope this helps.
Steve B
Last edited by SteveBeauchemin on Mon Jun 26, 2017 4:21 pm, edited 1 time in total.
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitor process CPU and Memory utilization
@jkinning, for clarity, Steve's suggestion requires NRPE to be a part of your NSClient, using something like https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Thanks Steve!
Thanks Steve!
Re: Monitor process CPU and Memory utilization
Excellent! This is exactly what I was looking for. I have tested this out and it is working like a charm.
Thanks again and you can close this thread.
Thanks again and you can close this thread.
Re: Monitor process CPU and Memory utilization
I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee