Pfsense openvpn traffic not populating graphs in librenms

The info is on docs.librenms.org - search for it :slight_smile:

Interesting…
no graphs still. however the realtime graphs are populating…

Under ports tab do you see traffic?

pastebin the output of ./poller.php -h HOSTNAME -d -r -f -m ports

under the ports tab (which shows all the interfaces) no, it still shows 0’s across the board.

if i further click on that port there is an option for “real time” charting of that interface which does show traffic as expected.

The output from ./poller.php -h HOSTNAME -d -r -f -m ports can be viewed here: https://wickidmachines.com/outputs.txt

Yeah, looks like it’s not HC counter either so not sure what is going on…

ifHighSpeed is 0 so it’s not falling back to non HC counters. Try this patch: https://p.libren.ms/view/raw/cf3d7eb4

I am unsure of how to apply that patch. advise please

Thank You

wget https://p.libren.ms/view/raw/cf3d7eb42 && git apply cf3d7eb42`

Thank you Iaf!

There seems to be graphs being built now. I will run some tests to see the accuracy.

Question: Will this patch be persistent or will the updates/upgrades overwrite it? Do you know if this patch will be included in future releases of LibreNMS being it is reproduced with several pfSense installations?

It will need submitting to make it into the core release. The fix is pretty trivial and I don’t see any downsides to it unless a vendor wants HC counters to be used but reports bad ifHighSpeed values.

Today the daily.sh script threw an error concerning the file modified by the patch used to resolve this pfsense error.

librenms@LibreNMS:~$ ./daily.sh
Checking PHP version                               OK
Updating to latest codebase                        FAIL
error: Your local changes to the following files would be overwritten by merge:
        includes/polling/ports.inc.php
Please, commit your changes or stash them before you can merge.

Firstly, how can this update be applied with a modified ports.inc.php file?
Secondly, is there a work around for applying updates then reapplying the patch? Or will it need to be manually done each time?

Ended up doing this:
git stash
git pull
git stash pop
npm install

Just curious if there is an automated means already in place before reinventing the wheel?

If apply a git hub patch you will need to remove it in order to receive updates.

To remove the patch run

./scripts/github-remove -d

I had to do a fresh install the other day. Seems I am back at this issue once again. However when I went to apply the patch as before it would seem the file is no longer available.

wget https://p.libren.ms/view/raw/cf3d7eb42 && git apply cf3d7eb42`

Does anyone know where this file now resides?

Even with a current build of librenms the pfsense metrics are not be tabulated.

Ok it seems the link I copied had a slight typo in it. After correcting that I was able to wget the file. However as shown below the patch failed to apply. Thoughts?

$ wget https://p.libren.ms/view/raw/cf3d7eb4 && git apply cf3d7eb4
–2019-01-12 17:27:47-- https://p.libren.ms/view/raw/cf3d7eb4
Resolving p.libren.ms (p.libren.ms)… 46.37.188.124
Connecting to p.libren.ms (p.libren.ms)|46.37.188.124|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [text/plain]
Saving to: ‘cf3d7eb4’

cf3d7eb4 [ <=> ] 740 --.-KB/s in 0s

2019-01-12 17:27:48 (35.6 MB/s) - ‘cf3d7eb4’ saved [740]

error: patch failed: includes/polling/ports.inc.php:190
error: includes/polling/ports.inc.php: patch does not apply

I think this needs to be re-opened. I am having this issue as well as you can see the graphs for OpenVPN with pfsense are blank. I have this on a number of my other Librenms installs concerning pfsense. The patch no longer works as I have looked at the code and discovered that the files it updates for that code were rewritten!

Not sure where to go from here

Pfsense

2.4.4-RELEASE-p1 (amd64)
built on Mon Nov 26 11:40:26 EST 2018
FreeBSD 11.2-RELEASE-p4

====================================

Component Version
LibreNMS 1.47-44-g29f8a8d
DB Schema 281
PHP 7.0.32-0ubuntu0.16.04.1
MySQL 10.0.36-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.8.0
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Real time graphing is working.

Output of

./discovery.php -h HOSTNAME -d -m ports
./poller.php -h HOSTNAME -d -m ports

https://p.libren.ms/view/3b4b036f

Was never closed… nobody has provided a solution or where the issue is.

I’m having the same issue with ovpnc interfaces on pfSense 2.4.4-RELEASE-p

But. Billing works for those same interfaces. Is the billing poller different in some way from the device poller?

After some more digging on this issue I was able to find a fix that at least works for me.
You have to have selected port polling enabled, at least for pfsense devices.

Adding the following to my configuration file allowed graphing to start.
$config['os']['pfsense']['polling']['selected_ports'] = true;

1 Like