blob: acae68c4b5779fd068e9ffa9d56ee577d3ad509b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
My Watch
========
HTTP server for viewing MySQL queries on multiple servers. Designed to work
behind [Sproxy](https://github.com/zalora/sproxy).
Requirements
============
MyWatch is written in Haskell with [GHC](http://www.haskell.org/ghc/).
All required Haskell libraries are listed in [mywatch.cabal](mywatch.cabal).
Use [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install)
to fetch and build all pre-requisites automatically.
Installation
============
$ git clone https://github.com/zalora/mywatch.git
$ cd mywatch
$ cabal install
Usage
=====
Type `mywatch --help` to see usage summary:
Usage:
mywatch [options] MYCNF
Options:
-d, --datadir=DIR Data directory including static files [default: {cabal data dir}]
-s, --socket=SOCK Listen on this UNIX-socket [default: /tmp/mywatch.sock]
-p, --port=PORT Instead of UNIX-socket, listen on this TCP port (localhost)
-h, --help Show this message
Configuration
=============
The `MYCNF` argument denotes a MySQL client config file. Each section in this
file describes a MySQL server where you can view processes. As usually, the
"client" section applies internally to all other sections, but is ignored by
MyWatch. Remember to make this file secret if it includes passwords, or use the
`!include` directive. However, MyWatch does not parse included files for
more sections.
```
[foo]
host = example.com
user = user1
...
[bar]
host = example.net
user = user2
...
!include /run/keys/my.secret.cnf
```
Database Privileges
===================
MyWatch needs the `PROCESS` privilege.
Screenshots
===========
![MyWatch](./screenshots/mywatch.png)
![Access Denied](./screenshots/mywatch500.png)
|