ndejong / pfsense_fauxapi

REST based API interface for pfSense 2.3.x and 2.4.x to facilitate devops
Apache License 2.0
354 stars 61 forks source link

Call for getting interface status #9

Closed vmsh0 closed 7 years ago

vmsh0 commented 7 years ago

Hello, It would be nice if this API would have a call for retrieving the status of all interfaces and gateways (including up/down, uptime for PPPoE, last ping delay, packetloss, all the stuff pfSense measures). Has anyone looked into this? Does anyone know where this data is saved? I may look into implement this myself, I really need it. Please share anything you may already know about this.

Kind regards.

vmsh0 commented 7 years ago

I found the required pfSense script that handles the data. It already return an array with gateway names and stats, so there's very little to do to add it to the API. Please confirm that all I have to do is to add a function (and the relevant pfSense include) to fauxapi_pfsense_interface.inc.

Alternatively, if you prefer to add it yourself, there is the relevant function: https://github.com/pfsense/pfsense/blob/bafd63b5d95054adcf97720a716e027cad0b17d4/src/etc/inc/gwlb.inc#L402

ndejong commented 7 years ago

That's a good one to add - I'll make it happen for you - N

ndejong commented 7 years ago

This feature has been added:- https://github.com/ndejong/pfsense_fauxapi#fauxapiv1actiongateway_status

Enjoy