Code Monkey home page Code Monkey logo

monit-dashboard's People

Contributors

adriaaah avatar saravanan30erd 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

Watchers

 avatar  avatar  avatar

monit-dashboard's Issues

ValueError: Expecting property name: line 2 column 3 (char 4)

Hi,

On my system it does not work.
I get the following error:

http://0.0.0.0:8888/
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
return self.handle()
File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
return handle_class(cls)
File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
return tocall(*args)
File "./bin/monit-dashboard.py", line 72, in GET
return render.index(output=getMonit(), now=datetime.datetime.now())
File "./bin/monit-dashboard.py", line 34, in getMonit
cf = json.loads(f.read())
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 2 column 3 (char 4)

127.0.0.1:37400 - - [28/Feb/2017 10:23:51] "HTTP/1.1 GET /" - 500 Internal Server Error

I have the following system:
cat /etc/debian_version
8.7
uname -a
Linux gatekeeper 3.4.106-cubieboard #2 SMP PREEMPT Tue Feb 17 06:16:56 CET 2015 armv7l GNU/Linux

dpkg -l python-xmltodict python-requests python-webpy
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-===================-===================-===============================================================
ii python-requests 2.4.3-6 all elegant and simple HTTP library for Python2, built for human be
ii python-webpy 1:0.37+20120626-1 all Web framework for Python applications
ii python-xmltodict 0.9.0-1 all Makes working with XML feel like you are working with JSON

Many thanks
Michael

500 Internal error String indices must be integer

With a clean install i got

./bin/monit-dashboard.py
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/site-packages/web/application.py", line 462, in _delegate
    return handle_class(cls)
  File "/usr/lib/python2.7/site-packages/web/application.py", line 438, in handle_class
    return tocall(*args)
  File "./bin/monit-dashboard.py", line 72, in GET
    return render.index(output=getMonit(), now=datetime.datetime.now())
  File "./bin/monit-dashboard.py", line 48, in getMonit
    name = service['name']
TypeError: string indices must be integers

Any idea how fix the issue ?

Better use of the display

Since #9 (thank you, @saravanan30erd )a dashboard is being displayed.
However the server list remains on top and most of the area is being used by the dashboard.
Since most of displays are horizontal we could do a better use of the whole area by splitting the screen vertically instead of horizontally (e.g. server list on a left pane and the dashboard on the right).

Docker instructions

Hi there,

great dashboard!

Docker build instructions in README are wrong. I managed to bring it up with:

docker build -t monit-dashboard .
docker run -v $(pwd)/conf:/app/conf -p 8080:8080 monit-dashboard

What about publishing an image to the Docker hub?

Denote unmonitored services

Unmonitored services are shown as green. They should be shown in yellow color and also the status pie/legend should follow the same color schema (errors red, unmonitored yellow)

Unresponsive hosts

When a host is not responding (monit stopped, or host down) the application crashes with

ConnectionError: HTTPConnectionPool(host='example.com', port=2812): Max retries exceeded with url: /_status?format=xml (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f13380c7dd0>: Failed to establish a new connection: [Errno -2] Name or service not known',))    

What about marking the host somehow as down?

Error 500

Hi.
monit-dashboard]$ ./bin/monit-dashboard.py
http://0.0.0.0:8080/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process
return self.handle()
File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/lib/python2.7/site-packages/web/application.py", line 420, in _delegate
return handle_class(cls)
File "/usr/lib/python2.7/site-packages/web/application.py", line 396, in handle_class
return tocall(*args)
File "./bin/monit-dashboard.py", line 72, in GET
return render.index(output=getMonit(), now=datetime.datetime.now())
File "./bin/monit-dashboard.py", line 34, in getMonit
cf = json.loads(f.read())
File "/usr/lib64/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 4 column 3 (char 63)

Order/filter hosts by status?

As a minimum, it would be of great help to show first the hosts with any service failure.

A more ambitious improvement could be to order or filter hosts by several criteria.

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.