#Read me
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tail_F(filename): | |
p = 0 | |
with open(filename, 'r') as f: | |
while True: | |
f.seek(p) | |
new_line = f.read() | |
p = f.tell() | |
if new_line: | |
print new_line | |
print str(p).center(10).center(80, '=') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@cloud-monitor-1:/etc/shinken# cat /usr/lib/nagios/plugins/notify_by_xmpp.py | |
#!/usr/bin/python -tt | |
# [email protected], modified by David Laval | |
# gplv2+ | |
## XMPP notification | |
#define command{ | |
# command_name notify-host-by-xmpp | |
# command_line $PLUGINSDIR$/notify_by_xmpp.py -a $PLUGINSDIR$/notify_by_xmpp.ini "Host '$HOSTALIAS$' is $HOSTSTATE$ - Info : $HOSTOUTPUT$" $CONTACTEMAIL$ | |
#} |
NewerOlder