Advertisement
Guest User

Untitled

a guest
Nov 4th, 2011
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket
  2. evt.summary = "LTM Node Down"
  3. ip = getattr(evt, 'bigipNotifyObjNode', 'Unknown')
  4. port = getattr(evt, 'bigipNotifyObjPort', 'Unknown')
  5. try:
  6. host = socket.gethostbyaddr(ip)
  7. evt.component = '%s:%s' % (host[0],port)
  8. except socket.herror:
  9. evt.component = '%s:%s' % (ip,port)
  10. message = getattr(evt, 'bigipNotifyObjMsg')
  11. evt.message = '%s' % (message)
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement