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

[dev.icinga.com #5465] Bugfix for #4339 actually breaks sending commands through API #1252

Closed
icinga-migration opened this issue Jan 15, 2014 · 4 comments

Comments

@icinga-migration
Copy link

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

Created by lensen on 2014-01-15 11:12:58 +00:00

Assignee: mfrosch
Status: Resolved (closed on 2014-02-18 15:14:13 +00:00)
Target Version: 1.10.1
Last Update: 2014-02-18 15:14:13 +00:00 (in Redmine)

Icinga Version: 1.10.2
Icinga Web Version: 1.10.0
IDO Version: 1.10.2
OS Version: Gentoo
DB Type: MySQL
DB Version: x
Browser Version: x

Sending commands through the API fails due to a bugfix for #4339

Example:
curl -d 'command=SCHEDULE_SVC_CHECK' -d 'data={checktime 14:44:07"}' -d 'target=[{instance http://icinga.instance1/icinga-web/web/api/cmd/authkey=validkey/json

Returns:

{"success":true,"errors":[]}

And nothing shows up in the (debug) logs.

I managed to fix this with attached patch.

Once patched, the API once again returns:

{"success":true}

And the external commands show up in the Icinga logs.

Attachments

Changesets

2014-02-18 12:38:20 +00:00 by mfrosch fd76752

Removed unnecessary try/catch block on ApiCommand.

Adopted from GitHub pull request ##1

Fixes #5465
Refs #5013

Relations:

@icinga-migration
Copy link
Author

Updated by lensen on 2014-01-15 11:16:08 +00:00

Created pull request on Github:
#1

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-01-15 11:28:08 +00:00

  • Category set to Commands
  • Status changed from New to Assigned
  • Assigned to set to mfrosch
  • Target Version set to 1.10.1

@icinga-migration
Copy link
Author

Updated by mfrosch on 2014-02-18 12:39:30 +00:00

Hey there,
thanks for your patch and pull request.

Marius fixed this initially in November, but I adopted your removal of the try/catch block.

-Markus

@icinga-migration
Copy link
Author

Updated by mfrosch on 2014-02-18 15:14:13 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset fd76752.

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