Hi,
If you follow the "curl" outputs file, it will let you know where "use_percent" is in the tree.
Code: Select all
"logical": {
"|boot": {
"used_percent": [
40.8,
"%"
],
As you can see from above, "used_percent" belong to "disk/logical/|boot/used_percent" for the "|boot" filesystem.
Your earlier command:
/usr/local/nagios/libexec/check_ncpa.py -H xx.xx.xx.xxx -t <Token> -P 5693 -M '
disk/mount/|var|lib|ceph|osd|ceph-11/used_percentage' -c 90 -w 85
There is not "used_percent" for "|var|lib|ceph|osd|ceph-11".
The only available option for "|var|lib|ceph|osd|ceph-63" are "fstype", "opts" and "device_name" (see below):
Code: Select all
"disk": {
"mount": {
"|var|lib|ceph|osd|ceph-63": {
"fstype": "xfs",
"opts": "rw,noatime,attr2,inode64,noquota",
"device_name": [
"/dev/sdd3"
]
},
Based on the output of "curl", "used_percent" are only available for "|boot" and "|" (please see below):
Code: Select all
disk:
"logical": {
"|boot": {
"used_percent": [
40.8,
"%"
],
"used": [
0.07,
"GiB"
],
"inodes_used": [
295,
"inodes"
],
"free": [
0.11,
"GiB"
],
"device_name": [
"/dev/sda3"
],
"inodes_free": [
16089,
"inodes"
],
"inodes": [
16384,
"inodes"
],
"fstype": "ext2",
"total": [
0.19,
"GiB"
],
"opts": "rw,relatime",
"inodes_used_percent": [
2.0,
"%"
]
},
"|": {
"used_percent": [
17.1,
"%"
],
"used": [
7.95,
"GiB"
],
"inodes_used": [
135381,
"inodes"
],
"free": [
38.62,
"GiB"
],
"device_name": [
"/dev/mapper/os-root"
],
"inodes_free": [
3141419,
"inodes"
],
"inodes": [
3276800,
"inodes"
],
"fstype": "ext4",
"total": [
49.08,
"GiB"
],
"opts": "rw,relatime,errors=panic,stripe=32411,data=ordered",
"inodes_used_percent": [
5.0,
"%"
]
}
},
From the outputs of "curl" .... you must follow the tree (json) structure down.
Anything listed there is what you will get ....
You can search "Nagios Exchange" page for other module(s) that might fit your needs better.
https://exchange.nagios.org/
Best Regards,
Vinh