TECHZEN Zenoss User Community ARCHIVE  

Getting BadTalesExpresssion when using Command as notification

Subject: Getting BadTalesExpresssion when using Command as notification
Author: [Not Specified]
Posted: 2014-07-29 03:52

I am getting the following exception when using a notification with command "/home/zenoss/eops_notification.sh ${evt/DeviceId} ${evt/agent} ${evt/clearid} ${evt/component} ${evt/count} ${evt/created} ${evt/dedupid} ${evt/device} ${evt/eventClass} ${evt/eventClassKey} ${evt/eventGroup} ${evt/eventKey} ${evt/eventState} ${evt/evid} ${evt/facility} ${evt/firstSeen} ${evt/ipAddress} ${evt/lastSeen} ${evt/manager} ${evt/message} ${evt/ntevid} ${evt/ownerid} ${evt/priority} ${evt/prodState} ${evt/severity} ${evt/stateChange} ${evt/status} ${evt/summary}"

Message: Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/actions.py", line 317, in execute
self.executeOnTarget(notification, signal, target)
File "/opt/zenoss/Products/ZenModel/actions.py", line 577, in executeOnTarget
self._execute(notification, signal, environ)
File "/opt/zenoss/Products/ZenModel/actions.py", line 614, in _execute
command = processTalSource(command, **environ)
File "/opt/zenoss/Products/ZenModel/actions.py", line 112, in processTalSource
raise BadTalesExpresssion(message)
BadTalesExpresssion: Unable to perform TALES evaluation on "/home/zenoss/eops_notification.sh ${evt/DeviceId} ${evt/agent} ${evt/clearid} ${evt/component} ${evt/count} ${evt/created} ${evt/dedupid} ${evt/device} ${evt/eventClass} ${evt/eventClassKey} ${evt/eventGroup} ${evt/eventKey} ${evt/eventState} ${evt/evid} ${evt/facility} ${evt/firstSeen} ${evt/ipAddress} ${evt/lastSeen} ${evt/manager} ${evt/message} ${evt/ntevid} ${evt/ownerid} ${evt/priority} ${evt/prodState} ${evt/severity} ${evt/stateChange} ${evt/status} ${evt/summary}"



Subject: I removed evt parameters one
Author: [Not Specified]
Posted: 2014-07-29 06:32

I removed evt parameters one by one and found that following combination works :

/home/zenoss/eops_notification.sh ${evt/agent} ${evt/clearid} ${evt/component} ${evt/count} ${evt/dedupid} ${evt/device} ${evt/eventClass} ${evt/eventClassKey} ${evt/eventGroup} ${evt/eventKey} ${evt/eventState} ${evt/evid} ${evt/facility} ${evt/ipAddress} ${evt/manager} ${evt/message} ${evt/ntevid} ${evt/ownerid} ${evt/priority} ${evt/prodState} ${evt/severity} ${evt/summary}

Adding any of the following causes the problem:
${evt/DeviceId} ${evt/firstSeen} ${evt/lastSeen} ${evt/status}

Any Idea why



Subject: I think you will need evt
Author: Jane Curry
Posted: 2014-07-29 11:02

I think you will need evt/device, evt/firstTime, evt/lastTime and evt/eventState

Cheers,
Jane

Email: jane.curry@skills-1st.co.uk    Web: https://www.skills-1st.co.uk



Subject: Hey JCurry,
Author: [Not Specified]
Posted: 2014-07-29 12:47

Hey JCurry,

Thanks for the quick reply. I was actually looking at 6.2.3.1 (http://community.zenoss.org/docs/DOC-10690) for the evt/{attributes}. I should probably search for other evt documentation as it seems this one is outdated.



< Previous
monitor the number of users logged in linux server
  Next
Unable to Remodel any of my devices in Zenoss
>