Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-12717

Prometheus collector won't process untyped metrics

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • 26.1.0
    • 29.0.0
    • Data Collection
    • Security Level: Default (Default Security Scheme)
    • None

    Description

      Prometheus export data:

      # TYPE rabbitmq_identity_info untyped
      # HELP rabbitmq_identity_info RabbitMQ node & cluster identity info
      rabbitmq_identity_info{rabbitmq_node="rabbit@TLNRM10",rabbitmq_cluster="TLN"} 1
      

      Example config used to try to collect rabbitmq cluster name:

         <group-ref>clustername</group-ref>
      
         <group name="clustername"
           resource-type="node"
           filter-exp="name matches 'rabbitmq_identity_info'">
      
           <string-attribute alias-exp="clusterName" value-exp="name.substring('rabbitmq_'.length())"/>
         </group>
      

      Results in:

      2020-05-14 10:58:44,799 DEBUG [pool-15-thread-7736] o.h.a.p.t.TextPrometheusMetricDataParser: Failed to process line - it will be ignored: # TYPE rabbitmq_build_info untyped
      2020-05-14 10:58:44,799 DEBUG [pool-15-thread-7736] o.h.a.p.PrometheusMetricsProcessor: Error while processing binary data
      java.lang.IllegalArgumentException: Need to set type
              at org.hawkular.agent.prometheus.types.MetricFamily.<init>(MetricFamily.java:72) ~[org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.hawkular.agent.prometheus.types.MetricFamily$Builder.build(MetricFamily.java:58) ~[org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.hawkular.agent.prometheus.text.TextPrometheusMetricDataParser$ParserContext.finishMetricFamily(TextPrometheusMetricDataParser.java:184) ~[org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.hawkular.agent.prometheus.text.TextPrometheusMetricDataParser.parse(TextPrometheusMetricDataParser.java:303) ~[org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.hawkular.agent.prometheus.text.TextPrometheusMetricDataParser.parse(TextPrometheusMetricDataParser.java:42) ~[org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.hawkular.agent.prometheus.PrometheusMetricsProcessor.walk(PrometheusMetricsProcessor.java:107) [org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.opennms.netmgt.collectd.prometheus.PrometheusScraper.scrape(PrometheusScraper.java:73) [org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.opennms.netmgt.collectd.prometheus.PrometheusCollector.collect(PrometheusCollector.java:161) [org.opennms.features.prometheus-collector-26.1.0.jar:?]
              at org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule$1.get(CollectorClientRpcModule.java:83) [org.opennms.features.collection.client-rpc-26.1.0.jar:?]
              at org.opennms.netmgt.collection.client.rpc.CollectorClientRpcModule$1.get(CollectorClientRpcModule.java:77) [org.opennms.features.collection.client-rpc-26.1.0.jar:?]
              at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) [?:1.8.0_252]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
      

      Attachments

        Activity

          People

            dino2gnt Dino Yancey
            dino2gnt Dino Yancey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.