Telegraf failing to collect "ovs_dpctl" metric

Bug #2019181 reported by Giuseppe Petralia
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telegraf Charm
New
Low
Unassigned

Bug Description

Telegraf is failing to collect ovs_dpctl metric.

This is happening on a jammy yoga ovn cloud with hw-offload enabled.

Openvswitch version is 2.17.3-0ubuntu0.22.04.2

telegraf run "ovs-appctl dpctl/show -s"

and it fails to parse the output with error:

```
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-telegraf-27/charm/files/telegraf_exec_metrics.py", line 627, in <module>
    main()
  File "/var/lib/juju/agents/unit-telegraf-27/charm/files/telegraf_exec_metrics.py", line 622, in main
    output = metric.parse(metric.get_input_content())
  File "/var/lib/juju/agents/unit-telegraf-27/charm/files/telegraf_exec_metrics.py", line 528, in parse
    datapath_entry[label] = self.parse_fields(rest.rstrip())
  File "/var/lib/juju/agents/unit-telegraf-27/charm/files/telegraf_exec_metrics.py", line 474, in parse_fields
    data[k] = self.parse_fields(v)
  File "/var/lib/juju/agents/unit-telegraf-27/charm/files/telegraf_exec_metrics.py", line 467, in parse_fields
    k, v = datapair.split(":")
ValueError: not enough values to unpack (expected 2, got 1)
```

Example of output that causes the error

```
# ovs-appctl dpctl/show -s
system@ovs-system:
  lookups: hit:2511988 missed:24068761 lost:0
  flows: 1
  masks: hit:26600554 total:1 hit/pkt:1.00
  cache: hit:2511695 hit-rate:9.45%
  caches:
    masks-cache: size:256
  port 0: ovs-system (internal)
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:0 TX bytes:0
  port 1: genev_sys_6081 (geneve: packet_type=ptap)
    RX packets:0 errors:? dropped:? overruns:? frame:?
    TX packets:0 errors:? dropped:? aborted:? carrier:?
    collisions:?
    RX bytes:0 TX bytes:0
  port 2: br-int (internal)
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:0 TX bytes:0
  port 3: br-data.3154 (internal)
    RX packets:37591 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1174 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:1637904 (1.6 MiB) TX bytes:49428 (48.3 KiB)
  port 4: br-data.3152 (internal)
    RX packets:1093169 errors:0 dropped:0 overruns:0 frame:0
    TX packets:204088 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:60505164 (57.7 MiB) TX bytes:35780358 (34.1 MiB)
  port 5: br-data.3153 (internal)
    RX packets:519514 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1187 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:23026942 (22.0 MiB) TX bytes:49974 (48.8 KiB)
  port 6: br-data.3142 (internal)
    RX packets:2075073 errors:0 dropped:0 overruns:0 frame:0
    TX packets:149790 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:113931726 (108.7 MiB) TX bytes:9561422 (9.1 MiB)
  port 7: br-data.3132 (internal)
    RX packets:1846249 errors:0 dropped:0 overruns:0 frame:0
    TX packets:149709 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:104273166 (99.4 MiB) TX bytes:9555426 (9.1 MiB)
  port 8: br-data.3122 (internal)
    RX packets:3185682 errors:0 dropped:0 overruns:0 frame:0
    TX packets:242883 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:183333500 (174.8 MiB) TX bytes:18445831 (17.6 MiB)
  port 9: br-data (internal)
    RX packets:22184858 errors:0 dropped:1 overruns:0 frame:0
    TX packets:3 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:1188093087 (1.1 GiB) TX bytes:246
  port 10: bond0
    RX packets:7511164053 errors:0 dropped:0 overruns:0 frame:0
    TX packets:7073374556 errors:0 dropped:0 aborted:0 carrier:0
    collisions:0
    RX bytes:10147567794025 (9.2 TiB) TX bytes:8880013768200 (8.1 TiB)
```

Tags: bseng-1183
tags: added: bseng-1183
Eric Chen (eric-chen)
Changed in charm-telegraf:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.