TECHZEN Zenoss User Community ARCHIVE  

Event Notification with a command

Subject: Event Notification with a command
Author: Jeffrey Fulmer
Posted: 2018-02-21 16:44

I'm trying to set up a notification on a test Zenoss instance. At Events => Triggers => Notifications I'm setting up a command. On the Content panel of the Notification Edit window, I have this as my command:

/opt/zenoss/scripts/event_disk --severity="3" --resource="Disk /var" --node="${evt/node}"--description="Disk Usage: Past Threshold" --type="Disk utilization error"

It fails when it runs and I get this in the log:

2018-02-21 15:44:50,743 INFO zen.zenactiond: Event:'labns051.americas.armstrong.com|u01|/Perf/Filesystem|usedBlocks_usedBlocks|high disk usage|3' Trigger:var_trigger Action:command Status:FAIL Target: Info:Unable to perform TALES evaluation on "/opt/zenoss/scripts/event_disk --severity="3" --resource="Disk /var" --node="${evt/node}"--description="Disk Usage: Past Threshold" --type="Disk utilization error""


I am certain that the problematic item is this: ${evt/node} If I remove that and hard code a server name, the command works. With the variable it fails. Can someone tell me why? I do this on my production Zenoss system and I have no issue.

------------------------------
Jeffrey Fulmer
------------------------------


Subject: RE: Event Notification with a command
Author: Jane Curry
Posted: 2018-03-10 05:38

Two possibilities. In

--node="${evt/node}"--description="Disk Usage: Past Threshold"

do you have a space between node}"  and the --description???  You DO need the space and that would cause the evt/node node to be not understood.

The other thought is that evt/node is not a standard event attribute.  Any chance that you have event configuration in your prod environment that defines this but not in your dev??  ${evt/device} would give you the name of the offending device if that is the same as your ${evt/node}.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------


< Previous
CISCO ASR do not detect component
  Next
Backup Zenoss core
>