adriaaah / monit-dashboard Goto Github PK
View Code? Open in Web Editor NEWA web dashboard for rule all monit servers at a glance
License: GNU Affero General Public License v3.0
A web dashboard for rule all monit servers at a glance
License: GNU Affero General Public License v3.0
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
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 ?
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).
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?
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)
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?
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)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.