This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
communitycloud:services:monitoring [2012/09/08 12:36] tkilla created |
communitycloud:services:monitoring [2017/09/23 04:09] (current) tkilla [Plugins] |
||
---|---|---|---|
Line 3: | Line 3: | ||
* munin graphs | * munin graphs | ||
* monit service check & alarm system | * monit service check & alarm system | ||
+ | |||
+ | |||
+ | ===== monit ===== | ||
+ | |||
+ | syntax is a bit tricky, but it is a reliable system.. | ||
+ | |||
+ | TBD | ||
+ | |||
+ | |||
+ | monit mailq via external script: https:// | ||
===== munin ===== | ===== munin ===== | ||
Line 8: | Line 18: | ||
"Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" | "Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" | ||
- | ...tbd... FIXME | + | * " |
- | \\ | + | * " |
- | \\ | + | |
+ | |||
+ | **Configuration: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | **Plugin base setup:** | ||
+ | |||
+ | munin-node-configure --suggest | ||
+ | munin-node-configure --shell | ||
+ | |||
+ | **Test a plugin:** | ||
+ | |||
+ | munin-run < | ||
+ | |||
+ | **Test Server connection: | ||
+ | |||
+ | It should reply with the same hostname as setup in munin.conf. If not, edit munin-node.conf host_name on client | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | **Debug: | ||
+ | |||
+ | http:// | ||
==== access munin-nodes via SSH tunnel ==== | ==== access munin-nodes via SSH tunnel ==== | ||
Line 17: | Line 52: | ||
run this on the node: | run this on the node: | ||
- | ssh -L 4950: | + | ssh -L 4950: |
- | this tunnels munin port 4949 on the node to port 4950 on the master | + | this tunnels munin port 4949 on the node to port 4950 on the master, using a socket to be able to stop the tunnel: |
- | FIXME autossh would be better to keep the connection, but this doesnt work: | + | ssh -S / |
- | autossh | + | |
+ | SSH tunnel init script to autostart on boot: {{: | ||
+ | |||
+ | \\ | ||
+ | autossh would be better to keep the connection, but this doesnt work: FIXME | ||
+ | autossh -M 4951 -N -R 4949: | ||
+ | |||
+ | |||
+ | \\ | ||
edit **/ | edit **/ | ||
Line 40: | Line 82: | ||
more info: http:// | more info: http:// | ||
+ | |||
+ | |||
+ | ==== Plugins ==== | ||
+ | |||
+ | === smart === | ||
+ | |||
+ | ln -s / | ||
+ | ln -s / | ||
+ | |||
+ | |||
+ | === nginx === | ||
+ | |||
+ | http:// | ||
+ | ln -s / | ||
+ | |||
+ | nginx vhost / | ||
+ | |||
+ | server { | ||
+ | listen | ||
+ | |||
+ | access_log off; | ||
+ | server_name _; | ||
+ | server_name_in_redirect off; | ||
+ | root / | ||
+ | |||
+ | # nginx_status configuration, | ||
+ | location / | ||
+ | stub_status on; | ||
+ | access_log | ||
+ | allow 127.0.0.1; | ||
+ | deny all; | ||
+ | } | ||
+ | location / { | ||
+ | return 301 http://< | ||
+ | } | ||
+ | } | ||
+ | |||
+ | required packages: | ||
+ | |||
+ | apt-get install | ||
+ | |||
+ | / | ||
+ | |||
+ | [nginx*] | ||
+ | | ||
+ | |||
+ | |||
+ | === apache === | ||
+ | |||
+ | needs the apache status page | ||
+ | |||
+ | config: | ||
+ | [apache] | ||
+ | | ||
+ | | ||
+ | |||
+ | packages: | ||
+ | apt install libwww-perl | ||
+ | |||
+ | symlinks: | ||
+ | ln -s / | ||
+ | |||
+ | |||
+ | |||
+ | === mysql / mariadb === | ||
+ | |||
+ | mysql user required: | ||
+ | CREATE USER ' | ||
+ | GRANT PROCESS, REPLICATION CLIENT ON *.* TO ' | ||
+ | |||
+ | apt-get install libcache-{perl, | ||
+ | |||
+ | |||
+ | / | ||
+ | |||
+ | [mysql*] | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | # for myisam / queries..: | ||
+ | | ||
+ | |||
+ | enable replication graph: | ||
+ | ln -s / | ||
+ | |||
+ | bugfix: https:// | ||
+ | |||
+ | === php-fpm === | ||
+ | |||
+ | https:// | ||
+ | |||
+ | follow install howto | ||
+ | |||
+ | === http wget website loadtime === | ||
+ | ln -s / | ||
+ | |||
+ | / | ||
+ | |||
+ | [http_loadtime] | ||
+ | env.target https://< | ||
+ | |||
+ | === processes === | ||
+ | |||
+ | just name the symlink like the program you want to monitor (e.g. rsync): | ||
+ | |||
+ | ln -s / | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | === todo === | ||
+ | |||
+ | very good list and setup of plugins: http:// | ||
+ | |||
+ | |||
+ | nginx access by project | ||
+ | |||
+ | log analyser: | ||
+ | * needs logtail | ||
+ | * access.logs must be configured in / | ||
+ | * FIXME: doesn' | ||
+ | |||
+ | |||
+ | Alerts: | ||
+ | |||
+ | Do not work..for me.. yet..: | ||
+ | |||
+ | * https:// | ||
+ | * http:// | ||