Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
API call to get memory stats
« previous
next »
Print
Pages: [
1
]
Author
Topic: API call to get memory stats (Read 3023 times)
oupsman
Newbie
Posts: 4
Karma: 0
API call to get memory stats
«
on:
December 24, 2022, 04:03:41 pm »
Hello,
I'm working on a widget for homepage (
https://github.com/benphelps/homepage
) to have informations on my OPNsenses firewall directly on my homepage. So far, I have the following infos (see attached picture) but getting memory usage and cpu usage is quite difficult, as I only found the /api/diagnostics/activity/getActivity to get it.
But memory information isn't accurate, and getting CPU usage info is tedious.
I would love to have a call similar to widgets/api/get.php?load=system%2Ctemperature%2Cinterfaces&_=xxxxxx
but this one does not seem to be allowed in API mode (aka with key:secret)
Is there any other API call that I missed ?
Thank you all.
Logged
Vangsguard
Newbie
Posts: 7
Karma: 0
Hello, friend. Hello, friend? That's lame
Re: API call to get memory stats
«
Reply #1 on:
December 21, 2023, 03:45:38 pm »
Hi there,
If you're using the business version of OPNsense, you can call the /api/opncentral/sync/metrics endpoint. This will provide you with extensive information about memory, CPU usage, disk usage, and much more.
For documentation, visit:
https://docs.opnsense.org/development/api/be/OPNBEcore.html
Best regards
- Vangsguard
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
API call to get memory stats