Instana APM plugin
Use the instana APM plugin to query infrastructure metrics from
Instana for scaling decisions.
Agent configuration options
apm "instana" {
driver = "instana"
config = {
endpoint = "https://example.instana.io"
api_token = "<api token>"
}
}
endpoint(string: <required>)- The absolute URL of the Instana backend, including the scheme. For example, usehttps://example.instana.iofor a SaaS tenant or the base URL for a self-hosted Instana backend.api_token(string: <required>)- The Instana API token to use for authentication. You can also set theINSTANA_API_TOKENenvironment variable instead of configuring this value in the agent configuration. When both are set,api_tokentakes precedence.
Policy configuration options
check {
source = "instana"
query_window = "5m"
query = jsonencode({
plugin = "host"
query = "entity.zone:production"
metrics = ["cpu.used"]
rollup = 60
})
# ...
}
The query value must be the Instana infrastructure metrics API request body,
encoded as JSON in HCL. Use jsonencode({ ... }) to encode the request body.
Do not include timeFrame in the query JSON. The autoscaler derives the
timeFrame value from the check's query_window and sends it with the request
to Instana.
The query JSON supports the following fields:
plugin(string: <required>)- The Instana infrastructure plugin to query, such ashost.metrics(list<string>: <required>)- The Instana metric IDs to query, such ascpu.used.query(string: "")- An Instana infrastructure query expression for filtering the entities that return metrics.snapshotIds(list<string>: [])- A list of Instana snapshot IDs to query directly.rollup(number: 0)- The rollup interval for the Instana metrics request.
The plugin returns one time series for each entity snapshot and metric ID pair in the Instana response. For scaling policies that expect a single metric stream, configure the Instana query so it returns one snapshot and one metric ID.
When Instana rate limits a metrics request, the autoscaler reports the rate-limit
reset value from Instana. When a query returns no data points, increase the
query_window or narrow the Instana query to entities that report the requested
metric.