Skip to content

Commit 2b435c5

Browse files
grafana smokeping blackbox
1 parent ab5d073 commit 2b435c5

File tree

11 files changed

+1224
-27
lines changed

11 files changed

+1224
-27
lines changed

desktop/l2/systemPackages.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
net-snmp
3030
neofetch
3131

32-
3332
hostapd
3433
bridge-utils
3534
wireless-regdb

hp/hp2/configuration.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
./nodeExporter.nix
3636
./prometheus.nix
3737
./grafana.nix
38-
./docker-daemon.nix
38+
#./docker-daemon.nix
3939
#./k8s_node.nix
4040
#./k3s_master.nix
41-
./k3s_node.nix
41+
#./k3s_node.nix
4242
./systemd.services.ethtool-enp3s0f0.nix
4343
./systemd.services.ethtool-enp3s0f1.nix
4444
];
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [ $# -ne 1 ]; then
6+
echo "Usage: $0 <output-file>"
7+
echo "Example: $0 /tmp/nixos_migration.log"
8+
exit 1
9+
fi
10+
11+
OUTPUT_FILE=$1
12+
13+
# Commands that do NOT require sudo
14+
NORMAL_COMMANDS=(
15+
"uname -a"
16+
"cat /etc/lsb-release"
17+
"ifconfig -a"
18+
"ip addr"
19+
"ip -6 addr"
20+
"ip route"
21+
"ip -6 route"
22+
)
23+
24+
# Commands that require sudo
25+
SUDO_COMMANDS=(
26+
# Network
27+
"cat /etc/netplan/*.yaml"
28+
"iptables-save"
29+
"for iface in \$(ls /sys/class/net); do ethtool \$iface >/dev/null 2>&1 && echo \"--- ethtool \$iface ---\" && ethtool \$iface; done"
30+
31+
# Disk
32+
"lsblk -f"
33+
"lsblk -d -o NAME,MODEL,ROTA,SIZE,TYPE,TRAN"
34+
"mount"
35+
"df -h"
36+
"cat /etc/fstab"
37+
38+
# WireGuard
39+
"wg show"
40+
"systemctl status wg-quick@* || true"
41+
"cat /etc/wireguard/*.conf 2>/dev/null || echo 'No WireGuard config files found'"
42+
43+
# DHCP
44+
"ps aux | grep [d]hcpd"
45+
"cat /etc/dhcp/dhcpd.conf 2>/dev/null || echo 'No dhcpd.conf found'"
46+
"systemctl status isc-dhcp-server 2>/dev/null || systemctl status dhcpd 2>/dev/null || echo 'DHCP service not found'"
47+
48+
# Hardware
49+
"lspci -nn"
50+
"which hwloc-ls >/dev/null && hwloc-ls || which lstopo-no-graphics >/dev/null && lstopo-no-graphics || echo 'hwloc-ls not available'"
51+
)
52+
53+
{
54+
echo "=== Host: $(hostname) ==="
55+
echo
56+
echo "=== NON-SUDO COMMANDS ==="
57+
echo
58+
59+
for CMD in "${NORMAL_COMMANDS[@]}"; do
60+
echo ">>> $CMD"
61+
bash -c "$CMD" || echo "Command failed: $CMD"
62+
echo
63+
done
64+
65+
echo "=== SUDO COMMANDS ==="
66+
echo
67+
68+
for CMD in "${SUDO_COMMANDS[@]}"; do
69+
echo ">>> sudo $CMD"
70+
sudo bash -c "$CMD" || echo "Command failed: $CMD"
71+
echo
72+
done
73+
} > "$OUTPUT_FILE"
74+
75+
echo "✅ Local info gathered to: $OUTPUT_FILE"

0 commit comments

Comments
 (0)