You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a script to parse availability reports from Nagios / Icinga but under some circumstances due to wrong downtime calculation, a huge integer appears as value. jshon then fails to parse the entire json output with an error "too big integer".
# curl -s -u user:pw "http://icinga.example.com/cgi-bin/icinga2-classicui/avail.cgi?show_log_entries=&host=internet&service=HTTP+mysite.example.com&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringnotrunning=yes&includesoftstates=no&initialassumedhoststate=0&initialassumedservicestate=0&timeperiod=lastmonth&backtrack=8&jsonoutput" | jshon -k
json read error: line 31 column 1350: too big integer near '18446744073709548794'
As you can see from the json output below, the problem comes from the value of field time_critical_unscheduled inside the avail/service_availability/services array.
I came across similar bug reports across other json projects (tc39/proposal-bigint#24, akheron/jansson#8), so this seems to be a json parsing problem in general. Is there a way to fix this in jshon or to simply ignore such a value, e.g. by returning 'int_too_big' ?
The text was updated successfully, but these errors were encountered:
I created a script to parse availability reports from Nagios / Icinga but under some circumstances due to wrong downtime calculation, a huge integer appears as value. jshon then fails to parse the entire json output with an error "too big integer".
As you can see from the json output below, the problem comes from the value of field
time_critical_unscheduled
inside the avail/service_availability/services array.I came across similar bug reports across other json projects (tc39/proposal-bigint#24, akheron/jansson#8), so this seems to be a json parsing problem in general. Is there a way to fix this in jshon or to simply ignore such a value, e.g. by returning 'int_too_big' ?
The text was updated successfully, but these errors were encountered: