In https://www.zabbix.com/documentation...stom_lld_rules it is specified as such
Then the json data given is
But if you test in preprocessing step with JSONPath, $.fsname doesn't evaluate. $..fsname does. (note the extra dot)
Is json path evaluation in lld macros is different from json path in preprocessunf step ?
Is the documentation wrong ?
In previous example it is required that the keys match the LLD macro names used in prototypes, the alternative is to extract LLD macro values using JSONPath {#FSNAME} → $.fsname and {#FSTYPE} → $.fstype, thus making such script possible:
Then the json data given is
Code:
[ { "fsname":"/", "fstype":"rootfs" }, { "fsname":"/sys", "fstype":"sysfs" }, { "fsname":"/proc", "fstype":"proc" }, { "fsname":"/dev", "fstype":"devtmpfs" }, { "fsname":"/dev/pts", "fstype":"devpts" }, { "fsname":"/lib/init/rw", "fstype":"tmpfs" }, { "fsname":"/dev/shm", "fstype":"tmpfs" }, { "fsname":"/home", "fstype":"ext3" }, { "fsname":"/tmp", "fstype":"ext3" }, { "fsname":"/usr", "fstype":"ext3" }, { "fsname":"/var", "fstype":"ext3" }, { "fsname":"/sys/fs/fuse/connections", "fstype":"fusectl" } ]
But if you test in preprocessing step with JSONPath, $.fsname doesn't evaluate. $..fsname does. (note the extra dot)
Is json path evaluation in lld macros is different from json path in preprocessunf step ?
Is the documentation wrong ?
Comment