Details
-
Incident report
-
Status: Closed
-
Trivial
-
Resolution: Won't fix
-
None
-
None
-
None
-
Ubuntu
Description
Steps to reproduce:
- Create Template for Linux disk space
- Create Discover Rule (mounted file system)
preprocessing Json path - $[?(@.fsname=='/')].bytes.pfree.first()
LLD Macro ({#FSNAME} - $.fsname) ( {#FSTYPE} - $.fstype)
Filters ({#FSTYPE} matches @File systems for discovery
- Create Item prototype (Free Disk Space on {#FSNAME} (%))
key: vfs.fs.size[ {#FSNAME},pfree|#FSNAME},pfree]
no Preprocessing
# Create a trigger prototype ( Low Disk Space less than 5%)
# Add template to the host
Result:
Error
Preprocessing failed for: [{"
{#FSNAME}":"/sys","{#FSTYPE}":"sysfs"},{"
{#FSNAME}
":"/proc","{#FSTYPE}":"proc"},{"
{#FSNAME}
":"...
1. Failed: cannot extract value from json by path "$[?(@.fsname=='/')].bytes.pfree.first()": no data matches the specified path
Data (zabbix_get -s 127.0.0.1 -k vfs.fs.get)
[{"fsname":"/dev","fstype":"devtmpfs","bytes": {"total":1011806208,"free":1011806208,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":247023,"free":246654,"used":369,"pfree":99.850621,"pused":0.149379}},{"fsname":"/run","fstype":"tmpfs","bytes": {"total":208801792,"free":208195584,"used":606208,"pfree":99.709673,"pused":0.290327} ,"inodes":{"total":254881,"free":254350,"used":531,"pfree":99.791667,"pused":0.208333}},{"fsname":"/","fstype":"ext4","bytes": {"total":20995383296,"free":15323693056,"used":4711186432,"pfree":76.485077,"pused":23.514923} ,"inodes":{"total":1310720,"free":1075174,"used":235546,"pfree":82.029266,"pused":17.970734}},{"fsname":"/dev/shm","fstype":"tmpfs","bytes": {"total":1043992576,"free":1043992576,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254880,"used":1,"pfree":99.999608,"pused":0.000392}},{"fsname":"/run/lock","fstype":"tmpfs","bytes": {"total":5242880,"free":5242880,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254877,"used":4,"pfree":99.998431,"pused":0.001569}},{"fsname":"/sys/fs/cgroup","fstype":"tmpfs","bytes": {"total":1043992576,"free":1043992576,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254860,"used":21,"pfree":99.991761,"pused":0.008239}},{"fsname":"/run/cgmanager/fs","fstype":"tmpfs","bytes": {"total":102400,"free":102400,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254880,"used":1,"pfree":99.999608,"pused":0.000392}},{"fsname":"/run/cgmanager/fs","fstype":"tmpfs","bytes": {"total":102400,"free":102400,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254880,"used":1,"pfree":99.999608,"pused":0.000392}},{"fsname":"/run/cgmanager/fs","fstype":"tmpfs","bytes": {"total":102400,"free":102400,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254880,"used":1,"pfree":99.999608,"pused":0.000392}},{"fsname":"/run/cgmanager/fs","fstype":"tmpfs","bytes": {"total":102400,"free":102400,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254880,"used":1,"pfree":99.999608,"pused":0.000392}},{"fsname":"/run/cgmanager/fs","fstype":"tmpfs","bytes": {"total":102400,"free":102400,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254880,"used":1,"pfree":99.999608,"pused":0.000392}},{"fsname":"/run/user/1000","fstype":"tmpfs","bytes": {"total":208797696,"free":208797696,"used":0,"pfree":100.000000,"pused":0.000000} ,"inodes":{"total":254881,"free":254870,"used":11,"pfree":99.995684,"pused":0.004316}}]