Http endpoint for DSL stats

Im trying to make create openWRT support for this discord bot ,
i am aware of the terminal command ubus call dsl metrics that returns a Json payload but it was raised to my attention that openWRT has some http endpoint which a RESTful API but i cannot find any documentation about it .

What am i missing , does this endPoint realy exist ?

There is another project for DSL stats using collectd-exec .I'm using it since testing days and gave only good feedbacks since then. And it look like that:

1 Like


It is not labeled "RESTful", but it exposes RPC through a JSON-based HTTP API, so for all intents and purposes it is a REST API. Just be aware that in order to use it from the outside you would have to open up LuCI to the world, which brings along quite considerable security implications.

1 Like

to be honest i hoped for something more like PnP in the firmware , i had in my mind as a goal for this bot that it would be as zero-touch as posible for the CPE (no packages would need to be installed etc)

But i will certenly look into the link that @nicefile provided

I'm not entirely sure what you mean by "zero touch", mostly because it's not entirely clear to me what you are trying to achieve. Are you looking for statistics on the DSL modem, or are you looking to control the modem from outside? The discord bot seems to do both.

The link @nicefile mentioned requires you to install several packages, too -- mainly the collectd package to gather statistics and the luci-mod-statistics package to display them as a graph in LuCI. It's not hard by any means, but it's also decidedly not "zero-touch", and the packages take up a fair bit of space on lower-end routers' flash space.

(Also, full disclosure: I wrote that thing @nicefile mentioned. :wink: )

1 Like