Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Crash while trying to export metrics for apm-server.  #42

@erik-bizzdo

Description

@erik-bizzdo

Hi,

I have setup beat-exporter as a sidecar to my apm-server in kubernetes but the beat-exporter crashes with the following log message:

{"level":"info","message":"Exploring target for beat type","time":"2020-11-23T17:56:52Z"}
{"beat":"apm-server","hostname":"apmserver-5668d79455-zwfp7","level":"info","message":"Target beat configuration loaded successfully!","name":"apmserver-5668d79455-zwfp7","time":"2020-11-23T17:56:53Z","uuid":"e2243c95-c7e6-47b8-8f04-b82edc41b069","version":"7.9.1"}
panic: descriptor Desc{fqName: "apm-server_up", help: "Target up", constLabels: {}, variableLabels: []} is invalid: "apm-server_up" is not a valid metric name

My guess is that apm-server reports it's name containing a dash which in turn makes beat-exporter generate a non valid Prometheus metric name.
The solution might be to convert all invalid chars in metricnames to underscores, or simply just removing them. In my case I would have been fine with either apm_server_up or apmserver_up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions