mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-04-06 13:35:55 +02:00
1.1 KiB
1.1 KiB
snmpstat
collector
"snmpstat": {
"targets" : [{
"hostname" : "host1.example.com",
"port" : 161,
"community": "public",
"timeout" : 1,
}],
"metrics" : [
{
"name": "sensor1",
"value": "1.3.6.1.2.1.1.4.0",
"unit": "1.3.6.1.2.1.1.7.0",
},
{
"name": "1.3.6.1.2.1.1.2.0",
"value": "1.3.6.1.2.1.1.4.0",
"unit": "mb/s",
}
]
}
The snmpstat
collector uses gosnmp to read metrics from network-attached devices.
The configuration of SNMP is quite extensive due to it's flexibility. For the collector, the configuration is split in two parts:
Target configuration
Each network-attached device that should be queried. A target consits of
hostname
port
(default 161)community
(default 'public')timeout
in seconds (default 1 for 1 second)
Metric configuration
name
can be an OID or a user-given stringvalue
has to be an OIDunit
can be empty, an OID or a user-given string