If you navigate to Reports -> Performance Reports and run the CPU Utilization report, or Memory Utilization report (for example), you may notice that there is limited/no data for devices which you have developed custom templates for.
You can modify report plugins to use datapoints from your templates.
I have device templates that I created to monitor performance on certain devices. The values were not represented in the report, and instead I was simply seeing “N/A” for all values of these devices.
- One is a template to monitor Windows devices via SNMP where the percentage of CPU in use is represented by the datapoint “Total” and the percentage of memory in use is represented by the datapoint “PercentMemoryUsed”.
- Another template is a template to monitor Cisco routers and switches where the CPU usage is represented by a datapoint called “cpu5min” and memory usage is represented by datapoints called “mem5minFree” and “mem5minUsed”.
I edited $ZENHOME/Products/ZenReports/plugins/cpu.py
if cpuPercent is None: cpuPercent = d.getRRDValue('cpuPercentProcessorTime', **summary)
# This retrieves the percentage of CPU usage for the report. if cpuPercent is None: cpuPercent = d.getRRDValue('cpu5min', **summary)
# This retrieves the percentage of CPU usage for the report. if cpuPercent is None: cpuPercent = d.getRRDValue('Total', **summary)
I edited $ZENHOME/Products/ZenReports/plugins/memory.py
percentUsed = None if totalReal and free: percentUsed = Utils.percent(totalReal - free, totalReal)
# This retrieves the percentage of memory usage for the report. if percentUsed is None: percentUsed = d.getRRDValue('PercentMemoryUsed', **summary)
# This retrieves and calculates the percentage of memory # used from the amount of free and used memory. if percentUsed is None: CiscoMemFree = d.getRRDValue('mem5minFree', **summary) CiscoMemUsed = d.getRRDValue('mem5minUsed', **summary) if CiscoMemFree and CiscoMemUsed: percentUsed = round((CiscoMemUsed/(CiscoMemUsed + CiscoMemFree))*100.0)
After any modification is made to a report plugin you should restart Zope by executing “zopectl restart” as the zenoss user. In some rare cases restarting Zope can cause Zenoss to stop responding. If this happens simply restart Zenoss by executing “zenoss stop”, wait a few seconds, then “zenoss start”.