]> git.pld-linux.org Git - packages/nagios-alert-jabber.git/commitdiff
- rel 6; configurable timeout and lowered to 20s auto/th/nagios-alert-jabber-1_2-6
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 22 Feb 2011 17:13:40 +0000 (17:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nagios-alert-jabber.spec -> 1.14
    nagios-jabber.alert -> 1.17

nagios-alert-jabber.spec
nagios-jabber.alert

index 2ec63aacfaf52d87b44d7ad53df2f4b00a210928..3c7dd397e2cd4825b61922d1977c23c8adda26d1 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Program to send (Nagios) alerts via jabber
 Summary(pl.UTF-8):     Program do wysyłania alarmów (Nagiosa) przez jabbera
 Name:          nagios-alert-jabber
 Version:       1.2
-Release:       5
+Release:       6
 License:       GPL
 Group:         Networking
 Source0:       nagios-jabber.alert
index cf6d8d29f9076eeaed4381a595f32b533d74c68e..faf22d4fda9cc21860884606becf0e3a1250c38e 100644 (file)
@@ -8,7 +8,7 @@
 # luzik@pld-linux.org, 2007-03 - added digest auth method(jabber.gda.pl)
 # arekm@pld-linux.org, 2009-07 - added fallback accounts support
 # usage:
-#   jabber.alert [-x] [-a account_id][,otheraccount_id] [-J from_jid -P password] to_jid1 to_jid2 to_jid3
+#   jabber.alert [-x] [-a account_id][,otheraccount_id] [-t timeout ] [-J from_jid -P password] to_jid1 to_jid2 to_jid3
 
 import os
 import re
@@ -25,10 +25,8 @@ from pyxmpp.message import Message
 from pyxmpp.jabber.client import JabberClient
 from pyxmpp.streamtls import TLSSettings
 
-socket.setdefaulttimeout(60.0)
-
 try:
-       opts, args = getopt.getopt(sys.argv[1:], "J:P:a:dx")
+       opts, args = getopt.getopt(sys.argv[1:], "J:P:a:dt:x")
 except getopt.GetoptError, e:
        print >> sys.stderr, "%s: %s " % (sys.argv[0], e)
        sys.exit(1)
@@ -36,11 +34,14 @@ except getopt.GetoptError, e:
 jids = []
 html = False
 debug = False
+timeout = 20
 
 tjid = None
 for o, a in opts:
        if o == '-d':
                debug = True
+       if o == '-t':
+               timeout = float(a)
        if o == '-x':
                html = True
        if o == '-J':
@@ -56,6 +57,8 @@ for o, a in opts:
                for section in a.split(','):
                        jids.append({ 'jid': config.get(section, 'jid'), 'password': config.get(section, 'password')})
 
+socket.setdefaulttimeout(timeout)
+
 recpt = args
 
 for section in jids:
This page took 0.091496 seconds and 4 git commands to generate.