agent.yaml. If you only need to onboard the host object, keep the default configuration first. After the host appears in the console, add MySQL, Redis, PostgreSQL, and other objects as needed.
Basic configuration example
The following configuration is suitable for first-time onboarding:locator_mappings
locator_mappings controls the object address displayed in the console. It is commonly used for non-host objects such as MySQL.
For example, the Agent connects to MySQL through a local address:
- If MySQL, Redis, PostgreSQL, MongoDB, or similar services are configured with
localhostor127.0.0.1, also configurelocator_mappings. - The mapped address should be a stable IP, DNS name, or
host:port. - Do not map an address to
localhostor127.0.0.1. - Kafka and Elasticsearch are cluster-level objects and do not use
locator_mappings. Kafka usescluster_nameas the identifier. Elasticsearch automatically obtainscluster_namefrom the cluster.
host
host controls the collection behavior for host diagnostics. It usually does not need to be changed for first-time onboarding.
shell_exec
shell_exec controls whether the Agent allows controlled host diagnostic commands.
- Keep
enabled: truewhen AI-SRE needs live host diagnostics. Only controlled shell commands can be executed. - If some shell commands are blocked by built-in guardrails, add them manually to
user_allow_listonly after confirming that they are safe, read-only, and do not expose sensitive information.
tool_policy.disabled_tools:
MySQL
To diagnose MySQL, add instance configuration undermysql:. Use a read-only MySQL account, and preferably store the password in a separate credential file:
If
mysql.query is enabled, always use a read-only account. This tool executes controlled read-only SQL and should not use a privileged account.
Redis
To diagnose Redis, add instance configuration underredis:.
After
redis.command is enabled, only allowlisted read-only commands such as CONFIG GET, CLIENT LIST, MEMORY USAGE, and LATENCY HISTORY are allowed. Write commands are rejected.
Redis Sentinel
To diagnose a Redis Sentinel high availability cluster, add Sentinel process configuration underredis_sentinel:. redis_sentinel and redis are different object types. They point to Sentinel processes and Redis data nodes respectively.
PostgreSQL
To diagnose PostgreSQL, add instance configuration underpostgres:.
If
postgres.query is enabled, always use a read-only account.
MongoDB
To diagnose MongoDB (mongod or replica set members), add instance configuration undermongodb:. Only the host:port format is accepted. mongodb+srv:// URIs are not supported.
After
mongodb.command is enabled, only allowlisted read-only management commands such as dbStats, collStats, serverStatus, and replSetGetStatus are allowed. Write commands and dangerous commands are rejected.
MongoDB Mongos
To diagnose MongoDB sharded cluster routing processes (mongos), add configuration undermongodb_mongos:. mongodb_mongos and mongodb are different object types. They point to mongos routing processes and mongod data nodes respectively.
Kafka
To diagnose a Kafka cluster, add configuration underkafka:. Kafka is a cluster-level object. One kafka configuration block represents one logical cluster, and bootstrap_brokers are connection entry points rather than independent targets.
Kafka does not use
locator_mappings. cluster_name is directly used as the object address in the console.
Elasticsearch
To diagnose an Elasticsearch cluster, add configuration underelasticsearch:. Elasticsearch is a cluster-level object. cluster_name does not need to be declared in the configuration. The Agent automatically obtains it through GET _cluster/health during startup or reload. If the cluster is unreachable, the target is skipped until the next reload.
Elasticsearch does not use
locator_mappings. The Agent automatically obtains cluster_name from the cluster and uses it as the object address in the console.
script_tool
script_tool is used to add custom script tools. Most users can keep it disabled: