nodes/home.router: add snmp plugin to telegraf
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-04-24 14:32:27 +02:00
parent 5b32ae836d
commit e5c49ab172
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -31,6 +31,13 @@ nodes['home.router'] = {
'ignore': True, 'ignore': True,
}, },
}, },
'apt': {
'packages': {
# for telegraf
'snmp': {},
'snmp-mibs-downloader': {},
},
},
'backups': { 'backups': {
'exclude_from_backups': True, 'exclude_from_backups': True,
}, },
@ -145,6 +152,41 @@ nodes['home.router'] = {
'172.19.138.0/23', '172.19.138.0/23',
}, },
}, },
'telegraf': {
'input_plugins': {
'builtin': {
'snmp': [
{
'agents': ['udp://172.19.138.2'],
'agent_host_tag': 'host',
'table': [{'oid': 'IF-MIB::ifTable'}],
},
{
'agents': ['udp://172.19.138.3'],
'agent_host_tag': 'host',
'field': [
{'oid': 'SNMPv2-SMI::mib-2.33.1.2.3.0', 'name': 'battery_runtime_to_empty'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.2.4.0', 'name': 'battery_capacity'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.2.5.0', 'name': 'battery_voltage', 'conversion': 'float(1)'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.2.6.0', 'name': 'battery_current', 'conversion': 'float(1)'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.3.3.1.2.1', 'name': 'input_frequency', 'conversion': 'float(1)'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.3.3.1.3.1', 'name': 'input_voltage'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.4.2.0', 'name': 'output_frequency', 'conversion': 'float(1)'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.4.4.1.2.1', 'name': 'output_voltage'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.4.4.1.3.1', 'name': 'output_frequency', 'conversion': 'float(1)'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.4.4.1.4.1', 'name': 'output_watts'},
{'oid': 'SNMPv2-SMI::mib-2.33.1.4.4.1.5.1', 'name': 'output_percent'},
],
},
{
'agents': ['udp://172.19.138.41'],
'agent_host_tag': 'host',
'table': [{'oid': 'IF-MIB::ifTable'}],
},
],
},
},
},
'users': { 'users': {
'f2k1de': { 'f2k1de': {
'ssh_pubkey': { 'ssh_pubkey': {