This issue has been migrated from Redmine: https://dev.icinga.com/issues/11370
Created by kowallix on 2016-03-14 07:34:04 +00:00
Assignee: (none) Status: Closed (closed on 2016-05-10 11:54:28 +00:00) Target Version: (none) Last Update: 2016-05-11 07:39:44 +00:00 (in Redmine)
Icinga Version: 2.4.3
Backport?: Not yet backported
Include in Changelog: 1
I create a new checkcommand using the API. And I add a service which uses the new checkcommand.
Then I delete the service Then I want to delete the checkcommand
curl -k -s -u someone:secret -H 'Accept: application/json' -X DELETE 'https://icinga2poc.somewhere:5665/v1/objects/checkcommands/check_graphite_series_threshold' {results cannot be deleted because other objects depend on it. Use cascading delete to delete it anyway."],name could not be deleted.",type
I got a list of all services - no other check was using the checkcommand.
So I used the cascade option.
The checkcommand was deleted, but the classicUI was very unhappy.
Whoops! Error: Could not read object configuration data.
The log says: [1457418639] Error: Service description, host name, or check command is NULL [1457418639] Error: Could not register service (config file '/var/cache/icinga2/objects.cache', starting on line 271)
The Web2 UI continued to work. The classicUI worked after we restarted the icinga2 process.
Attachments
- i2_api_11370.png mfriedrich - 2016-05-10 11:53:14 +00:00
Relations:
- relates #11686
该提问来源于开源项目:Icinga/icinga2