added ZFS + Ceph Scripts

This commit is contained in:
in-famous-raccoon
2022-04-04 21:56:05 +02:00
parent 6781adc77e
commit eabece8193
3 changed files with 19 additions and 1 deletions

View File

@ -9,8 +9,10 @@
### Paste content from sh file to /opt folder and make executable
`nano /opt/snmp-cpu-temp.sh`<br/>
`nano /opt/snmp-lvm-used.sh`<br/>
`nano /opt/snmp-smart-status.sh`<br/>
`nano /opt/snmp-lvm-used.sh` for LVM<br/>
`nano /opt/snmp-zfs-used.sh` for ZFS<br/>
`nano /opt/snmp-ceph-used.sh` for Ceph<br/>
`chmod +x /opt/snmp-*`
### Run snmpd as root, because debian added the user "Debian-snmp" to the snmp.service but for SMART/LVM Status we need to be root.

8
snmp-ceph-used.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ "$1" = "-g" ]
then
echo .1.3.6.1.2.1.25.1.12
echo gauge
ceph osd df | grep "TOTAL" | awk '{print $14}'
fi
exit 0

8
snmp-zfs-used.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ "$1" = "-g" ]
then
echo .1.3.6.1.2.1.25.1.11
echo gauge
zpool list rpool | grep "rpool" | awk '{print $3}' | sed 's/[A-Z]//g'
fi
exit 0