Skip to main content
The installation package includes a default 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 you want the console to display a more recognizable database address, configure:
Recommendations:
  • If MySQL, Redis, PostgreSQL, MongoDB, or similar services are configured with localhost or 127.0.0.1, also configure locator_mappings.
  • The mapped address should be a stable IP, DNS name, or host:port.
  • Do not map an address to localhost or 127.0.0.1.
  • Kafka and Elasticsearch are cluster-level objects and do not use locator_mappings. Kafka uses cluster_name as the identifier. Elasticsearch automatically obtains cluster_name from 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.
Recommendations:
  • Keep enabled: true when 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_list only after confirming that they are safe, read-only, and do not expose sensitive information.
To urgently disable a tool, use tool_policy.disabled_tools:

MySQL

To diagnose MySQL, add instance configuration under mysql:. Use a read-only MySQL account, and preferably store the password in a separate credential file:
Credential file example:
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 under redis:.
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 under redis_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 under postgres:.
If postgres.query is enabled, always use a read-only account.

MongoDB

To diagnose MongoDB (mongod or replica set members), add instance configuration under mongodb:. 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 under mongodb_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 under kafka:. 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 under elasticsearch:. 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:
Enable it only when you need custom diagnostic capabilities and can confirm that the script source and directory permissions are controlled.