How To Show CPU Used Percentage In Threshold Events


A Zenoss installation with added devices that have CPU usage monitored.

Applies To

  • Zenoss 4.x
  • Zenoss 3.x
  • Zenoss 2.5.x


The following will convert your events generated by thresholds on CPU utilization to show the used value instead of the idle value.


Use the code block included below and paste it into your /Perf/Cpu event class transform field.

  1. To locate navigate to: Events -> Event Classes -> Perf -> Cpu.
  2. Select the action wheel at the bottom of the left side-bar.
  3. Choose Transform.
  4. Paste the code and click Save at the bottom of the code field. Now any events that display the default threshold name of 'low CPU idle' will contain both the percent used and percent idle in the message displayed.


import re
m ="threshold of low CPU idle not met: current value ([\d\.]+)", evt.message)
currentValue = float(m.groups()[0])
newValue = 100 - currentValue
evt.summary = "threshold of low CPU idle not met: current value %3.1f%% used (%s idle)" % (newValue, currentValue)
evt.message = evt.summary
Was this article helpful?
0 out of 1 found this helpful


  • Avatar
    Mark Passell *SUSPENDED*

    need to know how to show graphs of CPU Percentage Used on SSH monitored multiprocessor systems for Linux that have 100% max instead of the usual 600%

Powered by Zendesk