metric-toggle
Turn metrics, collector types, or all monitoring on or off for a specific database instance, and require a reason when disabling one metric.
Instructions
dbabrain common.cli metric-toggle: A metric, a collector type or all of them switched on or off for one instance.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
server_id (required): The instance.
scope (required): all | a collector type | a METRIC_CODE.
state (required): on | off.
reason: With state off and a METRIC_CODE scope: why the metric is off, written as metric_overrides..disabled_reason. Refused with state on or another scope; switching the metric on clears it.
data_dir: Another data/ folder to read.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "metric-toggle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |