chitoku-k / edgerouter-exporter

A Prometheus exporter for EdgeRouter
MIT License
23 stars 3 forks source link

failed to collect metrics: error MultiSpace #69

Closed sosomasox closed 2 years ago

sosomasox commented 2 years ago

Hi,

I've been using edgerouter-exporter v2.1.1 since yesterday, but suddenly it can not get a metrics.

Following log was got.

[2022-01-30T06:52:41Z ERROR] failed to collect metrics: error MultiSpace at: xxxxxxxxxxxxxx@xxxxxxxxx 23h03m29s PPPoE pppoe0  xxx.xxx.xxx.xxx474.8K  94.6M 453.9K 186.2M

    Total sessions: 1

Health check looks good.

ubnt@edgerouter-x:~$ curl -s localhost:8080/metrics && echo

ubnt@edgerouter-x:~$ curl -s localhost:8080/healthz && echo 
OK
sosomasox commented 2 years ago

I guess it was caused by changing the "local_ip_addres". I hope that this information is helpful to you.

chitoku-k commented 2 years ago

Thanks for the report!

This bug actually stems from a bad output of show pppoe-client because the remote IP address (xxx.xxx.xxx.xxx) and the number of TX packets (474.8K) are not delimited by any spaces as the log message indicates (error MultiSpace). Currently, edgerouter-exporter could not reliably parse this output and I have to find some work around for this case, so I'll look into this. Note that the new feature introduced in v2.1.0 (”local_ip_address”) is not related to this bug.

sosomasox commented 2 years ago

And also, the exporter process continues to run, even though the metrics cannot be obtained.

chitoku-k commented 2 years ago

I want to let you know that v2.1.2 has just been published including the bug fix for this issue! For detailed explanation, see #70.

sosomasox commented 2 years ago

The version label is something wrong on "edgerouter_info" metrics.

edgerouter_info{version="v2.0.9-hotfix.2",build_id="5402463",model="EdgeRouter X 5-Port"} 1
chitoku-k commented 2 years ago

That is the version of EdgeOS, not of the edgerouter-exporter.