TECHZEN Zenoss User Community ARCHIVE  

could not find the event created through zenoss json api (zenoss 5)

Subject: could not find the event created through zenoss json api (zenoss 5)
Author: [Not Specified]
Posted: 2015-04-10 14:57

I created an event successfully, but not find in zenoss at all.

$ zenoss_send_event 'myserver' '' 'Critical' '/DB' 'mysql slave status'
{"uuid": "847c6522-9ca1-4a66-b23b-862d112dc059", "action": "EventsRouter", "result": {"msg": "Created event", "success": true}, "tid": 1, "type": "rpc", "method": "add_event"}

i wonder how i can track it down. also, i assume that this has not change in zenoss 5. i tried the numerical value as well for severity. the result is the same.

i would really appreciate if i can get some tips (like which log to look at etc.)

the function is:

zenoss_send_event() {
DEVICE=$1
COMPONENT=$2
EVENT_CLASS_KEY=$3 # Of EventClass Mapping
SEVERITY=$4 # Critical, Error, Warning, Info, Debug, or Clear
SUMMARY=$5

if [ -z "$SUMMARY" ]; then
echo "Usage: zenoss_send_event

"
return 1
fi

zenoss_api evconsole_router EventsRouter add_event \
"{\"device\":\"$DEVICE\",\"summary\":\"$SUMMARY\",\"component\":\"$COMPONENT\",\"severity\":\"$SEVERITY\",\"evclasskey\":\"$EVENT_CLASS_KEY\"}"
}

Thanks!



Subject: function problem
Author: [Not Specified]
Posted: 2015-04-10 16:05

well i used the raw http post based on this and it worked. so i guess something is not write with the function i downloaded.

https://support.zenoss.com/hc/en-us/articles/202384859-How-To-Create-And...



Subject: glad you got it working, I've
Author: Andrew Kirch
Posted: 2015-04-13 19:29

glad you got it working, I've notified one of our Customer Success team folks to let them know that that doc may need updating.

Andrew Kirch

akirch@gvit.com

Need Zenoss support, consulting or custom development Look no further. Email or PM me!

Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard



< Previous
evid and uuid in zenoss json_api are different in add_event and close methods
  Next
Zenoss 4.2.4 not displaying some historic graph data (Corrupt RRD?)
>