I set up Icinga2 with Influxdb and Grafana and SNMP checks for network devices. I got everything running and the performance data is parsed into Influxdb and can be querried by Grafana.
Till now I tried the check-interfaces snmp plugin and the manubulon check_snmp_int.pl plugin. My problem is, that with both plugins the performance data is stored in Influxdb in a way I don’t know how to make much use of. Icinga2 parses the following to Influx
"TenGigabitEthernet1-1-2::check_snmp::inOctets=15720371925c", "TenGigabitEthernet1-1-2::check_snmp::outOctets=337359874c", "TenGigabitEthernet1-1-2::check_snmp::inDiscards=0c", "TenGigabitEthernet1-1-2::check_snmp::outDiscards=0c", "TenGigabitEthernet1-1-2::check_snmp::inErrors=0c", "TenGigabitEthernet1-1-2::check_snmp::outErrors=0c", "TenGigabitEthernet1-1-2::check_snmp::inUcast=1029508c", "TenGigabitEthernet1-1-2::check_snmp::outUcast=813564c", "TenGigabitEthernet1-1-2::check_snmp::speed=10000000000",
which results (using  for /etc/icinga2/features-enabled/influxdb.conf) in the measurements “check_interfaces” and “check_snmp_int” in influxdb with the colum “service” having the value “check-interfaces” respectively “snmp-interfaces” (which is not of much use, due to the non-surplus information in regards to the measurement, which provides this information) the “value” column with the correct values of the checks and the “metrics” column with e. g. “Port-channel1_in_discard”, “Port-channel1_in_error”, “Port-channel1_out_octet”, “Port-channel1_in_octet”…
Now I would like to creat a Grafana Dashboard with variables and would like to select Host and Interface in the dashboards and then plot “in_octets”, “out-octets”, “in_discards” and so of the host and the respective interface. But due to the conglomeration of Interface-Name and Interface-Metric (“in_octet”…) beeing in one column I fail to seperate them.
Is it maybe somehow posssible to perform string manipulation in “/etc/icinga2/features-enabled/influxdb.conf” in the “service_template” section and parse the interface-name part in e. g. the service column and the Interface-Metric (without the name) part in the “metrics” column? I studied  and  but failed to find anything.
Or does anyone know Influxdb queries to sperate the stuff in a good way? Also any other suggestions are much apprechiated!
Thanks a lot in advance!
 github . com/NETWAYS/check_interfaces
 github . com/dnsmichi/manubulon-snmp
 www.icinga . com/2016/08/31/icinga-2-meets-influxdb/
 www.icinga . com/docs/icinga2/latest/doc/17-language-reference/
 www.icinga . com/docs/icinga2/latest/doc/18-library-reference/