-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
date string issue #962
Comments
@jr-timme any idea? |
We don't build the Icinga packages ourselves, we're currently running the latest Versions from the Icinga Debian repository:
So I can't really speak to the Master Branch version but with the versions from the official repository the icingadb module returns the [...]
"state": {
[...]
"last_update": "1695295061.506",
[...] I don't really have any deeper knowledge of the Icinga Code, but it looks to me as that is still the case in the master Branch: How the icingaweb2 version could change that I don't know. @sebek72 did you change anything in regard to the timestamps, so that they are already formatted instead of in Milliseconds since the Unix Epoch? |
Hi. Thanks for the feedback. I would not know where to change that :) mariadb output seems to be fine |
Could you check the raw json output, just to make sure that the date there is already formatted? curl -v -l -b cookies.txt -c cookies.txt "http://10.55.32.212:8080/icingadb/hosts?host.state.is_problem=y&host.state.state_type=hard&columns=host.state.last_update&format=json" | jq cookies can either be exported from a browser or generated through another curl in which you authenticate yourself |
This is the json output:
Update: |
Sorry.. missed the host part. Working on it! |
fixed issue with date string in new icingadb version for host objects #962
fix should be backwards compatible fixed #962
It works now thanks! |
I updated and now have a new issue. https://stackoverflow.com/questions/60266554/type-object-datetime-datetime-has-no-attribute-fromisoformat |
@sebek72 well, maybe the easiest fix is an update to EL9? Even Python 3.7 is out there for a while. I saw that you can install python38, python39, python3.11 even in EL8 - maybe try it this way? |
@sebek72 how do you get it running at all? Looks like you need to do some special moves anyway? |
I will check how to use different python in EL8 (I took the EL8 src rpm and changed the spec file to re-create the EL8 rpm). Dockerfile
I am able to start it on MacOS (with XQuartz: https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285, for audio it is a bit tricky (with pulse audio), but on linux it should be more straightforward).
|
Hi @sebek72 - there is also a native binary for macOS - just in case. |
Hi @sebek72 - just out of curiosity: did you try with https://github.com/mviereck/x11docker already? Looks like another solution. |
I know about it, but still need to test, thanks. Flatpak is something that I will not pursue ;) |
fix should be backwards compatible fixed #962
Hi! Thank you for the work and the fix. Is it possible to release this any time soon? |
It is available as testing release 3.13-20231117 right now. |
Kinda in a dead lock....if I use python3.6 for EL8 I can create and run the rpm...but then have a fromisoformat issue (newer python needed). |
I have managed to create an el8 rpm using python3.8 But still have the date issue pip3 list | grep date |
@sebek72 due to missing dependencies there was just added EL9 support. |
Having issues with the latest 20230808 build.
monitor type: icingaDBWEB
backend:
icingaweb2.11.4+ (build from master from August)
icingadb 1.1.0
icingadb-web (master, pre 1.1.0)
DEBUG: 2023-08-28 12:37:00.660402 NEW PROD Start rechecking all DEBUG: 2023-08-28 12:37:02.245729 NEW PROD Refreshing all hosts and services DEBUG: 2023-08-28 12:37:02.876868 NEW PROD FetchURL: http://10.55.32.212:8080/icingadb/hosts?host.state.is_problem=y&host.state.state_type=hard&columns=host.state.last_update&format=json CGI Data: None ERROR: 2023-08-28 12:37:02.987765 NEW PROD Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/Nagstamon/Servers/IcingaDBWeb.py", line 211, in _get_status self.new_hosts[host_name].last_check = datetime.datetime.fromtimestamp(int(float(h['state']['last_update']))) ValueError: could not convert string to float: '2023-08-25T07:02:14.894+00:00'
P.S: older icingaweb2 (no icingadb) works ok.
The text was updated successfully, but these errors were encountered: