SHOW:
|
|
- or go back to the newest paste.
1 | - | from socket import gethostbyaddr |
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 = gethostbyaddr(ip) |
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) |
11 | + | evt.message = '%s' % (message) |
12 | ||
13 |