Feature request
MartinHajducik opened this issue · 1 comments
MartinHajducik commented
HTTP Item discovery.
JSONpath functionality is limited in zabbix, therefore we cannot simply filter out just pipeline names and make discovery list. But it is possible to do Javascript preprocessing . With this maybe agent discovery is not needed ?
Pipeline discovery example.
URI = _node/pipelines?pretty
zabbix discovery rule / Preprocessing Steps / JavaScript
parameters:
const obj = JSON.parse(value);
const pipelines = Object.keys(obj.pipelines);
var djson = [];
pipelines.forEach(function(name) {djson.push({"pipeline":name})});
djson = JSON.stringify({"data": djson});
djson = JSON.parse(djson.replace(/"/g,'""'));
djson = JSON.stringify(djson);
return djson;
LLD macros:
LLD macro = {#PIPELINE}
JSON Path = $..pipeline.first()
Lelik13a commented
I think about that, thanks :).