just cleanups
This commit is contained in:
parent
8103e33299
commit
305ec95110
5 changed files with 9 additions and 13 deletions
|
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
},
|
||||
"periods": {
|
||||
"always": { "seconds": 2 }
|
||||
"always": { "seconds": 60 }
|
||||
},
|
||||
"hostgroups":{
|
||||
"servers":{
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"class": "tcpconnect",
|
||||
"args": { "port": 80 },
|
||||
"periods": ["always"],
|
||||
"threshold": 2
|
||||
"threshold": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
__author__ = 'rafael'
|
||||
"""
|
||||
The LinspectorConfig class.
|
||||
"""
|
||||
|
||||
|
||||
class LinspectorConfig(object):
|
||||
def __init__(self):
|
||||
|
|
@ -50,9 +53,4 @@ class LinspectorConfig(object):
|
|||
return self._get_by_name(self.get_members(), name)
|
||||
|
||||
def get_period_by_name(self, name):
|
||||
return self._get_by_name(self.get_periods(), name)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return self._get_by_name(self.get_periods(), name)
|
||||
|
|
@ -45,9 +45,7 @@ class Job:
|
|||
def handle_alarm(self, thresholdOffset):
|
||||
for member in self.service.get_hostgroup().get_members():
|
||||
for task in member.get_tasks():
|
||||
print(task)
|
||||
task.execute("Task executed for host: " + self.host)
|
||||
pass
|
||||
|
||||
def handle_call(self):
|
||||
self.log.d("handle call")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"""
|
||||
The Jabber task.
|
||||
The Jabber (XMPP) task.
|
||||
|
||||
Uses: http://xmpppy.sourceforge.net/
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
"""
|
||||
The email task.
|
||||
The mail task.
|
||||
|
||||
http://docs.python.org/2/library/email-examples.html
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue