Hi,
we are using the check_mk-mtr Plugin.
With version 1.5 we had no problems with the plugin.
After upgrading to version 2.08p.cre the service graphs are not rendered for the mtr data.
Deleting of the performance datafiles and even creation a new mtr-destination doesn‘t help.
I tested the plugin on another checkmk host and had the same issues.
The problem occurs, when there are 3 or more hops to the destination.
Instead of service Graphs we get the message
Cannot calculate graph recipes
Syntax error in expression '(‘rrd’, ‘it273’, ‘XXXXXX-01.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, '‘XXXXXX-01-01.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, ‘‘XXXXXX-01.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, ‘‘XXXXXX-01.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, ‘‘XXXXXX-01.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, ‘XXXXXX-01.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, XXXXXX.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘rrd’, ‘it273’, XXXXXX.vserver.nessus.at’, ‘Mtr to www.orf.at’, ‘hop_1_rtmax’, ‘max’, 1.0), (‘operator’, ‘MERGE’)’: too many operands left
The Output of the Agent with the mtr.py plugin looks like this
OMD[site1]:~$ cmk -d XXXXXX-01.vserver.nessus.at
<<<check_mk>>>
Version: 2.0.0p8
AgentOS: linux
Hostname: XXXXXX-01
AgentDirectory: /etc/check_mk
…
<<mtr:sep(124)>>
www.orf.at|1628514492|8|vl700.edge03.ndc.vie.nessus.at|0.0%|10|1.4|1.1|0.7|1.8|0.3|100g-ae0.edge01.ndc2.vie.nessus.at|0.0%|10|1.2|1.2|0.7|1.6|0.3|vix-et-0-1-2-0-r60.esh.vie.at.nextlayer.net|0.0%|10|1.7|6.8|1.2|41.8|12.7|ae2-0-r18.uni.vie.nextlayer.net|0.0%|10|8.4|15.4|5.1|74.2|21.0|apa.customers.at.nextlayer.net|0.0%|10|2.1|2.1|1.6|2.7|0.4|rou-vie-pe-101.apa.net|0.0%|10|2.1|2.0|1.3|2.7|0.4|194.158.128.241|0.0%|10|1.9|1.6|1.1|2.4|0.4|www.orf.at|0.0%|10|1.1|1.0|0.8|1.5|0.2
The Service Check is OK in the Web-GUI and looks like this
Service check command: check_mk-mtr
Details:
Number of Hops: 8
Packet loss 0.0%, Round trip average 1.0ms, Standard deviation 0.2ms
Hops in last check:
Hop 1: vl700.edge03.ndc.vie.nessus.at
Hop 2: 100g-ae0.edge01.ndc2.vie.nessus.at
Hop 3: vix-et-0-1-2-0-r60.esh.vie.at.nextlayer.net
Hop 4: ae1-0-r18.uni.vie.nextlayer.net
Hop 5: apa.customers.at.nextlayer.net
Hop 6: rou-vie-pe-101.apa.net
Hop 7: 194.158.128.241
Hop 8: www.orf.at
Service performance data (source code) hops=8;;;; hop_1_rta=0.0012;;;; hop_1_rtmin=0.0006;;;; hop_1_rtmax=0.002;;;; hop_1_rtstddev=0.0004;;;; hop_1_response_time=0.0013;;;; hop_1_pl=0;;;; hop_1_rta=0.0012;;;; hop_1_rtmin=0.0006;;;; hop_1_rtmax=0.002;;;; hop_1_rtstddev=0.0004;;;; hop_1_response_time=0.0013;;;; hop_1_pl=0;;;; hop_2_rta=0.0034;;;; hop_2_rtmin=0.001;;;; hop_2_rtmax=0.0214;;;; hop_2_rtstddev=0.0063;;;; hop_2_response_time=0.0012;;;; hop_2_pl=0;;;;
…
hop_8_rta=0.001;0.15;0.25;; hop_8_rtmin=0.0008;;;; hop_8_rtmax=0.0015;;;; hop_8_rtstddev=0.0002;0.15;0.25;; hop_8_response_time=0.0011;;;; hop_8_pl=0;10;25;;
When i query livestatus i get performancedata:
lq “GET services\nColumns: perf_data metrics check_command\nFilter: host_name = XXXXX-01.vserver.nessus.at\nFilter: service_description = Mtr to www.orf.at\nLocaltime: 1628600525\nOutputFormat: python3\nKeepAlive: on\nResponseHeader: fixed16\nColumnHeaders: off”
200 8482
[[u"hops=8;;;; hop_1_rta=0.0035;;;; … ,u"hop_8_response_time",u"hop_8_pl"],u"check_mk-mtr"]]
Can anyone help me with this problem?
BTW: The checkplugin-script mtr.py (Python3) has 2 errors
File “./mtr.py”, line 183, in host_to_filename
hostname = host.decode(“utf8”)
AttributeError: ‘str’ object has no attribute ‘decode’
solved by changing hostname = host.decode(“utf8”) to hostname = host
Thanks and
Best Regards Fritz