For the complete documentation index, see llms.txt. This page is also available as Markdown.

InfluxDB

Give an agent access to InfluxDB with an API token.

Required permissions

Tool
Required Permission
Description

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)

1

Log in to your InfluxDB instance (InfluxDB Cloud or self-hosted)

2

Navigate to Data → Tokens (or Load Data → Tokens in InfluxDB Cloud)

3

Click Generate API Token → Read Token (or Custom Token for more control)

4

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)

5

Click Save or Generate Token

6

Copy the API token immediately (it won't be shown again)

7

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:

1

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"
2

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:

1

Install the InfluxDB CLI (if not already installed)

2

Authenticate with InfluxDB:

influx auth create \
  --org your-organization \
  --description "ilert-mcp-agent" \
  --read-bucket your-bucket-name
3

The command will output the token. Copy it immediately.

4

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_TOKEN with an admin token

  • YOUR_ORG_ID with your organization ID

  • YOUR_BUCKET_ID with 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.

Note:

  • For InfluxDB 2.x, you'll need both the API token and your organization name when configuring the MCP server

  • For InfluxDB 1.x, you'll need the username and password

  • Ensure your InfluxDB instance is accessible from the network where the MCP server will run

Connect InfluxDB with agent

To connect InfluxDB with your AI SRE agent:

1

Navigate to Agents in the ilert navigation menu

2

Open the agent detail view for the agent you want to configure

3

Go to the Tools tab

4

Under the ilert hosted MCP servers section, locate the InfluxDB card

5

Click Connect on the InfluxDB card

6

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)

7

Click Connect to complete the connection

8

After connecting, you can enable or disable specific tools needed for alert investigation, such as:

  • get_measurements - Get measurements from InfluxDB to identify available measurements

  • query_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?