Repairing Poskey Errors

From Zenoss Wiki
Revision as of 19:06, 15 April 2014 by Hydruid (Talk | contribs)$7

Jump to: navigation, search

POSKeyError tracebacks occur when objects have references to non-existing objects. When this occurs for relationships, the FindPosKeyError script can be used to locate objects that are the causes of the POSKeyError tracebacks.


The FindPosKeyErrors scripts can be found at:

https://github.com/hackeys/zenoss.git (Enterprise)

https://github.com/SteelHouseLabs/POSKey-Script.git (Core)


Instructions for FindPosKeyError script installation and usage:

Here are the commands to install the FindPosKeyError script:

# chown zenoss:zenoss FindPosKeyError
# su - zenoss
$ chmod u+x FindPosKeyError

Here are a few sample runs of the script:

$ ./FindPosKeyError /zport/dmd/Monitors
$ ./FindPosKeyError --fixrels /zport/dmd/Monitors
$ ./FindPosKeyError /zport/dmd/ZenUsers
$ ./FindPosKeyError --fixrels /zport/dmd/ZenUsers
$ ./FindPosKeyError /zport/dmd/Devices
$ ./FindPosKeyError --fixrels /zport/dmd/Devices

For ZenRelationship objects, there's a high likelihood that it is the _objects attribute that is corrupted. When FindPosKeyError is run with the '--fixrels' flag, it will fix most ZenRelationship objects.