diff --git a/.github/workflows/build-release-latest-test-artifacts.yml_deactivated b/.github/workflows/build-release-latest-test-artifacts.yml_deactivated deleted file mode 100644 index 148a3d36..00000000 --- a/.github/workflows/build-release-latest-test-artifacts.yml_deactivated +++ /dev/null @@ -1,293 +0,0 @@ -name: build-release-latest -on: - push: - tags-ignore: 'v*' - branches: - - '**' - - '!master' - - '!*.*.*' - -env: - python_win_version: 3.11.8 - repo_dir: nagstamon-jekyll/docs/repo - cr_image: ghcr.io/henriwahl/build-nagstamon - # to be increased if new updates of build images are necessary - cr_image_version: 4 - # release type this file is used for - release: latest - -jobs: - debian: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon -e DEB_BUILD_OPTIONS=nocheck ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.deb - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - - fedora-37: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.rpm - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - - fedora-38: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.rpm - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - - fedora-39: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.rpm - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - - fedora-40: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.rpm - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - - fedora-41: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.rpm - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - - rhel-9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # docker login is needed for pushing the build image - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed - - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . - - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - # building in precompiled image makes them way faster instead of creating the build environment every time from scratch - - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} - - uses: actions/upload-artifact@v4 - with: - path: build/*.rpm - retention-days: 1 - if-no-files-found: error - name: ${{ github.job }} - -# borrowed from dhcpy6d - repo-debian: - runs-on: ubuntu-latest - # try to avoid race condition and start uploading only after the last install package has been build - needs: [debian, fedora-37, fedora-38, fedora-39, fedora-40, fedora-41, rhel-9] - env: - family: debian - steps: - - uses: actions/checkout@v4 - # get binaries created by other jobs - - uses: actions/download-artifact@v4 - with: - pattern: 'debian*' - path: artifact - merge-multiple: true - - run: pwd - - run: find . -name '*.deb' - # get secret signing key - - run: echo "${{ secrets.PACKAGE_SIGNING_KEY }}" > signing_key.asc - # organize SSH deploy key for nagstamon-jekyll repo - - run: mkdir ~/.ssh - - run: echo "${{ secrets.NAGSTAMON_REPO_KEY_WEB }}" > ~/.ssh/id_ed25519 - - run: chmod -R go-rwx ~/.ssh - # get and prepare nagstamon-jekyll - - run: git clone git@github.com:HenriWahl/nagstamon-jekyll.git - - run: rm -rf ${{ env.repo_dir }}/${{ env.family }}/${{ env.dist }}/${{ env.release }} - - run: mkdir -p ${{ env.repo_dir }}/${{ env.family }}/${{ env.dist }}/${{ env.release }} - # create deb repo via Debian build container - - run: | - /usr/bin/docker run --rm \ - -v ${{ github.workspace }}:/workspace \ - -v $PWD/${{ env.repo_dir }}/${{ env.family }}/${{ env.release }}:/repo \ - ${{ env.cr_image }}-${{ env.family }}:${{ env.cr_image_version }} \ - /bin/sh -c "cd /workspace && \ - gpg --import signing_key.asc && \ - cp -r artifact/*.deb nagstamon-jekyll/docs/repo/${{ env.family }}/${{ env.release }} && \ - cd nagstamon-jekyll/docs/repo/${{ env.family }}/${{ env.release }} - dpkg-scanpackages . > Packages && \ - gzip -k -f Packages && \ - apt-ftparchive release . > Release && \ - gpg -abs -o Release.gpg Release && \ - gpg --clearsign -o InRelease Release && \ - gpg --output key.gpg --armor --export" - # commit and push new binaries to nagstamon-jekyll - - run: git config --global user.email "repo@nagstamon.de" && git config --global user.name "Nagstamon Repository" - - run: cd ${{ env.repo_dir }} && git add . && git commit -am "new ${{ env.release }} repo ${{ env.family }}" && git push - - repo-rpm-fedora: - runs-on: ubuntu-latest - # if not all are ready there might be trouble when downloading artifacts - # maybe faster now with build containers - needs: [repo-debian] - env: - family: fedora - # which image to use for packaging - cr_image_latest: 39 - steps: - # get binaries created by other jobs - - uses: actions/download-artifact@v4 - with: - pattern: 'fedora*' - path: artifact - merge-multiple: true - # organize SSH deploy key for nagstamon-repo - - run: mkdir ~/.ssh - - run: echo "${{ secrets.NAGSTAMON_REPO_KEY_WEB }}" > ~/.ssh/id_ed25519 - - run: chmod -R go-rwx ~/.ssh - # get and prepare nagstamon-jekyll - - run: git clone git@github.com:HenriWahl/nagstamon-jekyll.git - - run: rm -rf ${{ env.repo_dir }}/${{ env.family }}/${{ env.release }} - - run: mkdir -p ${{ env.repo_dir }}/${{ env.family }}/${{ env.release }} - # copy *.rpm files into nagstamon-jekyll and create repodata - - run: | - version=${{ env.release }} && \ - mkdir -p mkdir -p ${{ env.repo_dir }}/${{ env.family }}/${version} && \ - cp -r artifact/*.${{ env.family }}* ${{ env.repo_dir }}/${{ env.family }}/${version} && \ - docker run --rm -v ${PWD}/${{ env.repo_dir }}/${{ env.family }}/${version}:/repo \ - ${{ env.cr_image }}-${{ env.family }}-${{ env.cr_image_latest }}:${{ env.cr_image_version }} \ - /bin/bash -c "createrepo --verbose --workers 1 /repo" && \ - ls -laR ${PWD}/${{ env.repo_dir }}/${{ env.family }}/${version} - # commit and push new binaries to nagstamon-repo - - run: git config --global user.email "repo@nagstamon.de" && git config --global user.name "Nagstamon Repository" - - run: cd ${{ env.repo_dir }} && git pull && git add . && git commit -am "new latest repo ${{ env.family }}" && git push - - repo-rpm-rhel: - runs-on: ubuntu-latest - # if not all are ready there might be trouble when downloading artifacts - # maybe faster now with build containers - needs: [repo-rpm-fedora] - env: - family: rhel - # currently just one version available - version: 9 - steps: - # get binaries created by other jobs - - uses: actions/download-artifact@v4 - with: - pattern: 'rhel*' - path: artifact - merge-multiple: true - # organize SSH deploy key for nagstamon-repo - - run: mkdir ~/.ssh - - run: echo "${{ secrets.NAGSTAMON_REPO_KEY_WEB }}" > ~/.ssh/id_ed25519 - - run: chmod -R go-rwx ~/.ssh - # get and prepare nagstamon-jekyll - - run: git clone git@github.com:HenriWahl/nagstamon-jekyll.git - - run: rm -rf ${{ env.repo_dir }}/${{ env.family }}/${{ env.release }} - - run: mkdir -p ${{ env.repo_dir }}/${{ env.family }}/${{ env.release }} - # copy *.rpm files into nagstamon-jekyll and create repodata - - run: | - version=${{ env.release }} && \ - mkdir -p mkdir -p ${{ env.repo_dir }}/${{ env.family }}/${version} && \ - cp -r artifact/*.${{ env.family }}* ${{ env.repo_dir }}/${{ env.family }}/${version} && \ - docker run --rm -v ${PWD}/${{ env.repo_dir }}/${{ env.family }}/${version}:/repo \ - ${{ env.cr_image }}-${{ env.family }}-${{ env.version }}:${{ env.cr_image_version }} \ - /bin/bash -c "createrepo --verbose --workers 1 /repo" && \ - ls -laR ${PWD}/${{ env.repo_dir }}/${{ env.family }}/${version} - # commit and push new binaries to nagstamon-repo - - run: git config --global user.email "repo@nagstamon.de" && git config --global user.name "Nagstamon Repository" - - run: cd ${{ env.repo_dir }} && git pull && git add . && git commit -am "new latest repo ${{ env.family }}" && git push diff --git a/Nagstamon/Config.py b/Nagstamon/Config.py index 455c0a93..7c2b36bc 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.15-20240420' + VERSION = '3.15-20240503' 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 bb40aa26..3d637c53 100644 --- a/Nagstamon/Servers/IcingaDBWeb.py +++ b/Nagstamon/Servers/IcingaDBWeb.py @@ -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 @@ -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)) diff --git a/build/debian/changelog b/build/debian/changelog index 2c76d57b..1712846d 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,7 +1,7 @@ -nagstamon (3.15-20240420) unstable; urgency=low +nagstamon (3.15-20240503) unstable; urgency=low * New upstream - -- Henri Wahl Sat, Apr 20 2024 08:00:00 +0200 + -- Henri Wahl Fri, May 05 2024 08:00:00 +0200 nagstamon (3.14.0) stable; urgency=low * New upstream