Icinga / icinga-core

Icinga 1.x, the old core (EOL 31.12.2018)
GNU General Public License v2.0
45 stars 27 forks source link

[dev.icinga.com #10684] Help Icinga2 User to use command expansion in Classic-UI #1566

Closed icinga-migration closed 7 years ago

icinga-migration commented 9 years ago

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

Created by ricardo on 2015-11-19 23:28:15 +00:00

Assignee: ricardo Status: Resolved (closed on 2016-12-22 19:20:04 +00:00) Target Version: 1.14 Last Update: 2016-12-22 19:20:04 +00:00 (in Redmine)


you can retrieve the executed command in following ways:

Host example:

curl -k -s -u apiuser:apipassword 'https://localhost:5665/v1/objects/hosts?host=localhost&attrs=host.last_check_result' | sed 's/.*command":\["//g' | cut -d']' -f1 | sed 's/","/ /g' | tr -d '"$'

Service example:

curl -k -s -u apiuser:apipassword 'https://localhost:5665/v1/objects/services?service=localhost!HTTP&attrs=service.last_check_result' | sed 's/.*command":\["//g' | cut -d']' -f1 | sed 's/","/ /g' | tr -d '"$'

This way you can debug your commands easier with Icinga 2.

Cheers Ricardo

Changesets

2015-11-19 23:31:04 +00:00 by ricardo 6a78dc4c20dcf9d472ccaba8afcb25f9eddc122c

Classic-UI: Help Icinga2 User to use command expansion #10684

This change will display the Icinga2 API call if backend is
icinga2 and command expansion is selected on a host or service.

Refs: #10684

2015-11-19 23:43:29 +00:00 by ricardo 94a4f007fdb07c3891f96ebb15ea9708d71a1f5f

Classic-UI: Help Icinga2 User to use command expansion #10684

This change will display the Icinga2 API call if backend is
icinga2 and command expansion is selected on a host or service.

Refs: #10684

2016-09-22 18:44:14 +00:00 by ricardo 31f8256835dee265a4836eb44f4cd599cde9f6b0

Classic-UI: Help Icinga2 User to use command expansion #10684

This change will display the Icinga2 API call if backend is
icinga2 and command expansion is selected on a host or service.

fixes #10684

2016-12-22 18:50:52 +00:00 by mfriedrich 0138a6f1685621db910ae9c87f3cd5230c79f880

Fix Icinga 2 API URL helper

fixes #10684
icinga-migration commented 9 years ago

Updated by mfriedrich on 2015-11-20 09:40:13 +00:00

Using "-k" in practical examples is pretty much insecure and shouldn't be advertised much more than in the api docs where an explanation is available.

icinga-migration commented 9 years ago

Updated by mfriedrich on 2015-11-20 09:41:44 +00:00

Apart from that, the UI should just point to the documentation, and not duplicate the information. I'm currently not really happy with that feature, not to say - I don't like it.

icinga-migration commented 8 years ago

Updated by ricardo on 2016-06-21 21:27:09 +00:00

any other thoughts on that? Is there anything planed to be implemented with "icinga2 object list ..."?

icinga-migration commented 8 years ago

Updated by mfriedrich on 2016-09-22 18:40:52 +00:00

After thinking about that for a while - I don't really care about that being added anymore. Go for merging it to master.

icinga-migration commented 8 years ago

Updated by ricardo on 2016-09-22 18:45:57 +00:00

Applied in changeset 31f8256835dee265a4836eb44f4cd599cde9f6b0.

icinga-migration commented 8 years ago

Updated by ricardo on 2016-09-22 19:17:15 +00:00

I doubt it works anymore.

Did you test it?

icinga-migration commented 8 years ago

Updated by mfriedrich on 2016-09-22 19:22:00 +00:00

No, those commands were looking good to me. Anything specific you are referring to?

icinga-migration commented 7 years ago

Updated by mfriedrich on 2016-12-22 19:20:04 +00:00

Applied in changeset 0138a6f1685621db910ae9c87f3cd5230c79f880.