Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 202 forks source link

How can I get serviceset services using REST-API? #1978

Open gaugstein opened 5 years ago

gaugstein commented 5 years ago

Hello together, thats the result of the API-Call that looks like the ui-weburl:

curl -sSku user:pwd -H 'Accept: application/json' -X GET 'http://127.0.0.1:86/icingaweb2/director/serviceset/services?name=anything-serviceset' { "description": "ServiceSet for Anything", "object_name": "anything-serviceset, "object_type": "template" } {"status":"error","message":"Not found"} < === ??

In advance: icingacli isn't an option ;).

When i get the service information from icinga2, the serviceset definition is only a reference:

... "source_location": { "first_column": 1.0, "first_line": 2329.0, "last_column": 62.0, "last_line": 2329.0, "path": "/var/lib/icinga2/api/packages/director/52761ee7-0835-4152-8ae6-d3d59ae9804f/zones.d/director-global/servicesets.conf" }, ...

Is there any solution for us, to get the services out of the serviceset? Regards ..

nomoresecrets commented 4 years ago

Like to know that too. We have to automate the removing all services from a serviceset and re-add new entries.