Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway Loss and RTT not showing any values #64

Open
alexwmaustin opened this issue Apr 17, 2024 · 5 comments
Open

Gateway Loss and RTT not showing any values #64

alexwmaustin opened this issue Apr 17, 2024 · 5 comments

Comments

@alexwmaustin
Copy link

The metrics for RTT and loss weren't displaying any values. The telegraf_pfifgw.php uses return_gateways_status to query these values.

To enable the query properly go into System > Gateways > Configuration in opnsense and uncheck Disable Gateway Monitoring for each gateway.

Using the command pluginctl -r return_gateways_status you can view the output from this query.

Before

{
    "dpinger": {
        "WAN_DHCP6": {
            "status": "none",
            "monitor": "~",
            "name": "WAN_DHCP6",
            "stddev": "~",
            "delay": "~",
            "loss": "~"
        },
        "WAN_DHCP": {
            "status": "none",
            "monitor": "~",
            "name": "WAN_DHCP",
            "stddev": "~",
            "delay": "~",
            "loss": "~"
        }
    }
}

After

{
    "dpinger": {
        "WAN_DHCP6": {
            "status": "none",
            "monitor": "<Your IPv6>",
            "name": "WAN_DHCP6",
            "stddev": "0.3 ms",
            "delay": "1.2 ms",
            "loss": "0.0 %"
        },
        "WAN_DHCP": {
            "status": "none",
            "monitor": "<Your IP>",
            "name": "WAN_DHCP",
            "stddev": "0.3 ms",
            "delay": "1.0 ms",
            "loss": "0.0 %"
        }
    }
}
@aries223
Copy link

aries223 commented Apr 24, 2024

@alexwmaustin In the dashboard variables, what did you put for the Gateway Variable?

I get the same results as your "after", but nothing appears in the dashboard gateway/RTT section

@alexwmaustin
Copy link
Author

My gateway variables match the value from above.

I would check on InfluxDB GUI that you are getting the values in the database first. That way you can determine whether its a Influx -> Grafana problem or OPNSense -> Influx

@DannyJanmaat
Copy link

DannyJanmaat commented May 15, 2024

First you have to follow the instructions of bsmithio.

Replace the file with this one :
telegraf_pfifgw.zip

Disable Telegraf in OPNSense.
Place the file 'telegraf_pfifgw.php' in OPNSense directory /usr/local/bin.

Test : sudo telegraf_pfifgw.php

Enable Telegraf.

This file is needed to get the the _measurement 'gateways' and the fields 'delay' and 'loss'.

image

Edit : works with OPNSense 24.1.6
Edit2 : Still works after upgrade to 24.1.7

@atxbyea
Copy link

atxbyea commented Jul 4, 2024

root@sasuke:/usr/local/bin # pluginctl -r return_gateways_status { "dpinger": { "WAN_DHCP": { "status": "none", "monitor": "1.1.1.1", "name": "WAN_DHCP", "stddev": "0.3 ms", "delay": "9.0 ms", "loss": "0.0 %" }, "HEIPV6TUNNEL_TUNNELV6": { "status": "down", "monitor": "2600::", "name": "HEIPV6TUNNEL_TUNNELV6", "stddev": "0.0 ms", "delay": "0.0 ms", "loss": "100.0 %" } } }

Looks to be reading the ping fine, and the command returns all gateways including WAN

gateways,host=sasuke.eirikzlab.com,interface=wan,gateway_name=WAN_DHCP monitor="Unmonitored",source="195.1.60.1",gwdescr="Interface WAN_DHCP Gateway",delay=9,stddev=0.2,loss=0,status="1"

Yet no stats show up in dashboard
Screenshot from 2024-07-04 13-10-51

sudo su -m telegraf -c 'telegraf --test --config /usr/local/etc/telegraf.conf --config-directory /usr/local/etc/telegraf.d'

shows no gateways or temperature either.

@djscyper
Copy link

djscyper commented Aug 17, 2024

Unfortunately, I'm experiencing exactly the same issue as described above; it doesn't work. As a result, both the Gateway RTT and the interfaces remain empty. As atcbyea described, I get a clean response from 'pluginctl -r return_gateways_status'. However, even with

sudo su -m telegraf -c 'telegraf --test --config /usr/local/etc/telegraf.conf --config-directory /usr/local/etc/telegraf.d'

, no gateways are listed.

Screenshot 2024-08-17 152241

Maybe someone will find a solution for this. Otherwise, the dashboard is really great.

20.08.2024 Update: In the Influx DB there is no entry for gateway or delay under _mesurment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants