Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Rest API for interface information like IP
« previous
next »
Print
Pages: [
1
]
Author
Topic: Rest API for interface information like IP (Read 2363 times)
cfuchs12345
Newbie
Posts: 2
Karma: 0
Rest API for interface information like IP
«
on:
June 13, 2023, 10:11:13 am »
Hi,
I wrote a small tool to manage my servers at home from one central point.
The tool is able to show data that my systems offer by an API (Proxmox, Docker, Pihole and so on).
Since I also got OPNSense running, I wanted to squeeze more information out of OPNSense , but I didn't find a way to get some data like the current interface status, connections speed and IP and so on by the REST API.
For Proxmox, I get a lot of information and can control more or less everything.
Would be nice to end up with something similar for OPNSense:
https://github.com/cfuchs12345/server-manager/blob/main/main_screen.png
Maybe someone could give me a hint how to get more useful information out of OPNSense - without having to write my own Agent that is running on the system?
At the moment I only have this:
https://github.com/cfuchs12345/server-manager/blob/main/opnsense.png
Would be also nice to get some data for the monitoring/graphs, that the tool can visualize
Regards,
Chris
PS: It is the first time, that I link it somewhere, so it is only used by myself so far. The tool is changing more or less daily. You can use it, but it might break due to it's early development state at any time. This is just a side-project where I wanted to learn some new stuff like Typescript, Angular, Rust and so on.
«
Last Edit: June 14, 2023, 08:44:34 am by cfuchs12345
»
Logged
Patrick M. Hausen
Hero Member
Posts: 6807
Karma: 572
Re: Rest API for interface information like IP
«
Reply #1 on:
June 13, 2023, 10:28:37 am »
What about using a standard protocol like SNMP and a tool like Observium?
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
cfuchs12345
Newbie
Posts: 2
Karma: 0
Re: Rest API for interface information like IP
«
Reply #2 on:
June 13, 2023, 10:45:44 am »
Hi,
I know that there are a lot of tools that can be used to monitor systems like OPNSense.
The thing is, I wanted to reduce the number of systems/tools that I use.
Before, I had one app for each task - a WakeOnLan WebGUI, CheckMK, Heimdall, all the GUIs for the system itself to control them (OpnSense GUI, Proxmox GUI, Tasmota).
For my homelab I felt this is overkill and I wanted to get all the functionality that I need in one place. Where I can switch my power-outlets for my 3D Printers, restart a Proxmox VM, trigger an Update, start a Server by WoL, send it to sleep and so on.
Besides that, it is fun to develop and I learned Rust, Angular and such things in parallel.
So yes, for the sake of getting data out of OpnSense, I know there are ways. But I wanted to integrate it into my app
Logged
enor
Newbie
Posts: 15
Karma: 0
Re: Rest API for interface information like IP
«
Reply #3 on:
June 19, 2023, 07:50:43 am »
I wonder the same.
Want to use an ESP32 with an LCD screen to output metrics. Like public ip WAN in/out etc..
What options are there to get metrics out from opnsense, could not see anything in rest api's docs either.
Opnsense Grafana dashboard seem to use telegraf/influxdb so maybe this is the way to go? Would be nicer with fewer moving parts though
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Rest API for interface information like IP