Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- evt.summary = "LTM Node Down"
- ip = getattr(evt, 'bigipNotifyObjNode', 'Unknown')
- port = getattr(evt, 'bigipNotifyObjPort', 'Unknown')
- try:
- host = socket.gethostbyaddr(ip)
- evt.component = '%s:%s' % (host[0],port)
- except socket.herror:
- evt.component = '%s:%s' % (ip,port)
- message = getattr(evt, 'bigipNotifyObjMsg')
- evt.message = '%s' % (message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement