How can we get the information of Top 3 Processes consuming CPU using wmi and snmp in NagiosXI??
Can we use any plugin or shell script to get this information?
Top 3 processes consuming CPU
Re: Top 3 processes consuming CPU
I'm not certain about snmp or vmi, but here is a powershell script:
https://exchange.nagios.org/directory/P ... 29/details
I think it will need to be slightly modified on line 33 to return top three:
and a shell script:
https://exchange.nagios.org/directory/P ... es/details
again needing a slight modification on line 201:
and 205:
TOPFIVE="Top 3 CPU Processes(cpu%,pname,pid):" ;
https://exchange.nagios.org/directory/P ... 29/details
I think it will need to be slightly modified on line 33 to return top three:
Code: Select all
$cpuhog = (get-process -computername $servername | sort-object CPU -descending | select-object -first 3)https://exchange.nagios.org/directory/P ... es/details
again needing a slight modification on line 201:
Code: Select all
COMMAND=`UNIX95= ps -e -o pcpu,comm,pid | sort -n -r | grep -v "%CPU" | head -3`TOPFIVE="Top 3 CPU Processes(cpu%,pname,pid):" ;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
linearstack
- Posts: 26
- Joined: Tue Nov 07, 2017 7:35 pm
Re: Top 3 processes consuming CPU
Will this work as a plugin?
let's suppose, I save this script in Nagios host. Can we set some parameters using nagios GUI interface in a way that whenever we receive a Warning/Critical alert, this script will flick another alert stating the top5 processes consuming memory/ CPU.
????
let's suppose, I save this script in Nagios host. Can we set some parameters using nagios GUI interface in a way that whenever we receive a Warning/Critical alert, this script will flick another alert stating the top5 processes consuming memory/ CPU.
????
Re: Top 3 processes consuming CPU
Are you trying to monitor the "top 3" most CPU intensive processes on a remote machine (Windows, Linux, etc.) or on the Nagios XI server itself? Can you clarify?
With any 3rd party plugin (that is not included in XI by default), the process would be the same:
1. Test the plugin from the command line to make sure it works as expected
2.Define a command in Nagios XI
3. Add a service
4. Verify your service is working
For more information please review our official documentation on managing plugins in Nagios XI here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
With any 3rd party plugin (that is not included in XI by default), the process would be the same:
1. Test the plugin from the command line to make sure it works as expected
2.Define a command in Nagios XI
3. Add a service
4. Verify your service is working
For more information please review our official documentation on managing plugins in Nagios XI here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!