Importing status network device statistics using curl commands

Hello. I am trying to make a curl request using a python script and get the metrics and other common data from a IX10 router. The documentation only shows ow to do this but with the configuration options of the device, web-API like. I need something like this.

but using a python that uses curls, much like this.
Device_health=requests.get(‘https://user:password@IP/cgi-bin/config.cgi/value/monitoring/devicehealth’,verify=False)

print(Device_health.status_code)

Device_health_f=json.dumps(Device_health.json(), indent=4)

print(Device_health_f)

I have been able to get the config parameters of device health, I need to do something similar with the network, but not the conf parameters, the Rx, TX, data.

Any Advise? thanks!

Any advice?

Hello and welcome to the new Digi Forums!

Are these just shell requests or is there a component of Digi Device Manager (DRM) as well using the DRM API? Just seeing a good starting area.

You may also need to open a case with us by emailing tech.support@digi.com

we have tried to use the REST API. The metrics of the device (network connection, signal strength, data send and data received, etc) but it seems there is no interface to get the metrics, only to check and set configuration settings.

thanks for reply!

Good afternoon!

You might be able to use “metrics” for pull this data. For example, here is my device:

metrics.network.device.eth.1.rx.bytes=974929961
metrics.network.device.eth.1.rx.overruns=0
metrics.network.device.eth.1.rx.packets=6221278
metrics.network.device.eth.1.tx.bytes=214242093
metrics.network.device.eth.1.tx.dropped=0
metrics.network.device.eth.1.tx.packets=2012797

I haven’t ran this as an REST API call but this is from shell using “runt”.

thanks. I think we can make this work with a python script and send the data through serial port