Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
API for gateway status and pinger data
« previous
next »
Print
Pages: [
1
]
Author
Topic: API for gateway status and pinger data (Read 2878 times)
cpw
Jr. Member
Posts: 71
Karma: 4
API for gateway status and pinger data
«
on:
February 18, 2020, 09:21:18 pm »
Hi
So, I'm trying to enhance my netdata+prometheus and home-assistant installation to show status of outbound connections to upstream as well as maybe dpinger ping data.
I've been poking at the web console, and it seems the exact dataset I need is available from
Code:
[Select]
/widgets/api/get.php?load=gateway
Sadly, that is not invokeable as a "machine to machine" request - it sends a redirect to a login page when run from curl, which is quite disappointing.
I've looked through the code at opnsense/core and I can't see any way to get that information from an API otherwise.
Is there perhaps a way to call this API without being in an existing browser context?
Thanks
Logged
matthewsdi
Newbie
Posts: 7
Karma: 1
Re: API for gateway status and pinger data
«
Reply #1 on:
August 15, 2020, 09:15:06 pm »
I've added a feature request
https://github.com/opnsense/core/issues/4261
, and Ad Schellevis also gave me the cli equivalent if that helps you in the comments there.
Code:
[Select]
pluginctl -r return_gateways_status
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.1 Legacy Series
»
API for gateway status and pinger data