Retrieving Virtualmin data, e.g. bandwidth to use in website.

Hi there,

I’m wondering if there is a way to retrieve Virtualmin data using a php/cgi/shell script.

My goal is to have a display on a website to show “Bandwidth usage so far this month” for a particular domain in Virtualmin. I understand that it’s probably a complicated process, but any suggestions would be appreciated!

Thanks in advance!

I’d love to see the ability to go to a page that lists charts of processor usage, memory usage, processes, email flow, network traffic flow, temperatures, domains and aliases all on one page for the last 24 hours, with the ability to change the time frame for all to hours, weeks or months…

This would allow us to see a quick snapshot of system performance rather than having to click checkboxes every time we wanted to check on things

You can retrieve bandwidth data with the list-bandwidth command, and it’s not even complicated. :wink:

virtualmin list-bandwidth --domain domain.tld --start 2009-06-01 --end 2009-06-30

Currently the output is plain text (but pretty easy to parse), but I believe Jamie has agreed that it needs to also be available in some other standard (and more readily parse-able) formats, like JSON or XML.

A friend who is a usability expert has been helping guide our ongoing major UI overhaul, and this is one of the ideas we’ve been experimenting with. I think it’s an excellent idea. I’m not sure how soon it will make it into the product (“major overhauls” are kind troublesome in that they introduce all sorts of new bugs, require new docs, and generally require more time than expected).

Another bit of his advice that we’ll be adding very soon is some grouping of elements in the graphs page. I never thought about it, but the available options has become quite intimidating now, and it’s often hard to find exactly the item you’re looking for. So, probably the next release will have groups for CPU, Memory, Disk, etc. Anyway, this one is the low-hanging fruit in the UI category, so it’s coming soonest.

Awesome! Just what I needed… didn’t know it existed.