Legacy Discussions

Expand all | Collapse all

Add output of top to /Perf/CPU notifications

  • 1.  Add output of top to /Perf/CPU notifications

    Posted 05-27-2016 10:46 AM

    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

  • 2.  RE: Add output of top to /Perf/CPU notifications

    Posted 09-18-2018 03:36 PM
    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.