Skip to content

Commit

Permalink
merged fix for IcingaDBWeb
Browse files Browse the repository at this point in the history
  • Loading branch information
HenriWahl committed May 3, 2024
1 parent da6b4e7 commit 224e2d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 300 deletions.
293 changes: 0 additions & 293 deletions .github/workflows/build-release-latest-test-artifacts.yml_deactivated

This file was deleted.

2 changes: 1 addition & 1 deletion Nagstamon/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class AppInfo(object):
contains app information previously located in GUI.py
"""
NAME = 'Nagstamon'
VERSION = '3.15-20240420'
VERSION = '3.15-20240503'
WEBSITE = 'https://nagstamon.de'
COPYRIGHT = '©2008-2024 Henri Wahl et al.'
COMMENTS = 'Nagios status monitor for your desktop'
Expand Down
6 changes: 2 additions & 4 deletions Nagstamon/Servers/IcingaDBWeb.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ def _get_status(self):
self.new_hosts[host_name].notifications_disabled = not int(h.get('notifications_enabled') or '0')
self.new_hosts[host_name].flapping = bool(int(h['state']['is_flapping'] or 0))
#s['state']['is_acknowledged'] can be null, 0, 1, or 'sticky'
#self.new_hosts[host_name].acknowledged = bool(int(h['state']['is_acknowledged'].replace('sticky', '1') or 0))
self.new_hosts[host_name].acknowledged = h['state']['is_acknowledged'] if isinstance(h['state']['is_acknowledged'], (bool)) else bool(int(h['state']['is_acknowledged'].replace('sticky', '1') or 0))
self.new_hosts[host_name].acknowledged = h['state']['is_acknowledged'] if isinstance(h['state']['is_acknowledged'], bool) else bool(int(h['state']['is_acknowledged'].replace('sticky', '1') or 0))
self.new_hosts[host_name].scheduled_downtime = bool(int(h['state']['in_downtime'] or 0))

# extra Icinga properties to solve https://github.com/HenriWahl/Nagstamon/issues/192
Expand Down Expand Up @@ -324,8 +323,7 @@ def _get_status(self):
self.new_hosts[host_name].services[service_name].notifications_disabled = not int(s.get('notifications_enabled') or '0')
self.new_hosts[host_name].services[service_name].flapping = bool(int(s['state']['is_flapping'] or 0))
#s['state']['is_acknowledged'] can be null, 0, 1, or 'sticky'
#self.new_hosts[host_name].services[service_name].acknowledged = bool(int(s['state']['is_acknowledged'].replace('sticky', '1') or 0))
self.new_hosts[host_name].services[service_name].acknowledged = s['state']['is_acknowledged'] if isinstance(s['state']['is_acknowledged'], (bool)) else bool(int(s['state']['is_acknowledged'].replace('sticky', '1') or 0))
self.new_hosts[host_name].services[service_name].acknowledged = s['state']['is_acknowledged'] if isinstance(s['state']['is_acknowledged'], bool) else bool(int(s['state']['is_acknowledged'].replace('sticky', '1') or 0))
self.new_hosts[host_name].services[service_name].scheduled_downtime = bool(int(s['state']['in_downtime'] or 0))
self.new_hosts[host_name].services[service_name].unreachable = not bool(int(s['state']['is_reachable'] or 0))

Expand Down
4 changes: 2 additions & 2 deletions build/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
nagstamon (3.15-20240420) unstable; urgency=low
nagstamon (3.15-20240503) unstable; urgency=low
* New upstream

-- Henri Wahl <[email protected]> Sat, Apr 20 2024 08:00:00 +0200
-- Henri Wahl <[email protected]> Fri, May 05 2024 08:00:00 +0200

nagstamon (3.14.0) stable; urgency=low
* New upstream
Expand Down

0 comments on commit 224e2d8

Please sign in to comment.