VictorRobellini / pfSense-Dashboard

A functional and useful dashboard for pfSense that utilizes influxdb, grafana and telegraf
669 stars 184 forks source link

Plugin telegraf_pfifgw.php - Error in plugin: metric parse error: expected tag at 10:6: "Array" #39

Closed xppx99 closed 3 years ago

xppx99 commented 3 years ago

Hello!

First of all, let me thank you for your great work. I've just found it and it's now my preferred way to monitor pfsense.

I've encontered a problem with the Plugin "telegraf_pfifgw.php" that I dont know how to solve. I tried to repeat the instalation process 2 times, but then found the "debug" flag inside the php plugin code, and activated it.

From then, and after activating the debug mode in telegraf, there I found an error: 2021-06-11T21:34:00Z E! [inputs.exec] Error in plugin: metric parse error: expected tag at 10:6: "Array"

I've attached the output I got when running the telegraf_pfifgw.php program manually: https://pastebin.com/raw/mvzGjg9r

Note: I replaced/hided my WAN_IP and VPN_MONITOR_IP for obvious reasons Thanks

Edit: forgot to mension: pfsense version: 2.5.1

VictorRobellini commented 3 years ago

I'll dig through the debug output. Most of the time it's just a null value that I forgot to check for.

Do you always get this error? That script collects interface as well as gateway information. It would be helpful to know if they are both being populated, or if one isn't.

VictorRobellini commented 3 years ago

RW_VPN shows a null value for LOSS. I probably should just add a check for any null value.

Give me a few to post an update

VictorRobellini commented 3 years ago

I tested it on my system and it works perfectly but I also don't have monitoring disabled on any of my interfaces.

It's checked into master, all you should need to do is resync the repo.

https://github.com/VictorRobellini/pfSense-Dashboard/commit/a6fa2eca0572610d0f91c493eb752eaddd194e6c