TECHZEN Zenoss User Community ARCHIVE  

I can't send a snmp trap notification with all Event Details to be included as ...

Subject: I can't send a snmp trap notification with all Event Details to be included as event fields.
Author: [Not Specified]
Posted: 2016-09-01 05:41

I'm tring to send a snmp trap notification via an e-mail. In the content of the mail, i want allEvent Details fields to beincluded as an event fields. I don't want to use the eventurl link (${urls/eventUrl}). Is this Possible Can someone help me I'm using zenoss 4.2.5.



Subject: And you want to do this
Author: Jay Stanley
Posted: 2016-09-01 11:49

And you want to do this dynamically, so it doesnt matter what fields are there (and they could be different every time)



Subject: Hi Jstanley. Thank you for
Author: [Not Specified]
Posted: 2016-09-02 02:02

Hi Jstanley. Thank you for thereply.Yes i want it to happendynamically. It doesn't matterwhat fields are there as long as allEvent Details will be sent.



Subject: Only way i can think of doing
Author: Jay Stanley
Posted: 2016-09-02 07:58

Only way i can think of doing this right now would be to either build a new notification type or use a transform to gather all the event fields and add them to a new field. Then use the field in the email notification



Subject: Hi Jstanley,
Author: [Not Specified]
Posted: 2016-09-05 02:48

HiJstanley,

Thank you for the reply. Whichnew notification type cansendallEvent Details For option 2: Is there any transformscript i can use to gather all fields in the event fields



Subject: You would have to create the
Author: Jay Stanley
Posted: 2016-09-06 08:26

You would have to create the new notification type that would gather all fields.

I dont have a transform script handy for that.



Subject: Roughly... your transform
Author: Jay Stanley
Posted: 2016-09-06 08:44

Roughly... your transform would look something like this.

details = ''
for _f in evt.FIELDS:
if _f and _f != 'all':
details = '%s\\n%s: %s' % (details, _f, getattr(evt, _f))
evt.all = details



Subject: Thank you very much. This
Author: [Not Specified]
Posted: 2016-09-08 02:40

Thank you very much. This script works wel en catch all event details except vender specific events (Palo Alto). Are vender events not apart of theevt.FIELDS



Subject: Should be.. You will have to
Author: Jay Stanley
Posted: 2016-09-08 08:17

Should be.. You will have to show me an example event



Subject: As you see this is all what i
Author: [Not Specified]
Posted: 2016-09-14 03:06

As you see this is all what i get in evt.all

\nDeviceClass: /Network/Router/Firewall \nDeviceGroups: None \nDevicePriority: 3 \nLocation: None \nSystems: None \nagent: zentrap \ncomponent: \ncreated: 1473838851 \ndedupid: None \ndevice: 10.100.1.50 \neventClass: None \neventClassKey: panGeneralGeneralTrap \neventGroup: trap \neventKey: \neventState: 0 \nevid: 904ac554-7a4e-11e6-881f-005056b327b7 \nfacility: None \nflappingInterval: None \nflappingSeverity: None \nflappingThreshold: None \nipAddress: \nmessage: snmp trap panGeneralGeneralTrap \nmonitor: localhost \nntevid: None \npriority: None \nprodState: 1000 \nseverity: 3 \nsummary: snmp trap panGeneralGeneralTrap \ntags:

But i mis others, specifically Palo Alto events (see below)

panActionflags 0x0
panEventSubType general
panEventType SYSTEM
panReceiveTime 2016/09/14 09:42:11
panSeqno 55183
panSerial 001801013846
panSystemDescription
panSystemEventId general
panSystemModule general


Subject: bump
Author: [Not Specified]
Posted: 2016-09-21 03:49

bump



< Previous
Swap graph not generated
  Next
zenbatchload
>