-
Notifications
You must be signed in to change notification settings - Fork 573
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
[dev.icinga.com #11483] Numbers are not properly formatted in runtime macro strings #4077
Comments
Updated by mfriedrich on 2016-03-31 09:45:11 +00:00
|
Updated by mfriedrich on 2016-04-01 11:48:07 +00:00 Simple test case:
|
Updated by sys_x on 2016-04-04 06:15:15 +00:00 Tried the test case: The output of the macro "host.next_check" isnt formatted. Output:
|
Updated by gbeutner on 2016-06-16 13:16:42 +00:00
|
Updated by gbeutner on 2016-06-16 13:20:03 +00:00
Applied in changeset bc6f7d7. |
Updated by mfriedrich on 2016-06-20 12:39:08 +00:00
The floating point numbers are causing problems with external add ons such as PNP. Can be reproduced using the icinga2x Vagrant box.
We're using the "last_check" attribute if not specified.
|
Updated by mfriedrich on 2016-06-20 13:21:56 +00:00 I've looked through the PNP process_perfdata.pl code and there are a lot of timet/TIMET references which are not sanitised. RRDTool's time specification expects timestamps in seconds, but cannot handle floating point numbers. Seems we've hit yet another undefined specification for runtime macro timestamps. I see 4 possibilities
I'd go for the last option as I find it strange that external add ons cannot handle timestamps in anything other than non-floating point notation. |
Updated by gbeutner on 2016-06-21 06:20:25 +00:00 Or we could just make an exception for |
Updated by gbeutner on 2016-06-21 06:25:06 +00:00
Applied in changeset b5a38f6. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/11483
Created by sys_x on 2016-03-31 07:48:01 +00:00
Assignee: gbeutner
Status: Resolved (closed on 2016-06-21 06:25:06 +00:00)
Target Version: 2.5.0
Last Update: 2016-06-21 10:40:22 +00:00 (in Redmine)
Hey there,
i would like to use the runtime macros for services in the object NotificationCommand Environment
like last_check, last_state_change, last_state_ok, and so on.
But in my E-Mail notification i will get timestamps like "1.45933e+09".
Tried the following macros an get a wrong timestamps like "1.45941e+09"
but the macro last_state_change works fine.
Reference:
https://monitoring-portal.org/index.php?thread/35670-runtime-macro-last-state-ok/#post227026
Maybe the same problem exists with host runtime macros. Didnt try it.
I use the Snapshot v2.4.4-258-g97bd4c2
Attachments
Changesets
2016-06-16 13:14:35 +00:00 by gbeutner bc6f7d7
2016-06-16 13:32:29 +00:00 by gbeutner 039461e
2016-06-16 15:39:59 +00:00 by mfriedrich b4c56e5
2016-06-21 06:23:31 +00:00 by gbeutner b5a38f6
2016-06-21 09:29:12 +00:00 by gbeutner e3f1c1e
2016-07-05 11:17:18 +00:00 by mfriedrich c73e4d3
The text was updated successfully, but these errors were encountered: