Page 1 of 1

Top Processes - Feature Question

Posted: Fri Feb 26, 2021 7:53 pm
by Robin_JaCo
This isn't an issue, it is a feature inquiry.

Linux Distribution and version? CentOS 7
32 or 64bit? 64-bit
VMware Image or Manual Install of XI? I am not sure
Are there special configurations on your system? Not that I am aware of.

I am new to NagiosXI, so forgive my ignorance.

While exploring the NCPA, and getting to know how Nagios works in general, I have been attempting to figure out if it was possible to get more data out of Windows processes. I found the Top Processes on the NCPA's local sites, but for the life of me I can't figure out how or where that information is on the NagiosXI admin center.

Even if it isn't quite as accurate (only querying every 5 min by default), is there a way to get that process information? I can see this information as quite useful for troubleshooting memory or CPU eating processes.

Thanks for your assistance.

Re: Top Processes - Feature Question

Posted: Mon Mar 01, 2021 3:58 pm
by benjaminsmith
Hi,

Depending on why type of checks you'd like to run, the current functionality in NCPA may be sufficient. The current API in NCPA will allow you to create checks using CPU and memory as filter parameters. You'll find the documentation for this on the following page.

https://www.nagios.org/ncpa/help.php#ap ... -processes

I would recommend running the NCPA Configuration Wizard from the XI server to get the checks started, adn then you can adjust the check commands as needed in Nagios XI from the Core Config Manager. Nagios XI uses the check_ncpa.py plugin to communicate with the remote host running the NCPA agent.

Benjamin

Reference
How To Monitor Devices Using The NCPA Agent and Wizard

Re: Top Processes - Feature Question

Posted: Tue Mar 02, 2021 12:38 pm
by Robin_JaCo
Hello Benjamin,

Thank you for attempting to help me out with my query.

Though your information is useful, I have a lot of learning to do before I think I will fully parse it.

I think you misunderstand my question (or I don't understand enough about NagiosXI).
In the Windows Server world there are a lot of scenarios where a process will go rogue and eat all the CPU or Memory. If what I am reading is correct, you recommend we watch singled out processes. That sort misses the point. I want to be able to see what processes I need to watch before I know I need to watch them. I could see with your instructions monitoring every process individually, but that doesn't take into account any future changes with the host or unknown processes we haven't predicted.

I am not afraid to dive into the API or do a little coding, but at this point all I know of APIs is from the articles you have shared, so...limited understanding. I also don't know if what I am proposing is even possible. That is my question to this forum. Can I monitor the top processes (again not expecting real-time) for a host using any tool NagiosXI has to offer? Originally I was hoping for something out of the box (I am a low level sys admin not a dev), but is this something that can be done by manipulating the API or building a plug-in in some way?

Thank you again for your assistance,
Robin

Re: Top Processes - Feature Question

Posted: Wed Mar 03, 2021 11:31 am
by benjaminsmith
Hi Robin,

NCPA can monitor the processes consuming some value of CPU, for example, the following command would count the number of processes consuming more than 80% of CPU.

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.254.69 -t 'welcome' -P 5693 -t 'welcome' -M 'processes' -q 'cpu_percent=80'
The critical or warning thresholds would be triggered by the number of processes (count). The output of the check will provide details about which process is consuming more than 80%. However, it is necessary to view the check output from the Service Status Details page.

https://www.nagios.org/ncpa/help.php#ap ... -processes

That's pretty close to what you want, however, the other option would be to use a PowerShell script and write a simple plugin to be called by NCPA.

Nagios XI - Using Scripts / Plugins With NCPA
Nagios Plugin Development Guidelines