NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

Feature Request - top 5 memory and cpu processes #939

Open Variable9903 opened 1 year ago

Variable9903 commented 1 year ago

Hello, would it be possible to request NCPA return the top 5 mem/cpu processes if a warning or critical threshold is reached? Or am I misguided and this feature is already in process or exists? Thank you.

ericloyd commented 1 year ago

That's not really how it works. You can monitor memory usage, for instance, and then you can have a dependent check that does something like "https:///api/processes?cpu_percent=5" to return the processes that are using more than 5% cpu. This will just be a list though.

NCPA isn't an analysis tool, it's a monitoring tool.

gittethis commented 1 year ago

Hello, I recompiled a while ago an ‘in-house’ version of 2.4.1 with these features added (top cpu and memory, informative only thou, parameter being how many to show on top, top5, top10, etc) that is still used successfully in production. Is useful to check in a glance what kind of procs are using mem or cpu directly in the Nagios dashboard instead of connecting to the server (especially when there is level one support having their eyes on the dashboard 24/7 and having to call second level support with initial info on the alerts :))

Sent with the great iPhone

On 13 Apr 2023, at 21:11, Variable9903 @.***> wrote:

 Hello, would it be possible to request NCPA return the top 5 mem/cpu processes if a warning or critical threshold is reached? Or am I misguided and this feature is already in process or exists? Thank you.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

Variable9903 commented 1 year ago

Thanks all! I see on the NCPA web GUI, https://localhost:5693/gui/top shows a live data feed of the current processes running. IIs there a way to make this an active check rather than accessible through the web GUI that requires login?

ericloyd commented 1 year ago

Anything that the live feed sees is the same as what you see through API calls. The feed itself can't be a check because Nagios isn't a live feed monitoring system.

ericloyd commented 1 year ago

Also, the API requires login as well. The API key is passed in as part of the REST call.

mahadzar81 commented 4 months ago

Hello, I recompiled a while ago an ‘in-house’ version of 2.4.1 with these features added (top cpu and memory, informative only thou, parameter being how many to show on top, top5, top10, etc) that is still used successfully in production. Is useful to check in a glance what kind of procs are using mem or cpu directly in the Nagios dashboard instead of connecting to the server (especially when there is level one support having their eyes on the dashboard 24/7 and having to call second level support with initial info on the alerts :))

Sent with the great iPhone

On 13 Apr 2023, at 21:11, Variable9903 @.***> wrote:

 Hello, would it be possible to request NCPA return the top 5 mem/cpu processes if a warning or critical threshold is reached? Or am I misguided and this feature is already in process or exists? Thank you.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

Do you remember where to get 'in-house' version 2.4.1 of this features?

gittethis commented 4 months ago

I might still have it.. I need to better check and see what's the status of those 'features' (Might be comitted already since 2.4.x but not advertised)

gittethis commented 4 months ago

Hello, I recompiled a while ago an ‘in-house’ version of 2.4.1 with these features added (top cpu and memory, informative only thou, parameter being how many to show on top, top5, top10, etc) that is still used successfully in production. Is useful to check in a glance what kind of procs are using mem or cpu directly in the Nagios dashboard instead of connecting to the server (especially when there is level one support having their eyes on the dashboard 24/7 and having to call second level support with initial info on the alerts :)) Sent with the great iPhone

On 13 Apr 2023, at 21:11, Variable9903 @.***> wrote:  Hello, would it be possible to request NCPA return the top 5 mem/cpu processes if a warning or critical threshold is reached? Or am I misguided and this feature is already in process or exists? Thank you. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

Do you remember where to get 'in-house' version 2.4.1 of this features?

Here's a custom 3.0.2 (named 3.0.3) release containing the options: https://github.com/gittethis/ncpa/releases/download/v3.0.3/ncpa-3.0.3.exe (windows only!)

-M top/cpu -M top/memory -M processes -q "topcpu=5" -M processes -q "topmem=5"

(all are just Informative, no alert is triggered)