Hi,
I am currently trying to connect prometheus gathering information from node-exporter to a zabbix monitoring system.
I managed to get discovery rule with following LLD macros:
URL requested :http://XXXXXXX/api/v1/query?query=node_disk_io_now{device="sda"}
Preprocessing JSONPATH:$.data.result
GOT
{#NAME} -> $.metric.device
{#NODE} -> $.metric.instance
{#VALUE} -> $.value[1]
thus I tried to create from item prototype
Name -> {#NODE}-{#NAME}
Type -> HTTP agent
Key -> device-[{#NODE}]
URL -> http://XXXXXXX/api/v1/query?query=node_disk_io_now{device="'{#NAME}'",instance="'{#NODE}'"}
I try with " ' " and without around macro: I also tried directly http://XXXXXXXX/api/v1/query/query?=node_disk_io_now{device="sda",instance="XXX X:XXX"} int the URL field and its working fine.
I suspect something going on with prometheus using "{" in its syntax. But I do now how to make it work
thank you for your help
ps : we tryed to use LLD macro as we intend to deploy this on cluster not knowing in advance nodes.
The test is undertook on a zabbix 4.2 running inside a docker.
I am currently trying to connect prometheus gathering information from node-exporter to a zabbix monitoring system.
I managed to get discovery rule with following LLD macros:
URL requested :http://XXXXXXX/api/v1/query?query=node_disk_io_now{device="sda"}
Preprocessing JSONPATH:$.data.result
GOT
{#NAME} -> $.metric.device
{#NODE} -> $.metric.instance
{#VALUE} -> $.value[1]
thus I tried to create from item prototype
Name -> {#NODE}-{#NAME}
Type -> HTTP agent
Key -> device-[{#NODE}]
URL -> http://XXXXXXX/api/v1/query?query=node_disk_io_now{device="'{#NAME}'",instance="'{#NODE}'"}
I try with " ' " and without around macro: I also tried directly http://XXXXXXXX/api/v1/query/query?=node_disk_io_now{device="sda",instance="XXX X:XXX"} int the URL field and its working fine.
I suspect something going on with prometheus using "{" in its syntax. But I do now how to make it work
thank you for your help
ps : we tryed to use LLD macro as we intend to deploy this on cluster not knowing in advance nodes.
The test is undertook on a zabbix 4.2 running inside a docker.