![]() |
![]() |
Subject: | OS Process Transform |
Author: | Shea Johnson |
Posted: | 2017-01-04 15:08 |
Hello,
I'm trying to write my first transform and my goal is to do something similar to the Nice Memory Events example located herehttp://wiki.zenoss.org/Transforms_-_Nice_Memory_Events
We monitor how much memory a particular process is using and have an alarm when it reach a particular size. The event summary lists a big number that doesn't show any units and I just want to clean that up a bit. Does anyone one have a transform already built that handles this or know what values I need to use in my script
Thanks in advance!
Subject: | I'm guessing the memory value |
Author: | Shea Johnson |
Posted: | 2017-01-05 18:19 |
I'm guessing the memory value that I'm looking for would be underdevice.os.processes (found in another post), but I don't know how to search those values. Once I get the memory value, I think I can use theconvToUnits subroutine in the "Nice Memory Events" example. Am I heading the right direction
Subject: | A device process does not |
Author: | Jane Curry |
Posted: | 2017-01-06 09:13 |
A device process does not have an attribute for the amount of memory that a process should use so you don't find anything helpful in OSProcess.py. A device DOES have an attribute for it's total memory - it is under hw - device.hw.totalMemory .
The way I went about this was to first create a new event class, /Perf/Memory/Process to use in the threshold definition. This event class will have a transform that prettifies the summary.
Next, pick a process on a device as a test - preferably one that uses a reasonable amount of memory. Select the process from the device's OSProcesses list; change the Display dropdown from Graphs to Templates and click the "Create Local Copy" button - that way we can play around with the test process without mucking up anything else.
Now navigate to ADVANCED -> Monitoring Templates ->OSProcess and select the instance for the local copy you have just created. Create a new threshold based on the mem_mem datapoint.
< |
Previous Zenoss Core 4.2.5 - KeyError: 1483719640 |
Next Script to bring down Zenoss |
> |