Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16715

Prometheus Pattern with LLD-Macros not working

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 4.2.6
    • Frontend (F), Server (S)
    • None

      Hello,

      I'm trying to get data from an prometheus-exporter.

      The data looks like:

      1. HELP nokia_state_port_3_1_c20_1_ethernet_statistics_ethernet_like_medium_collision_single Description not available
      2. TYPE nokia_state_port_3_1_c20_1_ethernet_statistics_ethernet_like_medium_collision_single gauge
        nokia_state_port_3_1_c20_1_ethernet_statistics_ethernet_like_medium_collision_single 0.0
      3. HELP nokia_state_port_3_1_c20_1_ethernet_statistics_out_unicast_packets Description not available
      4. TYPE nokia_state_port_3_1_c20_1_ethernet_statistics_out_unicast_packets gauge
        nokia_state_port_3_1_c20_1_ethernet_statistics_out_unicast_packets 0.0
      5. HELP nokia_state_port_3_1_c20_1_ethernet_statistics_packet_size_octets_1024_to_1518 Description not available
      6. TYPE nokia_state_port_3_1_c20_1_ethernet_statistics_packet_size_octets_1024_to_1518 gauge
        nokia_state_port_3_1_c20_1_ethernet_statistics_packet_size_octets_1024_to_1518 0.0
         
        The Port 3_1_c20_1 is retrieved within Discovery as {#PORTNAME}.

        As you can see I would need to use Prometheus Pattern:
        nokia_state_port_{#PORTNAME}

        _ethernet_statistics_out_unicast_packets

       
      Unfortunately when using this I've got the error:

      Incorrect value for field "params": invalid Prometheus pattern.

      I can only use

      {#PORTNAME}

      as Macro itself or just Text.

      I think it should be possible to use LLD-Macros within Prometheus Pattern to retrieve different data.

            agavrilovs Aleksandrs Petrovs-Gavrilovs
            kschreoder Kay Schroeder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: