Compare commits
2 Commits
b9386f32b6
...
ecf66a5fb2
| Author | SHA1 | Date | |
|---|---|---|---|
| ecf66a5fb2 | |||
| 74d1f7364a |
@@ -31,6 +31,8 @@
|
||||
- [Corrupted data](#corrupted-data)
|
||||
- [Stuck VMs](#stuck-vms)
|
||||
- [Mounting ZVOLS](#mounting-zvols)
|
||||
- [UPS Monitoring](#ups-monitoring)
|
||||
- [ZFS Size Data](#zfs-size-data)
|
||||
|
||||
## 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/ \
|
||||
--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
|
||||
```
|
||||
|
||||
10
podman/incubating/grafana/grafana.container
Normal file
10
podman/incubating/grafana/grafana.container
Normal file
@@ -0,0 +1,10 @@
|
||||
# grafana.container
|
||||
[Unit]
|
||||
Description=Grafana
|
||||
|
||||
[Container]
|
||||
ContainerName=grafana
|
||||
Image=grafana/grafana-enterprise
|
||||
Network=systemd-graphite
|
||||
PublishPort=3000:3000
|
||||
Volume=grafana-storage:/var/lib/grafana
|
||||
28
podman/incubating/grafana/grafana.md
Normal file
28
podman/incubating/grafana/grafana.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Grafana
|
||||
|
||||
## Install
|
||||
|
||||
<https://grafana.com/docs/grafana/latest/setup-grafana/installation/docker/>
|
||||
|
||||
Generate the quadlet:
|
||||
|
||||
```bash
|
||||
podman run ghcr.io/containers/podlet --description Grafana \
|
||||
podman run \
|
||||
-p 3000:3000 \
|
||||
--name=grafana \
|
||||
--volume grafana-storage:/var/lib/grafana \
|
||||
--network=systemd-graphite \
|
||||
grafana/grafana-enterprise > podman/incubating/grafana/grafana.container
|
||||
```
|
||||
|
||||
|
||||
Copy the graphite.container and graphite.network file to the server you want to run it on
|
||||
|
||||
```bash
|
||||
export PODMAN_SERVER=
|
||||
scp podman/incubating/grafana/grafana.container $PODMAN_SERVER:/etc/containers/systemd/
|
||||
|
||||
ssh $PODMAN_SERVER systemctl daemon-reload
|
||||
ssh $PODMAN_SERVER systemctl enable --now grafana.service
|
||||
```
|
||||
16
podman/incubating/graphite/graphite.container
Normal file
16
podman/incubating/graphite/graphite.container
Normal file
@@ -0,0 +1,16 @@
|
||||
# graphite.container
|
||||
[Unit]
|
||||
Description=Graphite
|
||||
|
||||
[Container]
|
||||
ContainerName=graphite
|
||||
Image=ghcr.io/deniszh/graphite-statsd
|
||||
Network=systemd-graphite
|
||||
PublishPort=127.0.0.1:8080:80
|
||||
PublishPort=2003-2004:2003-2004
|
||||
PublishPort=2023-2024:2023-2024
|
||||
PublishPort=8125:8125/udp
|
||||
PublishPort=8126:8126
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
36
podman/incubating/graphite/graphite.md
Normal file
36
podman/incubating/graphite/graphite.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Graphite
|
||||
|
||||
## Install
|
||||
|
||||
<https://graphite.readthedocs.io/en/latest/install.html#docker>
|
||||
|
||||
```bash
|
||||
# Generate the network
|
||||
podman run ghcr.io/containers/podlet --description Graphite \
|
||||
podman network create --ipv6 graphite > podman/incubating/graphite/graphite.network
|
||||
|
||||
# Generate the systemd container service
|
||||
podman run ghcr.io/containers/podlet --description Graphite \
|
||||
podman run \
|
||||
--name graphite \
|
||||
--restart=always \
|
||||
--network=systemd-graphite \
|
||||
-p 8080:80 \
|
||||
-p 2003-2004:2003-2004 \
|
||||
-p 2023-2024:2023-2024 \
|
||||
-p 8125:8125/udp \
|
||||
-p 8126:8126 \
|
||||
ghcr.io/deniszh/graphite-statsd > podman/incubating/graphite/graphite.container
|
||||
```
|
||||
|
||||
Copy the graphite.container and graphite.network file to the server you want to run it on
|
||||
|
||||
```bash
|
||||
export PODMAN_SERVER=
|
||||
scp podman/incubating/graphite/graphite.network $PODMAN_SERVER:/etc/containers/systemd/
|
||||
scp podman/incubating/graphite/graphite.container $PODMAN_SERVER:/etc/containers/systemd/
|
||||
|
||||
ssh $PODMAN_SERVER systemctl daemon-reload
|
||||
ssh $PODMAN_SERVER systemctl enable --now graphite.network
|
||||
ssh $PODMAN_SERVER systemctl enable --now graphite.service
|
||||
```
|
||||
6
podman/incubating/graphite/graphite.network
Normal file
6
podman/incubating/graphite/graphite.network
Normal file
@@ -0,0 +1,6 @@
|
||||
# graphite.network
|
||||
[Unit]
|
||||
Description=Graphite
|
||||
|
||||
[Network]
|
||||
IPv6=true
|
||||
Reference in New Issue
Block a user