13 Discovery using Prometheus data

    Overview

    See for details how Prometheus data querying is implemented in Zabbix.

    Configuration

    The low-level discovery rule should be created as a to the HTTP master item that collects Prometheus data.

    Prometheus to JSON

    In the discovery rule, go to the Preprocessing tab and select the Prometheus to JSON preprocessing option. Data in JSON format are needed for discovery and the Prometheus to JSON preprocessing option will return exactly that, with the following attributes:

    • metric name
    • metric value
    • type (if present)
    • labels (if present)
    • raw line

    from these Prometheus lines:

    will return:

    Mapping LLD macros
    Item prototype

    You may want to create an item prototype like this:

    13 Discovery using Prometheus data - 图2

    with preprocessing options: