TECHZEN Zenoss User Community ARCHIVE  

4.2.5 Device Priority effect on Organiser Tree nodes

Subject: 4.2.5 Device Priority effect on Organiser Tree nodes
Author: Pheripheral Pheripheral
Posted: 2016-06-17 06:53

Hi,

I'm looking for some advice on the behaviour in Zenoss 4.2.5. of the infrastructure organiser trees.
Specifically, the rollup of device statuses throughout the tree.

I thought / hoped that the device priority of a device should influence whether a devices status affects the status of a particular organiser node(be it group / system or location) and also how it affects the status of its parent organiser nodes as you traverse back up the tree to the top level.

At the moment if a device set to normal priority or higher raises an error event then any organiser tree node that contains that device also shows an error status, as do the parent nodes up through the tree. Setting a device to have a priority of less than Normal (Low, Lowest or Trivial) would, I hoped, mean that the status of the device no longer affects the status of the organiser tree node or its parents, but at the moment I can't seem to produce this behaviour.

I've experimented with the Dashboard Priority Threshold but this only seems to control whether a device appears in the device issues dashboard portlet (or other device listing portlets) and seemingly has no effect on status of nodes in the organiser trees.

I've got an instance of Zenoss v3 that does exhibit this behaviour, i.e. setting a device to Low priority prevents it altering the status of the organiser tree nodes, but I don't know for sure whether this behaviour is standard zenoss behaviour or whether this v3 instance was modified to produce this.

So my questions are these :

- Should Zenoss exhibit the behaviour described above 'out of the box' or is this something that needs to be added in to a standard zenoss install

- If it is something that zenoss should do, are there any setting I'm missing to obtain this behaviour


Many Thanks for any advice and please ask if I've not explained the issue enough



Subject: Update!
Author: Pheripheral Pheripheral
Posted: 2016-06-22 04:04

Update!

Ive now discovered that this behaviour is not something that Zenoss (either v3 or v4) provides and the instance I was observing it on had been modified.

Specifically, the device.py file in the \Products\Zuul\infos directory in our v3 zenoss instance had changes to it such that the method that obtained a devices list used work out the event summary status had further clauses added to it to filter out devices with a priority lower than Normal and other criteria.

These changes were done in the _organizerWhere method in this device.py file and also in the DeviceOrganizerTreeNodeMarshaller class method getSeverities inside this file.

The change was along the lines of:

return "Systems like '%%|%s%%' and DevicePriority > 2 and prodState = 1000 and eventState = 0" % orgname.lstrip('Systems')

where previously (in an unaltered zenoss instance) the line had been

return "Systems like '%%|%s%%'" % orgname.lstrip('Systems')

with similar updates for Locations etc

So my original question has been answered this behaviour was something added into zenoss rather than off the shelf.

My new question comes after Ive investigated the Zenoss v4.2.5 code in the hope that I would be able to experiment with applying the same changes to try and recreate the behaviour.

However, the code in this file in zenoss 4.2.5 has been updated to reflect changes to the zenoss code architecture and so it does not seem as simple a change to provide the same behaviour.

As far as I can see so far the 4.2.5 code first collects all the device uuids that are under the relevant organiser tree nodes and then, via the zep faade, retrieves all the events relevant to these devices. From this event list it works out the worst severity and thus populates the severity icon.

My initial test attempts involved updating the event filter in the _getEventTagSeverities method used to retrieve events in the zep faade. I altered this to filter out events on devices with a priority of Low etc this had some success but it seems that this removed all reporting of the events summary status info in the infrastructure page, not just on the organiser tree section. I suspect this code gets called from anywhere that the event summary is needed on the infrastructure page. The only way to actually view the event after this test change was via the device page itself with this test change in place. So Im not sure this is the way forward.

My hope is that I can alter the Zuul/infos/device.py file where it collects the uuids of the devices in the tree to pass to the faade getWorstSeverity method. Ideally I could filter out devices that are not at the correct priority at this stage.

Im looking for some guidance on how I might achieve this, as at the moment it looks like that part of the code only has a the device uuids, so am not sure how to get access to the device priority for each of these uuids and filter some out.

Any advice / guidance would be greatly appreciated.

Please ask if I need to clarify anything

Thanks



< Previous
backup not recognized in the new install
  Next
You must select at least 1 Application Template.
>