[dev.icinga.com #11483] Numbers are not properly formatted in runtime macro strings #4077
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
i would like to use the runtime macros for services in the object NotificationCommand Environment
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.
Maybe the same problem exists with host runtime macros. Didnt try it.
I use the Snapshot v2.4.4-258-g97bd4c2
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:
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.
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.