TECHZEN Zenoss User Community ARCHIVE  

Add output of top to /Perf/CPU notifications

Subject: Add output of top to /Perf/CPU notifications
Author: Josh Zenker
Posted: 2016-05-27 11:46

I'm looking for a way to add some functionality to Zenoss that our users are accustomed to having in Hobbit (Xymon). I want notifications for /Perf/CPU events to include the output of a command, e.g. top -b -n1. This will make it easier for whomever is on call to identify the process(es) that caused the CPU event.

I considered a command (or wincommand) notification that would connect to the device, run the command, and store its output somewhere. However, this gets complicated because we have distributed collectors for the different organizational units within the university. Our master/hub server does not have direct access to the monitored devices. It also might necessitate putting a script on each of our servers during the provisioning process, which I'm not keen to do.

What would you suggest



Subject: RE: Add output of top to /Perf/CPU notifications
Author: Josh Zenker
Posted: 2018-09-18 16:36

I did eventually find a solution, but it would not have worked on Resource Manager 4.2.5. It only became possible with the new 5.x architecture. I execute the top command over SSH and write the output to a directory on the DFS. The output therefore becomes available to the Zope containers and can be displayed in the web GUI via a user-defined command, e.g. cat /var/zenoss/site/ProcessTable/${device/id}. I hope this helps someone.


< Previous
Need to find list of modelling keys
  Next
Zenoss 5.0.1 to 5.1.3 migration
>