diff options
author | Michael Gröning <mgroe@localhost.localdomain> | 2014-11-07 17:16:48 +0100 |
---|---|---|
committer | Michael Gröning <mgroe@localhost.localdomain> | 2014-11-07 17:16:48 +0100 |
commit | 0fa856d467eb839de41a377cf36ce722062fe810 (patch) | |
tree | 1203d3b759de8cde40246df3bd96dcd4942c23da /monitoring | |
parent | ebda36bb5054fc577a422de6062c24e3083cafcd (diff) | |
download | ansible-modules-extras-0fa856d467eb839de41a377cf36ce722062fe810.tar.gz |
fix bugs
Diffstat (limited to 'monitoring')
-rw-r--r-- | monitoring/nagios.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/monitoring/nagios.py b/monitoring/nagios.py index 1ddde5b5..f0904a44 100644 --- a/monitoring/nagios.py +++ b/monitoring/nagios.py @@ -217,7 +217,7 @@ def main(): # 'minutes' and 'service' manually. ################################################################## - if action not in ['command', 'silence_nagios', 'unsilence_nagios', 'servicegroup_downtime']: + if action not in ['command', 'silence_nagios', 'unsilence_nagios']: if not host: module.fail_json(msg='no host specified for action requiring one') ###################################################################### @@ -289,7 +289,7 @@ class Nagios(object): self.action = kwargs['action'] self.author = kwargs['author'] self.host = kwargs['host'] - self.service_group = kwargs['servicegroup'] + self.servicegroup = kwargs['servicegroup'] self.minutes = int(kwargs['minutes']) self.cmdfile = kwargs['cmdfile'] self.command = kwargs['command'] @@ -867,11 +867,11 @@ class Nagios(object): services=self.services, minutes=self.minutes) elif self.action == "servicegroup_host_downtime": - if self.services == 'servicegroup': - self.schedule_servicegroup_host_downtime(self, self.servicegroup, minutes=30) + if self.servicegroup: + self.schedule_servicegroup_host_downtime(servicegroup = self.servicegroup, minutes = self.minutes) elif self.action == "servicegroup_service_downtime": - if self.services == 'servicegroup': - self.schedule_servicegroup_host_downtime(self, self.servicegroup, minutes=30) + if self.servicegroup: + self.schedule_servicegroup_svc_downtime(servicegroup = self.servicegroup, minutes = self.minutes) # toggle the host AND service alerts elif self.action == 'silence': |