Graphite Module: No graphs for certain interface checks with spaces in interface name

icingaweb2

#1

Hi all,

some of my snmp-int checks are missing their graphs in the graphite-module (https://github.com/Icinga/icingaweb2-module-graphite, v1.1.0). On the graphite web interface they are displayed.
Example:


The graph debug for this check shows:

+ Icinga check command: 'snmp-interface'
+ Obscured check command: NULL
+ Applying templates for check command 'snmp-interface'
++ Applying template 'interfacetable-traffic'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A_in_bps.value'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A_out_bps.value'
+++ Excluded 0 metric(s)
+++ Combined 2 metric(s) to 1 chart(s)
++ Applying template 'interfacetable-discard'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A_in_discard.value'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A_out_discard.value'
+++ Excluded 0 metric(s)
+++ Combined 2 metric(s) to 1 chart(s)
++ Applying template 'interfacetable-error'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A_in_error.value'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A_out_error.value'
+++ Excluded 0 metric(s)
+++ Combined 2 metric(s) to 1 chart(s)
+ Applying default templates, excluding previously used metrics
++ Not applying template 'default-host'
++ Applying template 'default-service'
+++ Fetched 6 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.ET-ASA.services.Bandwidth_Interface_Inside.snmp-interface.perfdata.%2A.value'
+++ Excluded 6 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)

I suspect that the interface name is the problem, as it contains spaces, e.g. Adaptive Security Appliance ‘inside’ interface
The same check with a different interface name, like FastEthernet0/7 or GigabitEthernet1/0/1, shows the graphs:

Graph debug looks mostly the same:
+ Icinga check command: 'snmp-interface'
+ Obscured check command: NULL
+ Applying templates for check command 'snmp-interface'
++ Applying template 'interfacetable-traffic'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A_in_bps.value'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A_out_bps.value'
+++ Excluded 0 metric(s)
+++ Combined 2 metric(s) to 1 chart(s)
++ Applying template 'interfacetable-discard'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A_in_discard.value'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A_out_discard.value'
+++ Excluded 0 metric(s)
+++ Combined 2 metric(s) to 1 chart(s)
++ Applying template 'interfacetable-error'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A_in_error.value'
+++ Fetched 1 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A_out_error.value'
+++ Excluded 0 metric(s)
+++ Combined 2 metric(s) to 1 chart(s)
+ Applying default templates, excluding previously used metrics
++ Not applying template 'default-host'
++ Applying template 'default-service'
+++ Fetched 6 metric(s) from 'http://st-grafana-rz:81/metrics/expand?query=icinga2.BT-SW-MPLS-CORE.services.Bandwidth_Interface_ABC.snmp-interface.perfdata.%2A.value'
+++ Excluded 6 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)

The template is copied from the default interfacetable.ini and slightly modified:

snmp-int.ini
[interfacetable-traffic.graph]
check_command = "snmp-interface"

[interfacetable-traffic.metrics_filters]
bpsin = "$service_name_template$.perfdata.$interface$_in_bps.value"
bpsout = "$service_name_template$.perfdata.$interface$_out_bps.value"

[interfacetable-traffic.urlparams]
min = "0"
title = "Interface $interface$ Traffic"
lineWidth = "2"
yUnitSystem = "si"

[interfacetable-traffic.functions]
bpsin = "alias(color($metric$, '#1a7dd7'), 'Traffic in (B/s)')"
bpsout = "alias(color($metric$, '#0b3c68'), 'Traffic out (B/s)')"


[interfacetable-discard.graph]
check_command = "snmp-interface"

[interfacetable-discard.metrics_filters]
ppsindiscard = "$service_name_template$.perfdata.$interface$_in_discard.value"
ppsoutdiscard = "$service_name_template$.perfdata.$interface$_out_discard.value"

[interfacetable-discard.urlparams]
min = "0"
title = "Interface $interface$ Discards"
lineWidth = "2"
yUnitSystem = "si"

[interfacetable-discard.functions]
ppsindiscard = "alias(color($metric$, '#edb017'), 'Discard in (B/s)')"
ppsoutdiscard = "alias(color($metric$, '#ad7d05'), 'Discard out (B/s)')"


[interfacetable-error.graph]
check_command = "snmp-interface"

[interfacetable-error.metrics_filters]
ppsinerr = "$service_name_template$.perfdata.$interface$_in_error.value"
ppsouterr = "$service_name_template$.perfdata.$interface$_out_error.value"

[interfacetable-error.urlparams]
min = "0"
title = "Interface $interface$ Errors"
lineWidth = "2"
yUnitSystem = "si"

[interfacetable-error.functions]
ppsinerr = "alias(color($metric$, '#ff5566'), 'Error in (B/s)')"
ppsouterr = "alias(color($metric$, '#a80000'), 'Error out (B/s)')"

Can I fix this anyhow or is this something for the bug tracker?

Best regards,
Logic :slight_smile: