add ups monitoring and data size monitoring to truenas docs
This commit is contained in:
@@ -31,6 +31,8 @@
|
|||||||
- [Corrupted data](#corrupted-data)
|
- [Corrupted data](#corrupted-data)
|
||||||
- [Stuck VMs](#stuck-vms)
|
- [Stuck VMs](#stuck-vms)
|
||||||
- [Mounting ZVOLS](#mounting-zvols)
|
- [Mounting ZVOLS](#mounting-zvols)
|
||||||
|
- [UPS Monitoring](#ups-monitoring)
|
||||||
|
- [ZFS Size Data](#zfs-size-data)
|
||||||
|
|
||||||
## Bios settings
|
## Bios settings
|
||||||
|
|
||||||
@@ -491,3 +493,35 @@ rsync --progress -av --delete -e ssh \
|
|||||||
kube:/opt/local-path-provisioner/ssd/pvc-4fca5cad-7640-45ea-946d-7a604a3ac875_minecraft_nimcraft/ \
|
kube:/opt/local-path-provisioner/ssd/pvc-4fca5cad-7640-45ea-946d-7a604a3ac875_minecraft_nimcraft/ \
|
||||||
--dry-run
|
--dry-run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## UPS Monitoring
|
||||||
|
|
||||||
|
First, you'll need to create a user with access to the UPS in System -> Services -> UPS.
|
||||||
|
Under the Extra Users section, add a user like so:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
[admin]
|
||||||
|
password = mypass
|
||||||
|
actions = set
|
||||||
|
actions = fsd
|
||||||
|
instcmds = all
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can run commands with upscmd
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export UPS_USER=admin
|
||||||
|
export UPS_PASS=mypass
|
||||||
|
|
||||||
|
# Quick battery test
|
||||||
|
upscmd -u $UPS_USER$ -p $UPS_PASS ups test.battery.start.quick
|
||||||
|
```
|
||||||
|
|
||||||
|
## ZFS Size Data
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# jq -r is required otherwise the data will be invalid
|
||||||
|
zfs list -j enc0/vms -p -o available,used | \
|
||||||
|
jq -r --arg TIMESTAMP `date +%s` '"driveripper.vms.data.used " + .datasets[].properties.used.value + " " + $TIMESTAMP' | \
|
||||||
|
nc -N -4 yellow.reeselink.com 2003
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user