fix: monitoring
This commit is contained in:
parent
21ed381d18
commit
3282b7d634
3 changed files with 5 additions and 5 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
./utils/modules/nginx.nix
|
./utils/modules/nginx.nix
|
||||||
|
|
||||||
./utils/modules/autoupgrade.nix
|
./utils/modules/autoupgrade.nix
|
||||||
|
./utils/modules/victoriametrics
|
||||||
./utils/modules/promtail
|
./utils/modules/promtail
|
||||||
./utils/modules/borgbackup.nix
|
./utils/modules/borgbackup.nix
|
||||||
|
|
||||||
|
|
@ -25,7 +26,6 @@
|
||||||
./modules/podman.nix
|
./modules/podman.nix
|
||||||
./modules/omada.nix
|
./modules/omada.nix
|
||||||
./modules/ddclient.nix
|
./modules/ddclient.nix
|
||||||
./utils/modules/victoriametrics
|
|
||||||
# ./modules/wol.nix
|
# ./modules/wol.nix
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ in {
|
||||||
"${impermanence}/nixos.nix"
|
"${impermanence}/nixos.nix"
|
||||||
./utils/bento.nix
|
./utils/bento.nix
|
||||||
./utils/modules/sops.nix
|
./utils/modules/sops.nix
|
||||||
./utils/modules/victoriametrics/default.nix
|
./utils/modules/victoriametrics
|
||||||
|
./utils/modules/promtail
|
||||||
|
|
||||||
./modules/pyload.nix
|
./modules/pyload.nix
|
||||||
./modules/jellyfin.nix
|
./modules/jellyfin.nix
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ EOF
|
||||||
|
|
||||||
# mdadm RAID array status (doesn't access disks)
|
# mdadm RAID array status (doesn't access disks)
|
||||||
echo "" >> "$TEMP_FILE"
|
echo "" >> "$TEMP_FILE"
|
||||||
echo "# HELP mdadm_array_state RAID array state (1=clean, 0=degraded/other)" >> "$TEMP_FILE"
|
echo "# HELP mdadm_array_state RAID array state (1=clean/active/resyncing, 0=degraded/other)" >> "$TEMP_FILE"
|
||||||
echo "# TYPE mdadm_array_state gauge" >> "$TEMP_FILE"
|
echo "# TYPE mdadm_array_state gauge" >> "$TEMP_FILE"
|
||||||
echo "# HELP mdadm_array_devices_total Total devices in RAID array" >> "$TEMP_FILE"
|
echo "# HELP mdadm_array_devices_total Total devices in RAID array" >> "$TEMP_FILE"
|
||||||
echo "# TYPE mdadm_array_devices_total gauge" >> "$TEMP_FILE"
|
echo "# TYPE mdadm_array_devices_total gauge" >> "$TEMP_FILE"
|
||||||
|
|
@ -122,7 +122,7 @@ EOF
|
||||||
|
|
||||||
# Parse state
|
# Parse state
|
||||||
state=$(echo "$mdadm_output" | grep "State :" | sed 's/.*State : //' | tr -d ' ')
|
state=$(echo "$mdadm_output" | grep "State :" | sed 's/.*State : //' | tr -d ' ')
|
||||||
if [[ "$state" == "clean" ]] || [[ "$state" == "active" ]]; then
|
if [[ "$state" == *clean* ]] || [[ "$state" == *active* ]]; then
|
||||||
state_value=1
|
state_value=1
|
||||||
else
|
else
|
||||||
state_value=0
|
state_value=0
|
||||||
|
|
@ -156,7 +156,6 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
enabledCollectors = [
|
enabledCollectors = [
|
||||||
"textfile"
|
"textfile"
|
||||||
"systemd"
|
|
||||||
];
|
];
|
||||||
extraFlags = [
|
extraFlags = [
|
||||||
"--collector.textfile.directory=${textfileDir}"
|
"--collector.textfile.directory=${textfileDir}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue