Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network info via api #1247

Closed
donhwy opened this issue Mar 21, 2022 · 4 comments
Closed

Network info via api #1247

donhwy opened this issue Mar 21, 2022 · 4 comments
Labels

Comments

@donhwy
Copy link

donhwy commented Mar 21, 2022

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

This came up in the forum. I don't know how many use home assistant but it looks interesting.
https://forum.openmediavault.org/index.php?thread/42487-omv-6-api/&pageNo=1

Describe the solution you'd like
A clear and concise description of what you want to happen.

The info is available in the web ui so I hope it is not to much work to make it available in the api

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

The snmp plugin also provides this info. That is what I use.

Additional context
Add any other context or screenshots about the feature request here.
Thanks for considering this.

@donhwy donhwy added the feature label Mar 21, 2022
@votdev
Copy link
Member

votdev commented Mar 21, 2022

The info is available in the web ui so I hope it is not to much work to make it available in the api

If the data is displayed in the UI, then it is available via RPC API; because the UI is using it to fetch the data.

You should get a little bit more clearer which data you are interested in. Please understand that i do not have the time to read the whole forum post to pick the information. Please describe it here.

@donhwy
Copy link
Author

donhwy commented Mar 21, 2022

I asked the dev to fill in more info for you.

@tomaae
Copy link

tomaae commented Mar 22, 2022

I think there was some misunderstanding.
I was asking if it was possible to get current bandwidth per adapter (RX/TX) from API.
Only way it is available in OMV UI I could find are RRD graphs.
If it was made available tho, it would be useful for automation flows. For example, I use bandwidth data to trigger NAS offsite backups/sync during low usage periods.

@SamJongenelen
Copy link

SamJongenelen commented Dec 21, 2022

So, i'm new to the language, but have found the relevant API code in the OMV repository:
https://github.com/openmediavault/openmediavault/blob/master/deb/openmediavault/usr/share/openmediavault/engined/rpc/network.inc

RPC name: Network

RPC functions:

	getGeneralSettings
	setGeneralSettings
	enumerateDevices
	enumerateDevicesList
	enumerateConfiguredDevices
	identify
	getInformation
	getInterfaceList
	getInterface
	deleteInterface
	getEthernetCandidates
	getEthernetIface
	setEthernetIface
	enumerateBondSlaves
	getBondIface
	setBondIface
	getVlanCandidates
	getVlanIface
	setVlanIface
	getWirelessCandidates
	getWirelessIface
	setWirelessIface
	enumerateBridgeSlaves
	getBridgeIface
	setBridgeIface
	getProxy
	setProxy

The object is return as following:

		type
		description
		stats
		gateway
		gateway6
		address
	        address6
		prefix
		prefix6
		netmask
		netmask6
		ether
		mtu
		state
		link
		speed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants