Icinga2 2.11.4.1 - Nagstamon getting TypeError with new Host Objects

Hi,
yesterday we updated to 2.11.4.1. Everything worked fine. Until we began to add aditional host objects. In icingaweb2 everythin is still fine, but Nagstamon is always getting

TypeError: int() argument must be a string, a bytes-like object or a number, not ‘NoneType’

when removing the added hosts, everything is fine again.
We now went back to 2.11.3. and now the new host objects don’t cause any errors. It seems like 2.11.4.1 isn’t able to handle get requests by nagstamon for objects which were added after updating to 2.11.4.1

Has anybody else this issue?

Kind regards
Robert

Hello there!

To me this sounds like an issue that should be opened on GitHub :slight_smile:
GitHub is a lot more ingrained into the developers workflow than the forum is, as it is where we collect our issues.

If you just wanted to ask whether others have a similar issue, that’s fine of course :slight_smile:

Have a nice day,
Feu

First of all I can’t tell if this problem is connected to the update of Icinga2 from 2.11.3 to 2.11.4 as the problematic checks have been established after the update.

The documentation in the Github issues (see below) helped me to drill down the problem to a calculation problem in Nagstamon based on a NULL value in the “Last State Change” fields for hosts and services (see below). In my case two new service checks have never changed state so there was a NULL value in the respective field.

Nagstamon: https://github.com/HenriWahl/Nagstamon/issues/653
Icinga2: https://github.com/Icinga/icinga2/issues/8091

How I found the problematic checks:

  1. List all hosts & add field “host_last_state_change” to list & sort by “host_last_state_change” (evtl. change sort order)
    https://icingamaster/icingaweb2/monitoring/list/hosts?sort=host_last_state_change&limit=2000&addColumns=host_last_state_change
    -> find entries with an empty field in the “host_last_state_change” column

  2. List all services & add field “service_last_state_change” to list & sort by “service_last_state_change” (evtl. change sort order)
    https://icingamaster/icingaweb2/monitoring/list/services?sort=service_last_state_change&limit=2000&addColumns=service_last_state_change
    -> find entries with an empty field in the “service_last_state_change” column

If there are any hosts or services with no “Last State Change” timestamp go ahead and enter a manual “check result” by clicking “Process check result” and switching to another status (e.g from UNKNOWN to WARNING).
Repeat this for every host or service with a NULL value.
After changing the status the check will have a time stamp in “Last state change” and Nagstamon will be able to process the data.

The problematic calculation in Nagstamon has been fixed via the above mentioned issue and has found its way into “Nagstamon 3.5 Testing Release”.
Instead of rolling out the testing release of Nagstamon 3.5 on several dozens of admin machines I’ve preferred to fix the entries in Icinga2 manually. :grimacing: