[dev.icinga.com #2343] JSON output for comments and downtimes in extinfo.cgi sometimes invalid #874

Closed
icinga-migration opened this Issue Feb 22, 2012 · 4 comments

Projects

None yet

1 participant

@icinga-migration
Member

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2343

Created by xav on 2012-02-22 14:21:35 +00:00

Assignee: ricardo
Status: Resolved (closed on 2012-04-13 19:08:59 +00:00)
Target Version: 1.7
Last Update: 2014-12-08 09:42:32 +00:00 (in Redmine)

Icinga Version: 1.10.0
OS Version: any

Hi,

JSON comments export doesn't seem to output valid JSON code when there is one or more services comment and no host comment.

Version used : 1.6.1

Here is an example :

{ "cgi_json_version": "1.6.0",
"extinfo": {
"comments": [
,
{ "host_name": "dummy-host", "service_description": "Dummy Service", 
"comment_type": "SERVICE", "entry_time": "2012-02-22 10:34:43", "author": "admin", 
"comment": "test", "comment_id": 119, "persistent": false, "comment_type": "Acknowledgement", "expires": "1970-01-01 01:00:00" }
]
}
}

There is an additional comma which seems to is the issue.

Changesets

2012-02-24 14:00:31 +00:00 by ricardo 582ff40

classic ui: fixed json output for comments and downtimes in extinfo.cgi sometimes invalid #2343

refs: #2343

* changes array names in json output of extinfo.c
        comments  -> host_comments  / service_comments
        downtimes -> host_downtimes / service_downtimes

2012-04-13 18:48:07 +00:00 by ricardo 7b9ec5b

classic-ui: updated Changelog CHANGES section

refs: #1524
refs: #1981
refs: #2018
refs: #2117
refs: #2119
refs: #2145
refs: #2198
refs: #2343
refs: #2359
refs: #2373
refs: #2421

hope the "changes" section for classic ui isn't tooo long

2012-04-28 09:03:28 +00:00 by ricardo 11ae7d3

classic ui: fixed json output for comments and downtimes in extinfo.cgi sometimes invalid #2343

refs: #2343

* changes array names in json output of extinfo.c
        comments  -> host_comments  / service_comments
        downtimes -> host_downtimes / service_downtimes

Conflicts:

	Changelog
	Changelog_json
@icinga-migration
Member

Updated by ricardo on 2012-02-22 15:33:43 +00:00

  • Assigned to set to ricardo
  • Target Version set to 1.7

Hi,

I'll have a look at it.

@icinga-migration
Member

Updated by ricardo on 2012-02-24 14:01:29 +00:00

  • Subject changed from JSON comments output not valid to JSON output for comments and downtimes in extinfo.cgi sometimes invalid
  • Status changed from New to Feedback
  • Done % changed from 0 to 100

fixed in current git "rbartels/cgi".

!!! Array names have changed:

    comments  -> host_comments  / service_comments
    downtimes -> host_downtimes / service_downtimes

please test if this works for you

@icinga-migration
Member

Updated by ricardo on 2012-04-13 19:08:59 +00:00

  • Status changed from Feedback to Resolved

Added note to changes in Changelog and to Changelog_json

@icinga-migration
Member

Updated by mfriedrich on 2014-12-08 09:42:32 +00:00

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category changed from 78 to Classic UI
  • Icinga Version set to 1
  • OS Version set to any
@icinga-migration icinga-migration added this to the 1.7 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment