forked from percona/pmm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsupervisord.conf
115 lines (100 loc) · 3.77 KB
/
supervisord.conf
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[unix_http_server]
file = /var/run/supervisor.sock
chmod = 0700
username = dummy
password = dummy
[supervisord]
logfile = /var/log/supervisord.log
pidfile = /var/run/supervisord.pid
childlogdir = /var/log/supervisor
nodaemon = true
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///var/run/supervisor.sock
username = dummy
password = dummy
[program:mysql]
priority = 1
user = mysql
command = /usr/bin/mysqld_safe
stdout_logfile = /var/log/mysql.log
stderr_logfile = /var/log/mysql.log
autorestart = true
[program:consul]
priority = 2
user = pmm
command = /opt/consul agent -server -data-dir="/opt/consul-data" -bootstrap -client="0.0.0.0" -advertise="127.0.0.1" -ui
stdout_logfile = /var/log/consul.log
stderr_logfile = /var/log/consul.log
autorestart = true
[program:grafana]
priority = 3
user = grafana
environment = HOME=/usr/share/grafana
command = /usr/sbin/grafana-server --homepath=/usr/share/grafana --config=/etc/grafana/grafana.ini cfg:default.paths.data=/var/lib/grafana cfg:default.paths.logs=/var/log/grafana cfg:default.paths.plugins=/var/lib/grafana/plugins cfg:default.server.root_url="%%(protocol)s://%%(domain)s:%%(http_port)s/graph" ENV_AUTH_BASIC
stdout_logfile = /var/log/grafana.log
stderr_logfile = /var/log/grafana.log
autorestart = true
[program:nginx]
priority = 4
command = nginx
stdout_logfile = /var/log/nginx.log
stderr_logfile = /var/log/nginx.log
autorestart = true
[program:cron]
priority = 5
command = /usr/sbin/cron -f
stdout_logfile = /var/log/cron.log
stderr_logfile = /var/log/cron.log
autorestart = true
[program:qan-api]
priority = 6
user = pmm
environment = BG=no,BASE_PATH=/qan-api
# Sleep to wait for mysql to start up.
command = bash -c "sleep 5 && /usr/local/percona/qan-api/start"
stdout_logfile = /var/log/qan-api.log
stderr_logfile = /var/log/qan-api.log
startretries = 60
autorestart = true
[program:prometheus]
priority = 7
user = pmm
command = /opt/prometheus/prometheus -config.file=/opt/prometheus/prometheus.yml -storage.local.path=/opt/prometheus/data -web.listen-address=:9090 -storage.local.retention=ENV_METRICS_RETENTION -storage.local.memory-chunks=ENV_METRICS_MEMORY -storage.local.chunk-encoding-version=2 -web.console.libraries=/opt/prometheus/console_libraries -web.console.templates=/opt/prometheus/consoles -web.external-url=http://localhost:9090/prometheus/
stdout_logfile = /var/log/prometheus.log
stderr_logfile = /var/log/prometheus.log
autorestart = true
# This is here to support data containers of v1.0.4.
[program:createdb]
priority = 8
# Sleep to wait for mysql to start up.
command = bash -c "sleep 5 && mysql -vv -e \"CREATE DATABASE IF NOT EXISTS orchestrator; GRANT ALL PRIVILEGES ON orchestrator.* TO 'orchestrator'@'localhost' IDENTIFIED BY 'orchestrator'\""
stdout_logfile = /var/log/createdb.log
stderr_logfile = /var/log/createdb.log
startretries = 60
autorestart = unexpected
[program:orchestrator]
priority = 9
user = pmm
directory = /usr/local/orchestrator
# Sleep to wait for mysql to start up.
command = bash -c "sleep 7 && /usr/local/orchestrator/orchestrator http"
stdout_logfile = /var/log/orchestrator.log
stderr_logfile = /var/log/orchestrator.log
startretries = 60
autorestart = true
[program:dashboard-upgrade]
priority = 10
command = /opt/grafana-dashboards/import-dashboards.py
stdout_logfile = /var/log/dashboard-upgrade.log
stderr_logfile = /var/log/dashboard-upgrade.log
startsecs = 0
startretries = 60
autorestart = unexpected
[program:node_exporter]
priority = 11
command = /opt/node_exporter/node_exporter -web.listen-address=localhost:9100 -collectors.enabled=diskstats,filefd,filesystem,loadavg,meminfo,netdev,netstat,stat,time,uname,vmstat
stdout_logfile = /var/log/node_exporter.log
stderr_logfile = /var/log/node_exporter.log
autorestart = true