Merge remote-tracking branch 'origin/2.3' into 2.4
This commit is contained in:
commit
6fdb7ed089
@ -366,7 +366,7 @@ Invalid JSON body:
|
||||
### Destroy a monitor
|
||||
|
||||
```
|
||||
DELETE /v1/monitors/:name/stop
|
||||
DELETE /v1/monitors/:name
|
||||
```
|
||||
|
||||
Destroy a created monitor. The monitor must not have relationships to any
|
||||
|
@ -122,6 +122,11 @@ const service_fields = [
|
||||
path: 'relationships.servers.data[].id',
|
||||
description: 'Servers that the service uses'
|
||||
},
|
||||
{
|
||||
name: 'Filters',
|
||||
path: 'relationships.filters.data[].id',
|
||||
description: 'Filters that the service uses'
|
||||
},
|
||||
{
|
||||
name: 'Parameters',
|
||||
path: 'attributes.parameters',
|
||||
|
@ -1352,7 +1352,11 @@ bool runtime_destroy_monitor(Monitor* monitor)
|
||||
{
|
||||
bool rval = false;
|
||||
|
||||
if (Service* s = service_uses_monitor(monitor))
|
||||
if (!monitor->servers().empty())
|
||||
{
|
||||
config_runtime_error("Cannot destroy monitor '%s', it is monitoring servers.", monitor->name());
|
||||
}
|
||||
else if (Service* s = service_uses_monitor(monitor))
|
||||
{
|
||||
config_runtime_error("Monitor '%s' cannot be destroyed as it is used by service '%s'",
|
||||
monitor->name(), s->name());
|
||||
|
Loading…
x
Reference in New Issue
Block a user