Replies: 1 comment
-
I believe resourcedetection processor could help here. E.g. adding something like following: processors:
resourcedetection/system:
detectors: [system]
timeout: 2s
override: false
system:
hostname_sources: [os] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the hostmetrics receiver to generate metrics which does not add any reference to the actual host on which the metrics are generated.
`receivers:
hostmetrics:
collection_interval: 30s
scrapers:
cpu:
memory:
exporters:
otlp/elastic:
endpoint: apm.something.com:8200
insecure: true
service:
pipelines:
metrics:
receivers: [hostmetrics]
exporters: [otlp/elastic]`
All metrics are exported to an elastic apm server. In the end I'm getting a document in our elastic search index which does not contain any information about the host.
{ "agent": { "name": "otlp", "version": "unknown" }, "processor": { "name": "metric", "event": "metric" }, "system.cpu.time": 1595129.1875, "labels": { "cpu": "cpu0", "state": "idle" }, "metricset.name": "app", "observer": { "hostname": "com-apm001.srv.combell-ops.net", "id": "26e873dd-841d-4fa8-a46e-bffcc18b9d61", "type": "apm-server", "ephemeral_id": "999f61dc-38b3-427a-ba1a-4d7a17b899b8", "version": "7.15.0", "version_major": 7 }, "@timestamp": "2021-11-02T00:00:01.839Z", "ecs": { "version": "1.11.0" }, "service": { "name": "unknown", "language": { "name": "unknown" } }, "event": { "ingested": "2021-11-02T00:00:02.247273218Z" } }
How can we distinguish metrics between our hosts? Can we somehow add the host information like it's present in our traces? I'm having a hard time finding any documentation on this.
{ "host": { "hostname": "some-host", "name": "some-host" } }
Beta Was this translation helpful? Give feedback.
All reactions