News for hackers. Stuff that matters.

Show HN: pyDash – Small web-based dashboard for Linux in Python and Django

I started writing this mostly for the Pi but ended up building it to support multiple Linux OSs.

It's intended to be just that, a small dashboard providing real-time details on the usage. Still a work in progress and was done for fun, there's a demo as well :).

MIT license.

https://pydash.net or http://k3oni.github.io/pydash

( 19 comments | 39 points | on HN )
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by anglebracket on Wednesday February 12, 2014 @12:16PM (#7225580)
Hmm, all these eval() calls using data from cookies[0]... is this vulnerable to remote code execution? I think those eval() calls should be json.loads().

[0] https://github.com/k3oni/pydash/blob/1317771275aa118a40df1ec...

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @12:27PM (#7225687)
Those evals() are valid only if user is authenticated, if there is no authentication then no eval() will be performed on the cookies.
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by anglebracket on Wednesday February 12, 2014 @12:32PM (#7225738)
True, but just because you trust someone to access the dashboard doesn't mean you trust them to execute code on your server. There are other things to consider as well, like MITM attacks, and that an XSS hole would let the attacker set their own cookies.

The data in the cookies is just JSON, right? If json.loads() would work here you should switch to that instead.

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @01:01PM (#7226022)
Good point there, i'll look into limiting the eval().

I would hope that people won't give access to everyone to the dashboard, wasn't really build for that, or at least that wasn't my initial idea.

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by hegga on Wednesday February 12, 2014 @03:53PM (#7227200)
doesn't this get even worse since the python server is run by root?
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by spindritf on Wednesday February 12, 2014 @11:00AM (#7225002)
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @11:15AM (#7225100)
Thanks for the clickable link :)
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by scott_w on Wednesday February 12, 2014 @11:04AM (#7225032)
Looks really cool. Are there any plans for exposing any of this information via a JSON API?

Would be really nice to integrate some of the key numbers from this into other dashboards e.g. Dashing.

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @11:15AM (#7225096)
Actually it is exposing the data using JSON, and you can grab it by creating a session into Django and accessing the links for the different requests.

Take a look at urls.py, you can grab any of the data from /info/ by making a call to the specific requests.

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by scott_w on Wednesday February 12, 2014 @11:37AM (#7225266)
Very nice. I might have a bit of a play with this when I have some spare time :)
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by peterbe on Wednesday February 12, 2014 @12:33PM (#7225756)
Cute! I like it. I installed it on my server and it's ticking away quite nicely.

I'd love for the Processes table to have click-sortable column headers.

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by charleyramm on Wednesday February 12, 2014 @12:11PM (#7225540)
It is rather a 'web-based monitoring dashboard' than a 'web monitoring dashboard'.
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @12:13PM (#7225555)
Good catch, updated :)
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by STRiDEX on Wednesday February 12, 2014 @12:07PM (#7225507)
Looks like a really good jumping off point for quick customizable python management w/ interface.
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by joshbaptiste on Wednesday February 12, 2014 @12:00PM (#7225444)
Hmm.. for some reason when I think "small" Django just doesn't come to mind.
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @01:03PM (#7226028)
It could be moved to straight html and css, but i wanted to play with Django, and yes it could be smaller :).
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by piit_perk on Wednesday February 12, 2014 @12:18PM (#7225601)
nice, but not small :P

this one is really small -> https://github.com/abimaelmartell/system_monitor

Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by lazyant on Wednesday February 12, 2014 @11:54AM (#7225397)
Looks very nice. I'm only missing disk I/O as fundamental metric
Re:Show HN: pyDash – Small web-based dashboard for Linux in ... by k3oni on Wednesday February 12, 2014 @12:05PM (#7225492)
That shouldn't be to hard to add, could be grabbed from /proc/diskstats or /sys/block, i'll look into adding it tonight maybe.