diff --git a/.github/workflows/build-release-latest.yml b/.github/workflows/build-release-latest.yml index c7d5eb76..d5c5251f 100644 --- a/.github/workflows/build-release-latest.yml +++ b/.github/workflows/build-release-latest.yml @@ -398,6 +398,7 @@ jobs: - run: rm -rf ${{ env.repo_dir }}/${{ env.family }}/${{ env.release }} - run: mkdir -p ${{ env.repo_dir }}/${{ env.family }}/${{ env.release }} # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed + # only needed for fedora - run: docker pull ${{ env.cr_image }}-${{ env.family }}-${{ env.cr_image_latest }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ env.family }}-${{ env.cr_image_latest }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - run: docker push ${{ env.cr_image }}-${{ env.family }}-${{ env.cr_image_latest }}:${{ env.cr_image_version }} # copy *.rpm files into nagstamon-jekyll and create repodata diff --git a/Nagstamon/Config.py b/Nagstamon/Config.py index d02031f0..33db9047 100644 --- a/Nagstamon/Config.py +++ b/Nagstamon/Config.py @@ -131,7 +131,7 @@ class AppInfo(object): contains app information previously located in GUI.py """ NAME = 'Nagstamon' - VERSION = '3.17-20241028' + VERSION = '3.17-20241102' WEBSITE = 'https://nagstamon.de' COPYRIGHT = '©2008-2024 Henri Wahl et al.' COMMENTS = 'Nagios status monitor for your desktop' diff --git a/Nagstamon/Servers/IcingaDBWeb.py b/Nagstamon/Servers/IcingaDBWeb.py index 8340d7c4..fc1691eb 100644 --- a/Nagstamon/Servers/IcingaDBWeb.py +++ b/Nagstamon/Servers/IcingaDBWeb.py @@ -210,9 +210,14 @@ def _get_status(self): self.new_hosts[host_name].status = self.STATES_MAPPING['hosts'][int(h['state']['soft_state'])] if h['state']['last_update'].replace(".", "").isnumeric(): # new version of icingadb doesnt return unix timestamp - self.new_hosts[host_name].last_check = datetime.datetime.fromtimestamp(int(float(h['state']['last_update']))) + #self.new_hosts[host_name].last_check = datetime.datetime.fromtimestamp(int(float(h['state']['last_update']))) + utc_time = datetime.datetime.fromtimestamp(int(float(h['state']['last_update'])), tz=timezone.utc) else: - self.new_hosts[host_name].last_check = datetime.datetime.fromisoformat(h['state']['last_update']) + #self.new_hosts[host_name].last_check = datetime.datetime.fromisoformat(h['state']['last_update']) + utc_time = datetime.datetime.fromisoformat(h['state']['last_update']) + + local_time = utc_time.astimezone() + self.new_hosts[host_name].last_check = local_time.strftime("%Y-%m-%d %H:%M:%S") # format without microseconds and tz self.new_hosts[host_name].attempt = "{}/{}".format(h['state']['check_attempt'],h['max_check_attempts']) self.new_hosts[host_name].status_information = BeautifulSoup(str(h['state']['output']).replace('\n', ' ').strip(), 'html.parser').text @@ -313,9 +318,14 @@ def _get_status(self): self.new_hosts[host_name].services[service_name].status = self.STATES_MAPPING['services'][int(s['state']['soft_state'])] if s['state']['last_update'].replace(".", "").isnumeric(): # new version of icingadb doesnt return unix timestamp - self.new_hosts[host_name].services[service_name].last_check = datetime.datetime.fromtimestamp(int(float(s['state']['last_update']))) + #self.new_hosts[host_name].services[service_name].last_check = datetime.datetime.fromtimestamp(int(float(s['state']['last_update']))) + utc_time = datetime.datetime.fromtimestamp(int(float(s['state']['last_update'])), tz=timezone.utc) else: - self.new_hosts[host_name].services[service_name].last_check = datetime.datetime.fromisoformat(s['state']['last_update']) + #self.new_hosts[host_name].services[service_name].last_check = datetime.datetime.fromisoformat(s['state']['last_update']) + utc_time = datetime.datetime.fromisoformat(s['state']['last_update']) + + local_time = utc_time.astimezone() + self.new_hosts[host_name].services[service_name].last_check = local_time.strftime("%Y-%m-%d %H:%M:%S") # format without microseconds and tz self.new_hosts[host_name].services[service_name].attempt = "{}/{}".format(s['state']['check_attempt'],s['max_check_attempts']) self.new_hosts[host_name].services[service_name].status_information = BeautifulSoup(str(s['state']['output']).replace('\n', ' ').strip(), 'html.parser').text diff --git a/build/debian/changelog b/build/debian/changelog index fc5b7b22..7a926632 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,9 +1,9 @@ -nagstamon (3.17-20241028) unstable; urgency=low +nagstamon (3.17-20241102) unstable; urgency=low * New upstream - fix sound problem - fix IncingaDBWeb - -- Henri Wahl Mon, Oct 28 2024 08:00:00 +0200 + -- Henri Wahl Sat, Nov 02 2024 08:00:00 +0200 nagstamon (3.16.1) stable; urgency=low * New upstream