[dev.icinga.com #5217] status output in JSON format not including short and long plugin output properly #1396
Comments
Updated by ddegois on 2013-11-26 11:04:26 +00:00 Sorry I wanted to post it in CORE section :/ My bad. Can somebody move it ? Regards, |
Updated by mfriedrich on 2013-11-26 11:05:53 +00:00
|
Updated by ricardo on 2013-11-26 19:04:14 +00:00 Hello Damien, you can get this behavior by splitting the string after the first line break if there is any. example: status_information "Connection refused\nSMTP CRITICAL - 0.023 sec. response time\ntest123"
And isn't it usually properly escaped? Cheers Ricardo |
Updated by ddegois on 2013-11-27 01:21:29 +00:00 Hi Ricardo, I agree but currently, in style=servicedetail or style=hostdetail, status_information contains serviceoutput, not longserviceoutput :) My suggestion was to add a dedicated key for longserviceoption to avoid breaking compatibility with older softwares and while improving overviews. My point of view is, as JSON output is more software/API and mostly non-human-reading oriented, to have maximum information in minimum of request might be a good idea, (personal opinion :D ). Regards, |
Updated by ricardo on 2013-12-02 22:55:59 +00:00
ddegois wrote:
In both styles it contains the longserviceoutput (as described in previous post) )as long as you have the cgi.cfg option "status_show_long_plugin_output" switched to 1. Cheers |
Updated by ddegois on 2013-12-02 23:33:22 +00:00 I've spotted a subtle difference between HTML output and JSON output (on status.cgi in search mode or overview). It seems that on JSON, only the second line is shown. In HTML table, the Status information call contains: On the JSON output, the "status_information" key contains only the second line: Did I miss something ? Regards, |
Updated by mfriedrich on 2013-12-03 08:01:24 +00:00 long output is always considered the 2..n lines of the output. the html formatting just presents the \n in a familiar manner ( http://docs.icinga.org/latest/en/pluginapi.html#outputspec not only the cgis behave that way, also the internal column attributes are populated like so. |
Updated by ddegois on 2013-12-03 08:43:01 +00:00 I agree but status information in HTML table shows both lines, I was expecting the same behavior on JSON output. Regards, |
Updated by ricardo on 2013-12-03 09:02:17 +00:00 This should NOT happen. ;-) (I'm at stage 3 of the 6 stages of debugging) I will have a look at it. (proceeding to 4) |
Updated by ddegois on 2013-12-03 09:04:04 +00:00 So maybe it could be an option to have both in JSON, short as usual and long in a different key ? |
Updated by ricardo on 2013-12-03 10:26:50 +00:00
Stage 5 and 6 now ;-) |
Updated by ricardo on 2013-12-03 11:20:31 +00:00
|
Updated by ricardo on 2013-12-03 15:36:30 +00:00 Is your problem fixed with commit 7999005 ?? |
Updated by ricardo on 2013-12-03 15:42:13 +00:00
Applied in changeset icinga-core:b430bb827782f0c1b4e3934fb85b285be25191cf. |
Updated by ddegois on 2013-12-03 16:54:26 +00:00 Sorry for the delay, looks good, thanks :) Regards, |
Updated by mfriedrich on 2014-12-08 09:21:43 +00:00
|
This issue has been migrated from Redmine: https://dev.icinga.com/issues/5217
Created by ddegois on 2013-11-26 11:03:05 +00:00
Assignee: ricardo
Status: Resolved (closed on 2013-12-03 15:42:13 +00:00)
Target Version: 1.10.2
Last Update: 2014-12-08 09:21:43 +00:00 (in Redmine)
Hello,
It would be nice to have a configuration option to add LONGSERVICEOUTPUT properly escaped in a new fiels of service status overview's JSON output (http://classic.demo.icinga.org/icinga/cgi-bin/status.cgi?host=all&type=detail&servicestatustypes=16&serviceprops=1048576&jsonoutput), no ?
Regards,
Damien
Changesets
2013-12-03 11:22:27 +00:00 by ricardo 7999005
2013-12-03 15:28:55 +00:00 by ricardo b430bb8
2013-12-04 21:15:09 +00:00 by ricardo 19307be
2013-12-04 21:29:21 +00:00 by ricardo 265ebfa
2013-12-13 12:50:34 +00:00 by ricardo 8e18f34
The text was updated successfully, but these errors were encountered: