Code Monkey home page Code Monkey logo

linux-dash's Introduction

v2.0
A simple & low-overhead web dashboard for linux systems

Demo  |  Docs

linux-dash Gitter chat


Features

  • Small ----- Under 400KB on disk (with .git removed)!
  • Simple ---- A minimalist, beautiful dashboard
  • Easy ------ Drop-in installation
  • Versatile -- Choose your stack from Node.js, Go, Python, PHP

Installation

Step 1

## 1. clone the repo
git clone --depth 1 https://github.com/afaqurk/linux-dash.git

## 2. go to the cloned directory
cd linux-dash/app/server

OR, if you prefer to download manually:

## 1. Download the .zip
curl -LOk https://github.com/afaqurk/linux-dash/archive/master.zip && unzip master.zip

## 2. navigate to downloaded & unzipped dir
cd linux-dash-master/app/server

Step 2

See instructions for preferred server linux-dash server (all included):

If Using Node.js

## install dependencies
npm install --production

## start linux-dash (on port 80 by default; may require sudo)
## You may change this with the `LINUX_DASH_SERVER_PORT` environment variable (eg. `LINUX_DASH_SERVER_PORT=8080 node server`)
## or provide a --port flag to the command below
## Additionally, the server will listen on every network interface (`0.0.0.0`).
## You may change this with the `LINUX_DASH_SERVER_HOST` environment variable (eg. `LINUX_DASH_SERVER_HOST=127.0.0.1 node server`)
## or provide a --host flag to the command below
node index.js

If Using Go

## start the server (on port 80 by default; may require sudo)
go run index.go

To build a binary, run go build && ./server -h. See @tehbilly's notes here for binary usage options

If Using Python

# Start the server (on port 80 by default; may require sudo).
python index.py

If Using PHP

  1. Make sure you have the exec, shell_exec, and escapeshellarg functions enabled
  2. Point your web server to app/ directory under linux-dash
  3. Restart your web server (Apache, nginx, etc.)

Support

For general help, please use the Gitter chat room.

Security

It is strongly recommended that all linux-dash installations be protected via a security measure of your choice.

Linux Dash does not provide any security or authentication features.

linux-dash's People

Contributors

0verbyte avatar albertbrufau avatar alozovskoy avatar andreyvital avatar arnaudbey avatar caramelomartins avatar cmfcmf avatar commonquail avatar donatj avatar dongweiming avatar glidership avatar hakandilek avatar jasonwbarnett avatar lacivert avatar lgaetz avatar mattlicense avatar mlitbk avatar noygal avatar prawnsalad avatar q-max avatar sbrl avatar simounet avatar spapas avatar steverobbins avatar tariqbuilds avatar thebouv avatar triforce avatar vernes avatar xiedezhuo avatar zmrow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux-dash's Issues

Encouragement.

Your software looks super cute, look forward to using it in future once the license is clear and the bugs are stomped :-) If I get any free time I'll see if I can patch something.

Define project goals

Without wanting to overwhelm @afaqurk with bureaucratic busywork, having some concrete goals (or non-goals) listed in, say, the readme, will make contributing easier. Two specific questions I'd like answered are targeted PHP version and targeted browsers. The former is obvious -- in case of the latter, targeting only recent browsers (which I'd personally suggest as reasonable considering the target audience) may allow for simplifying parts of the code (mainly CSS). Something else to consider could be what platforms are of interest but I don't personally have a stake in that.
This can be extended to include stuff like coding style or expectations of tests where applicable.

Primarily, what does afaqurk want from this project? Secondarily, what does everyone else want?

Raspberry Pi

Would this work on a Raspberry Pi? Going to try it out later on mine and see if it works but wasn't sure if there was official support for it.

Internet Speed always reports 0KB/s

I double checked that yes, the computer is connected to the internet. I remember the earlier versions of linux-dash worked fine, but it doesn't now.

Has the Internet Speed meter switched to only reporting used bandwidth, or what? (If so, that would explain it - my server sits idle most of the time...)

Refreshing issue

When clicking the the individual refresh buttons, if you click on the little refresh icon in the center of the refresh button it returns the "id" of the refresh icon instead of the button.
refresh1
Clicking on the outer edge returns the button's "id" like it is supposed to.
refresh2

