Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

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

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

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

icinga-migration opened this issue Dec 6, 2011 · 8 comments
Milestone

Comments

@icinga-migration
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

Thanks!
This was fast!

@icinga-migration
Copy link
Author

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

  • Status changed from New to Feedback

@icinga-migration
Copy link
Author

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

  • Status changed from Feedback to Resolved

@icinga-migration
Copy link
Author

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

  • Done % changed from 0 to 100

@icinga-migration
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant