Icinga2 - Nagstamon getting TypeError with new Host Objects

yesterday we updated to 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 isn’t able to handle get requests by nagstamon for objects which were added after updating to

Has anybody else this issue?

Kind regards

1 Like

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,

1 Like

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)
    -> 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)
    -> 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:

Hello there!

Yes, looks like this will be kept as is for now, but the workaround that you found sounds pretty reasonable, considering the circumstances.
I hope it works for you?
Then again, I also totally understand how tedious it can be to touch every single object, especially if you’ve got a bunch of them…

Hoping for the best!

I was offered a non public Beta of Nagstamon by ifw-dresden. This Version seems to fix the problem

Hope they make it a official stable version soon
Kind regards

1 Like

I have removed the link to the non-public repo, as I don’t think the devs of nagstamon would want that to be posted publicly.

Hello at all,
I asked Mr. Wahl from ifw-dresden to publish the repository. He explicitly allowed me to publish the link to the actual testing repo. This one is now also a bit newer than the version I got in July, but also fixes the problem (I just tested it again).
Mr. Wahl wants also to publish this also via twitter and blog to reach some more Icinag2 users who might als have this issue.

Kind regards


Nice, thanks for that! :+1: