feat(agent): zfs collector for pools + datasets/snapshots with fixture tests

This commit is contained in:
Carsten 2026-04-21 22:32:36 +02:00
parent 6fca450d7e
commit 8c3e953e4e
5 changed files with 305 additions and 0 deletions

37
agent/test/fixtures/zfs/zfs_list.json vendored Normal file
View file

@ -0,0 +1,37 @@
{
"output_version": { "command": "zfs list", "vers_major": 0, "vers_minor": 1 },
"datasets": {
"rpool": {
"name": "rpool",
"type": "FILESYSTEM",
"properties": {
"used": { "value": "200000000000" },
"available": { "value": "300000000000" },
"usedbysnapshots": { "value": "5000000000" }
}
},
"rpool/data": {
"name": "rpool/data",
"type": "FILESYSTEM",
"properties": {
"used": { "value": "100000000000" },
"available": { "value": "300000000000" },
"usedbysnapshots": { "value": "2000000000" }
}
},
"rpool/data@daily-2026-04-20": {
"name": "rpool/data@daily-2026-04-20",
"type": "SNAPSHOT",
"properties": {
"creation": { "value": "1745107200" }
}
},
"rpool/data@daily-2026-04-21": {
"name": "rpool/data@daily-2026-04-21",
"type": "SNAPSHOT",
"properties": {
"creation": { "value": "1745193600" }
}
}
}
}