Add collector role

Sets up prometheus to pull metrics, with telegraf to process SNMP data.
This commit is contained in:
Timotej Lazar 2025-10-17 22:00:42 +02:00
parent 6600a6fa36
commit da3db8cc02
11 changed files with 228 additions and 0 deletions

18
roles/collector/README.md Normal file
View file

@ -0,0 +1,18 @@
Set up metric collection with prometheus and telegraf as the SNMP proxy.
NetBox config context should contain the lists `prometheus_hosts` and `snmp_hosts` with job definitions. Each entry should define `name` and `nb_filter` user to query hosts from NetBox. For example:
{
"prometheus_hosts": [
{
"name": "classroom",
"nb_filter": "role=desktop-computer status=active location=classroom"
}
],
"snmp_hosts": [
{
"name": "switch",
"nb_filter": "role=switch name__isw=sw- status=active status=staged status=planned"
}
]
}