forked from percona/pmm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
supervisord.conf
183 lines (167 loc) · 5.33 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
[unix_http_server]
chmod = 0700
username = dummy
password = dummy
[supervisord]
childlogdir = /var/log/supervisor
nodaemon = true
[supervisorctl]
username = dummy
password = dummy
user = root
[program:mysql]
priority = 1
user = mysql
command =
/usr/sbin/mysqld
--basedir=/usr
--datadir=/var/lib/mysql
--plugin-dir=/usr/lib64/mysql/plugin
--pid-file=/var/run/mysqld/mysqld.pid
--socket=/var/lib/mysql/mysql.sock
stdout_logfile = /var/log/mysql.log
stderr_logfile = /var/log/mysql.log
autorestart = true
[program:consul]
priority = 2
user = pmm
command =
/usr/sbin/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
directory = /usr/share/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
# use /var/log/grafana/grafana.log
stdout_logfile = NONE
stderr_logfile = NONE
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/crond -n
stdout_logfile = /var/log/cron.log
stderr_logfile = /var/log/cron.log
autorestart = true
[program:qan-api]
priority = 6
user = pmm
environment = PERCONA_DATASTORE_BASEDIR=/usr/share/percona-qan-api/src/github.com/percona/qan-api,PERCONA_DATASTORE_CONF=/etc/percona-qan-api.conf,BASE_PATH=/qan-api
# Sleep to wait for mysql to start up.
command = bash -c "sleep 5 && /usr/sbin/percona-qan-api -srcPath /usr/share/percona-qan-api/src -importPath github.com/percona/qan-api -runMode prod"
stdout_logfile = /var/log/qan-api.log
stderr_logfile = /var/log/qan-api.log
startretries = 60
autorestart = true
stopasgroup = true
[program:prometheus]
priority = 7
user = pmm
command =
/usr/sbin/prometheus
--config.file=/etc/prometheus.yml
--storage.local.path=/opt/prometheus/data
--web.listen-address=:9090
--storage.local.retention=ENV_METRICS_RETENTION
--storage.local.target-heap-size=ENV_METRICS_MEMORY_MULTIPLIED
--storage.local.chunk-encoding-version=2
--web.console.libraries=/usr/share/prometheus/console_libraries
--web.console.templates=/usr/share/prometheus/consoles
--web.external-url=http://localhost:9090/prometheus/
stdout_logfile = /var/log/prometheus.log
stderr_logfile = /var/log/prometheus.log
autorestart = true
stopwaitsecs = 300
# 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
# support pmm-data containers <1.5.0
[program:createdb2]
priority = 8
# Sleep to wait for mysql to start up.
command = bash -c 'sleep 5 && mysql -vv -e "CREATE DATABASE IF NOT EXISTS \`pmm-managed\`; GRANT ALL PRIVILEGES ON \`pmm-managed\`.* TO \"pmm-managed\"@localhost IDENTIFIED BY \"pmm-managed\""'
stdout_logfile = /var/log/createdb2.log
stderr_logfile = /var/log/createdb2.log
startretries = 60
autorestart = unexpected
[program:orchestrator]
priority = 9
user = pmm
directory = /usr/share/orchestrator
# Sleep to wait for mysql to start up.
command = bash -c "sleep 7 && /usr/sbin/orchestrator http"
stdout_logfile = /var/log/orchestrator.log
stderr_logfile = /var/log/orchestrator.log
startretries = 60
autostart = false
autorestart = true
stopasgroup = true
[program:dashboard-upgrade]
priority = 10
command = /usr/share/percona-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 =
/usr/local/percona/pmm-client/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
[program:pmm-manage]
priority = 12
command =
/usr/sbin/pmm-configurator
-ssh-key-owner pmm
-grafana-db-path /var/lib/grafana/grafana.db
stdout_logfile = /var/log/pmm-manage.log
stderr_logfile = /var/log/pmm-manage.log
autorestart = true
[program:pmm-managed]
priority = 13
command =
/usr/sbin/pmm-managed
-prometheus-config /etc/prometheus.yml
-prometheus-url http://127.0.0.1:9090/prometheus
-db-name pmm-managed
-db-username pmm-managed
-db-password pmm-managed
stdout_logfile = /var/log/pmm-managed.log
stderr_logfile = /var/log/pmm-managed.log
startretries = 1000000
autorestart = true