Skip to content

metrics endpoint is broken with signalfx-metadata plugin #66

@karthikic

Description

@karthikic
curl -g collectd-exporter.monitoring.svc:9103/metrics 
An error has occurred during metrics collection:

collected metric collectd_signalfx_metadata_gauge gauge:<value:910.000819206238 >  was collected before with the same name and label values```

This issue comes with latest version (0.4)

when i downgrade it to (0.3.1) , i see invalid Prometheus metric name being generated

curl -g collectd-exporter.monitoring.svc:9103/metrics | grep "collectd"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8122  100  8122   # HELP collectd_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which collectd_exporter was built.
 # TYPE collectd_exporter_build_info gauge
0     collectd_exporter_build_info{branch="cut-0.3.0",goversion="go1.6.2",revision="3abb95c",version="0.3.1"} 1
0  # HELP collectd_last_push_timestamp_seconds Unix timestamp of the last received collectd metrics push in seconds.
127# TYPE collectd_last_push_timestamp_seconds gauge
3kcollectd_last_push_timestamp_seconds 1.5447246335487258e+09
    # HELP collectd_signalfx-metadata_counter_total Collectd exporter: 'signalfx-metadata' Type: 'counter' Dstype: 'api.Counter' Dsname: 'value'
  # TYPE collectd_signalfx-metadata_counter_total counter
0 collectd_signalfx-metadata_counter_total 0
--:# HELP collectd_signalfx-metadata_gauge Collectd exporter: 'signalfx-metadata' Type: 'gauge' Dstype: 'api.Gauge' Dsname: 'value'
--# TYPE collectd_signalfx-metadata_gauge gauge
:collectd_signalfx-metadata_gauge 13252.9735565186
--collectd_signalfx-metadata_gauge 1430.0007982254
 -# HELP collectd_statsd_count Collectd exporter: 'statsd' Type: 'count' Dstype: 'api.Gauge' Dsname: 'value'
# TYPE collectd_statsd_count gauge
-:-collectd_statsd_count{instance="collectd-statsd-7f7587bc46-qj2nh",statsd="prometheus_target_kbasync_lenh_secc"} 100
-:--# HELP collectd_statsd_derive Collectd exporter: 'statsd' Type: 'derive' Dstype: 'api.Derive' Dsname: 'value'
 -# TYPE collectd_statsd_derive counter
collectd_statsd_derive{instance="collectd-statsd-7f7587bc46-qj2nh",statsd="prometheus_target_kbasync_lenh_secc"} 300
-:--:-- 1321k

here invalid metric names are collectd_signalfx-metadata_counter_total notice the -

In both cases it causes a scraping error in prometheus.

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