InfluxDB
Give an agent access to InfluxDB with an API token.
Required permissions
get_measurements
read
Get measurements from InfluxDB useful to identify the measurements to use in the query_time_series tool.
query_time_series
read
Query time series data from InfluxDB using Flux query language (v2 API). This tool retrieves metrics, logs, and other time-stamped data from InfluxDB databases. It supports filtering by time range and measurement type, and returns formatted results showing timestamp, measurement name, location tags, and field values.
Create API token
Using the InfluxDB MCP server requires an API token with appropriate permissions.
For InfluxDB 2.x (Cloud and OSS)
Log in to your InfluxDB instance (InfluxDB Cloud or self-hosted)
Navigate to Data → Tokens (or Load Data → Tokens in InfluxDB Cloud)
Click Generate API Token → Read Token (or Custom Token for more control)
Configure the token:
Description: Enter a name (e.g., "ilert-mcp-agent")
Permissions: Select Read access
Resources:
Select the Organization you want to grant access to
Select the Buckets you want to grant read access to (or select "All buckets" for full read access)
Expiration: Set expiration date (optional, recommended for security)
Click Save or Generate Token
Copy the API token immediately (it won't be shown again)
Store the token securely. You will need this token when setting up the InfluxDB MCP server in ilert.
For InfluxDB 1.x (Legacy)
If you're using InfluxDB 1.x, authentication is handled differently:
Create a user with read permissions:
# Connect to InfluxDB CLI
influx
# Create a user
CREATE USER "ilert_agent" WITH PASSWORD 'your-secure-password' WITH ALL PRIVILEGES
# Or grant read-only access to specific databases
GRANT READ ON "your_database" TO "ilert_agent"Use the username and password when configuring the InfluxDB MCP server in ilert.
Create API token via CLI (InfluxDB 2.x)
Alternatively, you can create an API token using the InfluxDB CLI:
Install the InfluxDB CLI (if not already installed)
Authenticate with InfluxDB:
influx auth create \
--org your-organization \
--description "ilert-mcp-agent" \
--read-bucket your-bucket-nameThe command will output the token. Copy it immediately.
Store the token securely. You will need this token when setting up the InfluxDB MCP server in ilert.
Create API token via REST API (InfluxDB 2.x)
You can also create an API token using the InfluxDB REST API:
curl -X POST "https://your-influxdb-instance:8086/api/v2/authorizations" \
-H "Authorization: Token YOUR_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orgID": "YOUR_ORG_ID",
"description": "ilert-mcp-agent",
"permissions": [
{
"action": "read",
"resource": {
"type": "buckets",
"orgID": "YOUR_ORG_ID",
"id": "YOUR_BUCKET_ID"
}
}
]
}'Replace:
YOUR_ADMIN_TOKENwith an admin tokenYOUR_ORG_IDwith your organization IDYOUR_BUCKET_IDwith your bucket ID (or use"*"for all buckets)
Verify API token access
Before configuring the MCP server, verify that your API token works:
For InfluxDB 2.x:
For InfluxDB 1.x:
Replace YOUR_API_TOKEN with your actual token and your-influxdb-instance with your InfluxDB server URL.
Connect InfluxDB with agent
To connect InfluxDB with your AI SRE agent:
Navigate to Agents in the ilert navigation menu
Open the agent detail view for the agent you want to configure
Go to the Tools tab
Under the ilert hosted MCP servers section, locate the InfluxDB card
Click Connect on the InfluxDB card
In the connection dialog that appears:
Select connector: Choose "Create new connector" (or select an existing connector if you have one)
Type: Select Bearer Token from the dropdown
Secret name: Enter a name for your connector (e.g., "InfluxDB Production" or "InfluxDB Main")
Secret value: Paste the API token you created earlier
Host URL: Enter your InfluxDB instance URL (e.g.,
https://influxdb.example.com:8086)
Click Connect to complete the connection
After connecting, you can enable or disable specific tools needed for alert investigation, such as:
get_measurements- Get measurements from InfluxDB to identify available measurementsquery_time_series- Query time series data from InfluxDB using Flux query language
The InfluxDB integration is now connected and ready to use for root cause analysis.
Last updated
Was this helpful?