Security / Login page or some other authorization

I am not sure but I think there should be a security check because this website opens the important information to the internet. So, it would be nice something like an optional login page and authorization mechanism.

Software tab producing crazy results.

SOFTWARE INSTALLATION
apache2: /usr/bin/openssl
vsftpd: /usr/bin/make

What is it meant to be? Makes no sense.

Would be better to run --version on each app and return the result. Or extract it from the package manager.

So two issues:

  1. Currently crazy results.
  2. Version info is WAY more useful than install dir info (especially when that's wrong).

Use only CDNs?

All third-party JS and CSS is available from reliable public CDNs. One or two are already referencing CDNs but most files are included in the repository.
I propose either eliminating all CDNs or using only CDNs, with a preference for the latter. The former removes a dependency on an Internet connection while the latter reduces maintenance.

where.php: PATH needs to be set

On Arch with nginx + php-fpm, where.php doesn't detect any of the installed software.

Error log:

"/usr/bin/which: no php in ((null))"

This can be fixed by setting the PATH correctly:

exec('PATH=/usr/bin /usr/bin/which ' . escapeshellarg($b), $which, $return_var);

This works for Arch, but certainly won't on other distros. Maybe there's a better way of retrieving the correct PATH?

documentation

would be nice to have simple installation procedure in readme.

I have just extracted zip in separate folder under var/www, and had to change all exec (something, $result) to $result = shell_exec (something). Now, I have columns in tables, but still no content in tables. I suppose that it have something to do with installation, permissions, etc...

Should there be a build step?

This is a discussion about the merits and demerits of adding a build step. It deals specifically with minified files, which @afaqurk has expressed desire for, but the question is broader than that.

Build Step

If there is need of auto-generating files a formal build step should be added. This ensures such files are generated consistently and eliminates menial tasks prone to user error. It then becomes necessary to decide when and how.

When

The build step can either happen before deployment or be treated as deployment. Advantages and disadvantages are presented below.

Build Before Deploy

Favours deployment. With every push the application is immediately deployable. Files needing building are included directly in the repository and are used by default. This is truest to the idea of "drop-in, minimal-dependency" -- simply pulling in the latest changes is sufficient to upgrade -- but comes at a development cost. You generally can't diff or merge generated files, and developers may simply forget to complete the build step.

Build Is Deploy

Favours development. The application is not immediately deployable in production form, though you would always be able to deploy the development version. Developers won't have to worry about issues resulting from conflicting generated files or forgetting the build step, but in turn the production server will have a dependency on whatever tool is chosen. It is possible to generate regular "releases" for situations where installing dependencies on the production server is strictly no-go, if there are any such.

How

These are tools I have personal experience with. There are other alternatives but I don't know anything about them, though all candidates are worthy of consideration. Node.js options are attractive because a number of the most actively maintained projects are based on Node.js. Unfortunately, Node.js is messy.

  • Shell script is the simplest choice but is also probably inadequate. While Bash is an official dependency we would still depend on third party tools that aren't be as widely available.
  • GNU Make has similar advantages and disadvantages to shell scripting. It's easier to invoke but has a cumbersome syntax and is probably less widely available than Bash.
  • Grunt is not nearly as lightweight, and is rather needlessly complex, but it is popular, easy to use, and has loads of plugins.
  • Gulp is a more recent alternative to Grunt. It is less battle tested, has fewer plugins, and is conceptually more complex even if implementation isn't. It's quite a bit faster than Grunt and somewhat more JavaScript-y. I am not critical of Gulp although this does sound like it.

Hostname and OS apparently not working in debian 7

In my dev server, I am getting this:

OS:
Uptime: 121Hours
Hostname:

Internet Speed: 0 KB/s

But if i execute php ./hostname.php I am getting debian, so I am not sure what's happening. probably a bug

EDIT: ok, the internet speed takes some time to update. so the problem is only the OS and hostname.

Suggestions

This is awesome, but I have some suggestions.

  1. I prefer the dynamic index file (PHP) so that one can add scripts...
  2. All CSS, JS and fonts should hosted locally. My application involves intranet with no access to the outside.
    Thanks a lot!

No Licence

Could you please specify what sort of Licence the dashboard is released under?

Auto update

Would be nice if all values could be updated without the need to manually reload.

license?

Hey, I don't see a license on this? It'd be good to know what license you'd like to use.

Read software to monitor from a list

I have written some functionality to monitor software installation's from a list in a file rather than a default hard-coded list. Would this be worth adding in?

Having this option will allow more flexibility in what software to check for.

sensors informations

hey its neat n clean its looks awesome. I have a suggestion how about adding some sensors information with CPU and MB temps .

Multi Server Support

It would be great to be able to install multi metric packages on your servers and have a single dashboard read those.

The server settings could be in some kind of Json file.

Any opinions?

Feature request: notifications

Would be a great and useful feature to be able to create/manage notifications based on threshold parameters set by the user. Example: email alert if load average > 95%, or available disk space < 2gb.

I know this can be set up manually directly on the machine, but a homogeneous interface with which to monitor your server would be a great value added.

Suggestion: Optional and closable widgets

  1. I was thinking how about we make the widgets showing optional and adding widgets that are very specific for running processes one likes to have a status on.
  2. I'm not a great coder myself, but I always like to learn stuff, so I'd thought I'd have a go at a widget for Deluge (torrent) app and see what I can get out of that.

Could need some help the first part of the issue, though. Any takers?

OSX Support?

I'm working in my fork on OSX support
Do you think it's something that should be added to this project?

Unable to create dwccache cache folder

With the new script compressor.php I obtain the following error message:
Unable to create dwccache cache folder
The error comes from the line 63 of compressor.php.
The problem is easily fixed by creating manually the dwccache folder with 777 permissions (or www-data as the owner).
It should maybe be added in the installation instructions...

Internet speed is for client not server

Seeing as how the Internet Speed is just a JS function that downloads an image from google, the metric is for the client not the server.

This is pretty irrelevant on a server status page I would think.

Should be another PHP script that does something similar.

sh/numberofcores.php returns "0" for some devices.

I'm running linux-dash on an small ARM based NAS running Debian Wheezy and in my case /proc/cpuinfo contains no matches for ^processor. The output is similar to the following:

Processor       : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 1980.82
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : 
Revision        : 
Serial          : 

That said, nproc returns a fairly reliable figure (of 1 in this case) - so may be a more reliable fallback?

Shutdown btn functionality?

I would suppose this should be able to shutdown the machine and reboot it? It would not make sense to just hard shutdown the machine without it rebooting.

Thoughts?

Refresh animation should be faster.

Cute, but currently it takes 3 seconds. 1 second would be more than enough. Quite irritating to wait. If I press the refresh button it's because I want new info NOW.

Small typo in demo header

Very nice and interesting project! Just want to signal a small typo in the green header stripe of your demo app: Linux Bootstrap Dashboad

XSS issues with JSON output

All of the scripts in /sh/ return JSON, but the Content-Type header is being sent as text/html. This will cause XSS issues when attacker-controlled strings in the JSON are interpreted as HTML.

header('Content-Type: application/json; charset=UTF-8'); should be called before echoing anything to prevent this.

Display of RAM not correct?

Hi,

I really like this dashboard. The only thing is that the RAM usage displayed by the dashboard is very different than the RAM usage displayed by landscape-sysinfo (Ubuntu server)
The attached screenshots were made at the same time.
Ths dashboard displays usage of 73%, while landscape-sysinfo displays only 29%

EDIT:

Webmin shows roughly the same info as landscape-sysyinfo.
screenshot 190

screenshot 191
screenshot 189

[ubuntu 10.04] top.php returns [null,null, ...]

$ php5 top.php 
[[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null],[null,null,null,null,null,null,null,null,null,null,null,null]]

OS Architecture Info

Will it be worth adding functionality to detect OS architecture? (32/64-bit). This could be done quite easily and added underneath hostname in General Info.

Network statistics widget causes error message

After updating just now (2014-02-12 7:30 am EST), reloading the page or refreshing the network statistics widget, always triggers this error popup:

The page at <ip_address> says:

DataTables warning (table id = 'netstat_dashboard'):
Requested unknown paremter '1' from the data source for
row 0

In the attached screencap you can see the row zero showing blank IP, I think this row corresponds to the nstat widget connection, refreshing the widget increments this number:
nstat
error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.