
Show HN: Linux server monitoring web dashboard - afaqurk
https://github.com/afaqurk/linux-dash
======
carbocation
I 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.

~~~
afaqurk
You are right. I'll have to make that adjustment.

------
riquito
Nice 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
Yea, 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
I 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.

------
zaroth
Be 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.

------
ivan_ah
Very 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
Take 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
Dashing is gorgeous and surprisingly easy to write widgets for.. Hardest part
was getting the layouts right.

------
k0
Not much different than conky...except the web service part.

[http://conky.sourceforge.net/](http://conky.sourceforge.net/)

~~~
jdost
You 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
To 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).

------
robinhoodexe
Neat, I'd like this to monitor my Pi... Just because I can.

~~~
tjohns
I was actually just thinking the same thing. This would make a great status
page for a headless RaspberryPi.

------
pawelo
I 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.

------
Edmond
you 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
Webmin 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
But Webmin not satisfies the NIH-Syndrom ;-)

------
sneak
Better idea: output the output of ohai and then handle the display in JS.

------
ababab
Could you add installation/setup instructions?

~~~
amjd
There'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
That 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
> 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
Minor typo on the header: Dashboad

Looks really nice. Was this built for Debian-based distros?

~~~
afaqurk
Thanks 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.

------
vinodhdavid
True 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.

------
martius
I 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!

------
jqm
Very Cool. Would be nice to show Apache access logs as well (careful parsing
those:).

------
Cyberpew
This looks very nice!

However, multi-server support would make this even more amazing.

------
ronaldsvilcins
Pretty awesome!

------
jdiez17
The 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.

~~~
condiment
I had the same attitude, so I forked it and rewrote the PHP endpoints as a
Python script, which I execute outside of the context of the application via a
cronjob.

[https://github.com/arbuckle/linux-dash](https://github.com/arbuckle/linux-
dash)

~~~
itsderek23
Checkout
[https://github.com/scoutapp/server_metrics](https://github.com/scoutapp/server_metrics)
(Ruby - gem install server_metrics). Grabs all the key server + process
metrics, handles Linux memory cache, etc.

Requires a distro w/ "proc" functionality for the most metrics.

