Skip to main content
GET
/
api
/
v1
/
edge
/
agents
/
{agentId}
/
metric-config
Sync metric config
curl --request GET \
  --url https://api.logfleet.io/api/v1/edge/agents/{agentId}/metric-config \
  --header 'X-API-Key: <api-key>'
{
  "version": 123,
  "vector_config": "<string>",
  "metrics": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "namespace": "<string>",
      "description": "<string>",
      "enabled": true,
      "type": "counter",
      "source_field": "<string>",
      "filter": {
        "field": "<string>",
        "operator": "eq",
        "value": "<string>",
        "conditions": "<array>",
        "logic": "and"
      },
      "tags": [
        {
          "name": "<string>",
          "source": "field",
          "value": "<string>"
        }
      ],
      "counter_opts": {
        "increment_by": "<string>"
      },
      "gauge_opts": {
        "value_field": "<string>"
      },
      "histogram_opts": {
        "value_field": "<string>",
        "buckets": [
          123
        ]
      },
      "cardinality": {
        "max_tag_cardinality": 1000,
        "on_limit_exceeded": "drop"
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "has_update": true
}
Fetches the latest metric extraction configuration for this agent. Called periodically (every 60 seconds) to pick up configuration changes. The response includes all active metric configurations that should be applied by the agent.

Authorizations

X-API-Key
string
header
required

API key for edge agents

Path Parameters

agentId
string<uuid>
required

Agent ID (for edge API)

Query Parameters

version
integer

Current config version on agent

Required range: x >= 0

Response

Config sync response

version
integer
vector_config
string

Generated Vector config snippet

metrics
object[]
has_update
boolean

True if agent needs to update config