7 ms·
Show HN: Linux server monitoring web dashboard
- ivan_ah 13y agoVery cool. How difficult would it be to create widgets that show application-level stats like number of visitors on site or conversion rates (e.g. calculated from google analytics). I'm tired of having to loging to google analytics, lulu.com, and gumroad in three different tabs....
- batuhanicoz 13y agoTake a look at Dashing[0] by Shopify, it can be a base for what you want. There is already a Google Analytics plugin[1]. For Lulu.com, they are saying they are not accepting new developers[2] but if you have an API key, you may have luck building a widget for Dashing. [0] http://shopify.github.io/dashing/ http://shopify.github.io/dashing/ [1] https://github.com/Shopify/dashing/wiki/Additional-Widgets https://github.com/Shopify/dashing/wiki/Additional-Widgets [2] http://developer.lulu.com http://developer.lulu.com
- skyebook 13y agoDashing is gorgeous and surprisingly easy to write widgets for.. Hardest part was getting the layouts right.
- afaqurk 13y agoAs of now it is a very simple application. I am going to now start planning the roadmap for this as a product. Things like an API, integration with web services, etc. I'd say a few months down the road, your requests will be very viable.
- Edmond 13y agoyou sure you don't want to make a go at turning this into a full blown product? Imagine a more modern version of webmin. Very nice.
- wazoox 13y agoWebmin still works and is actively maintained. There even are good-looking themes nowadays. It would be a huge endeavour to re-implement all that came into webmin in the past ten years.
- prottmann 13y agoBut Webmin not satisfies the NIH-Syndrom ;-)
- afaqurk 13y agoExactly my intention: get feedback and then iterate towards a more viable product. I have quite a few more ideas for the interface and options. Definitely going to pursue it.
- ronaldsvilcins 13y agoPretty awesome!
- robinhoodexe 13y agoNeat, I'd like this to monitor my Pi... Just because I can.
- tjohns 13y agoI was actually just thinking the same thing. This would make a great status page for a headless RaspberryPi.
- ababab 13y agoCould you add installation/setup instructions?
- amjd 13y agoThere's no installation, just git clone and move to your www directory. $ git clone https://github.com/afaqurk/linux-dash.git https://github.com/afaqurk/linux-dash.git $ mv linux-dash/ /var/www/
- mryan 13y agoThat assumes you have a web server configured to serve PHP out of /var/www. At the very least you would want to put some access control in front of this.
- amjd 13y ago> That assumes you have a web server configured to serve PHP out of /var/www. The example was for Apache webserver. > At the very least you would want to put some access control in front of this. You're right, access control would be in order. Though I was merely suggesting the fastest way to try it out.
- _offset 13y agoMinor typo on the header: Dashboad Looks really nice. Was this built for Debian-based distros?
- afaqurk 13y agoThanks for the correction. Yes, this version was built for Debian distros. Working on more comprehensive support for the next iteration, which will have an API.
- k0 13y agoNot much different than conky...except the web service part. http://conky.sourceforge.net/ http://conky.sourceforge.net/
- Sir_Cmpwn 13y agoCan I use conky to monitor a remote server? I'd like that.
- potash 13y agoOf course! ssh -X. Obviously requires conky (and a minimal X server) on the server.
- Sir_Cmpwn 13y agoEh, I was hoping to do it without running x on the remote server.
- mh- 13y agono offense, I think that's effectively 'no'. :) no one is running an X server on their production servers, perhaps unless somehow related to their actual purpose (screenshots, ui testing, etc.)
- potash 13y agoP.S. I agree this is pointless. The best solution in my opinion is simply ssh and [h]top or glances.
- jdost 13y agoYou could use the conky-cli build (without the X dependency). You could then run it and pipe the output into some file that you serve statically. Hmmm may spend some time investigating.
- jdost 13y agoTo follow up with this. You could add `conky -c json.conky | while read json; do echo $json > /opt/http/monitor/info.json; done` to your start. Then just static serve the `info.json` file and it should update at whatever interval you set for conky. No dynamic execution though (hard part is that lack of interaction).
- carbocation 13y agoI believe the memory assessment will always show basically no free memory due to Linux's memory management and caching. It would make more sense to subtract out the cache to see what's really used and what's just being (smartly) cached.
- riquito 13y agoNice interface, but it's a bit strange to me that it uses shell exec for every kind of measure. e.g. # uptime.php <?php echo (int) (shell_exec('cat /proc/uptime')/(60*60));
- afaqurk 13y agoYea, that's my #1 concern now that I know its worth pursuing as a more well developed product. I'm hope to step away from PHP totally for the next iteration. This was more-so a proof-of-concept for the sake of feedback.
- riquito 13y agoI was thinking about not forking processes to read a file, not to avoid the use of php, if you're comfortable with that. What ideas do you have about reading the stats? You'll have to use a server side language anyway (or do you plan to read data from a third party service with a restful api?) edit: if you want to have a zero-install tool I'd suggest to go with python plus bottle (a one file webframework), so that you would be able to clone and use it from any directory.
- atmosx 13y agoYes, seems incredibly insecure approach, although the interface is beautiful.
- zaroth 13y agoBe careful of any externally controllable strings which might allow XSS and give panel access to an attacker. More of a problem for admin dashboards which have two-way control, which this one must if it can do on-demand refresh. That's why I prefer munin static pages.
- sneak 13y agoBetter idea: output the output of ohai and then handle the display in JS.
- jdiez17 13y agoThe interface looks very nice but no thanks, I'm not going to install PHP on my servers to have it. I'd totally set it up if it weren't for PHP. The risk is just too great to ignore.
- kodablah 13y agoSome server side code is required to obtain the data. Out of curiosity, what would it have to be written in to make you feel safe?
- jdiez17 13y agoIn anything that is not PHP. Bash would have been perfect for this use case, for example. The correct way to do this is to obtain the data separately and merely show it on the interface. I haven't audited the code, so I don't know what's being passed to the shell commands, but the fact that an attacker MIGHT be able to influence the commands being executed (see register_globals, etc (yes, I know this has been disabled by default in recent versions of PHP)) is enough for me to completely write it off as an unnecesary risk. By collecting the data periodically (i.e a cron job) you eliminate most possible vulnerabilities.
- kodablah 13y agoFirst you say anything not PHP then you don't mention one. While I agree that off-request collection may be wiser, I fail to see anything mentioned better than PHP unless you're seriously mentioning Bash to write a webapp like this. Mentioning an old security concern that is no longer an issue seems like an easy way to discount every possible language.
- jdiez17 13y agoI said that a bash script would be perfect for collecting data periodically and saving it to a file, I wasn't suggesting that you use it to write a web app. I thought that was clear; apologies if it wasn't. However, you say that this is an easy way to discount every possible language: can you point me to a vulnerability on the same level as register_globals in any other language?
- pawelo 13y agoI made similar dashboard app a year ago, written in python with extensible and configurable metrics https://github.com/Eyjafjallajokull/aboco https://github.com/Eyjafjallajokull/aboco also supports application-specific stats.
- dkd903 13y agoIs this like a beautiful version of PHPInfo?
- jqm 13y agoVery Cool. Would be nice to show Apache access logs as well (careful parsing those:).
- martius 13y agoI think you should remove the animation on the numbers: it prevents the user from reading quickly valuable info (and isn't really useful anyway). Still, the interface is really cool!
- vinodhdavid 13y agoTrue using PHP would also have server dependant issues as well as security issues. I feel PHP is a web framework and would suggest using a application framework for this.
- Cyberpew 13y agoThis looks very nice! However, multi-server support would make this even more amazing.