[dev.icinga.com #2160] Invalid json output for tac.cgi #811

Closed
icinga-migration opened this Issue Dec 6, 2011 · 8 comments

Projects

None yet

1 participant

@icinga-migration
Member

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

Created by prudnikov on 2011-12-06 18:52:45 +00:00

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

Icinga Version: 1.10.0
OS Version: any

Observed in Icinga 1.5.1 and 1.6.0.
When calling tac.cgi with jsonoutput paramenter, the result is an invalid json.
In the end of the document commas are missing between fields:

"total_active_service_checks": 43,
"total_passive_service_checks": 0
"total_disabled_service_checks": 0
"total_active_service_checks_with_passive_disabled": 0
 }

Changesets

2011-12-06 19:57:06 +00:00 by ricardo db6da79

classic ui: fixed invalid json output for tac.cgi #2160

refs: #2160

2012-04-28 08:58:31 +00:00 by ricardo 65674be

classic ui: fixed invalid json output for tac.cgi #2160

refs: #2160

Conflicts:

	Changelog

Relations:

@icinga-migration
Member

Updated by ricardo on 2011-12-06 18:56:03 +00:00

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

sorry for the inconvenience, will have a look tonight

@icinga-migration
Member

Updated by mfriedrich on 2011-12-06 19:02:56 +00:00

if you need an 1.6.2, lemme know - if you find other serious bugs. make sure then to rebranch your tree to work on 1.6.x and 1.7.x tree.

@icinga-migration
Member

Updated by ricardo on 2011-12-06 19:48:34 +00:00

diff --git a/cgi/tac.c b/cgi/tac.c
index ae8c189..56aea71 100644
--- a/cgi/tac.c
+++ b/cgi/tac.c
@@ -1710,8 +1710,8 @@ void display_tac_overview(void) {
                printf("\"total_active_host_checks_with_passive_disabled\": %d,\n", total_active_host_checks_with_passive_disabled);

                printf("\"total_active_service_checks\": %d,\n", total_active_service_checks);
-               printf("\"total_passive_service_checks\": %d\n", total_passive_service_checks);
-               printf("\"total_disabled_service_checks\": %d\n", total_disabled_service_checks);
+               printf("\"total_passive_service_checks\": %d,\n", total_passive_service_checks);
+               printf("\"total_disabled_service_checks\": %d,\n", total_disabled_service_checks);
                printf("\"total_active_service_checks_with_passive_disabled\": %d\n", total_active_service_checks_with_passive_disabled);

                printf(" }\n");

This would be the patch if you compile from source.

Otherwise it would hit the next bugfix release.

@icinga-migration
Member

Updated by prudnikov on 2011-12-06 20:17:19 +00:00

Thanks!
This was fast!

@icinga-migration
Member

Updated by ricardo on 2012-01-15 00:31:38 +00:00

  • Status changed from New to Feedback
@icinga-migration
Member

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

  • Status changed from Feedback to Resolved
@icinga-migration
Member

Updated by mfriedrich on 2012-05-04 14:57:32 +00:00

  • Done % changed from 0 to 100
@icinga-migration
Member

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

  • Project changed from 19 to Core, Classic UI, IDOUtils
  • Category set 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