metric-env
Set or remove environment variables that collector scripts read for a database instance or specific metric block, while refusing secret values and mapping them to references.
Instructions
dbabrain common.cli metric-env: The inputs a collector script reads from one instance, set or removed.
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, as written in db_instances.json.
env (required): {NAME: value}: written to metrics.collector_env; a value of null removes NAME. A name carrying a secret is refused - metrics.env_secrets maps it to a ref.
metric_code: The variables go to that metric's own block (metric_overrides..collector_env), which wins over the target's.
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-env"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |