Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #10976] Explain how to join hosts/services for /v1/objects/comments #3845

Closed
icinga-migration opened this issue Jan 18, 2016 · 5 comments
Labels
area/documentation End-user or developer help bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by GreenRover on 2016-01-18 11:42:10 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-02-24 20:35:03 +00:00)
Target Version: 2.4.4
Last Update: 2016-03-11 14:49:32 +00:00 (in Redmine)

Icinga Version: r2.4.1-1
Backport?: Already backported
Include in Changelog: 1

The api "/v1/objects/services"

returns for acknowledged services:

acknowledgement: 2,
acknowledgement_expiry: 1453128652,

But i miss:

acknowledgement_user
acknowledgement_comment

Why you dont return this information?
Are there any further methodes to get acknowledbgemtn comments by api?

Changesets

2016-02-24 20:31:10 +00:00 by mfriedrich 3228586

Docs: Add an example for API joins with comments and host/services

fixes #10976

2016-03-11 14:49:22 +00:00 by mfriedrich cd5f11b

Docs: Add an example for API joins with comments and host/services

fixes #10976
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-21 18:13:52 +00:00

  • Subject changed from API /v1/objects/services dont return comment to API /v1/objects/services does not return comments for acknowledgements
  • Status changed from New to Feedback
  • Assigned to set to GreenRover

Query /v1/objects/comments and map that accordingly (entry_type = 4 is an acknowledgement).

https://localhost:5665/v1/objects/comments?joins=host&joins=service

{
"attrs": {
"__name": "mbmif.int.netways.de!disk!mbmif.local-1453399892-0",
"active": true,
"author": "icingaadmin",
"entry_time": 1453399892.497225,
"entry_type": 4,
"expire_time": 0,
"ha_mode": 0,
"host_name": "mbmif.int.netways.de",
"legacy_id": 2,
"name": "mbmif.local-1453399892-0",
"original_attributes": null,
"package": "_api",
"paused": false,
"service_name": "disk",
"templates": [
"mbmif.local-1453399892-0"
],
"text": "i know",
"type": "Comment",
"version": 1453399892.493027,
"zone": ""
},
"joins": { },
"meta": { },
"name": "mbmif.int.netways.de!disk!mbmif.local-1453399892-0",
"type": "Comment"
}

@icinga-migration
Copy link
Author

Updated by GreenRover on 2016-01-23 19:31:11 +00:00

Thanks that is what i was looking for, dint found it at the documentation.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 20:32:27 +00:00

  • Subject changed from API /v1/objects/services does not return comments for acknowledgements to Explain how to join hosts/services for /v1/objects/comments
  • Category changed from API to Documentation
  • Status changed from Feedback to Assigned
  • Assigned to changed from GreenRover to mfriedrich
  • Target Version set to 2.4.4

Ok thanks for the feedback. I've updated the documentation to make it more clear.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 20:35:03 +00:00

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

Applied in changeset 3228586.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-03-11 14:49:32 +00:00

  • Backport? changed from Not yet backported to Already backported

@icinga-migration icinga-migration added bug Something isn't working area/documentation End-user or developer help labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.4 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation End-user or developer help bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant