Browse Source

Fixing exporter start

2.6.2/develop
Philippe Caseiro 1 year ago
parent
commit
a25f150a06
2 changed files with 3 additions and 4 deletions
  1. 2
    2
      init/prometheus-mysql-exporter
  2. 1
    2
      tmpl/prometheus-mysql-exporter.defaults

+ 2
- 2
init/prometheus-mysql-exporter View File

@@ -3,10 +3,10 @@ Description=Prometheus exporter for mysql metrics
3 3
 ConditionPathExists=/etc/default/prometheus-mysql-exporter
4 4
 
5 5
 [Service]
6
+Type=simple
6 7
 Restart=always
7
-User=prometheus
8 8
 EnvironmentFile=/etc/default/prometheus-mysql-exporter
9
-ExecStart=/usr/bin/mysqld-exporter $ARGS
9
+ExecStart=/usr/bin/mysqld_exporter $MY_EX_ARGS
10 10
 ExecReload=/bin/kill -HUP $MAINPID
11 11
 TimeoutStopSec=20s
12 12
 SendSIGKILL=no

+ 1
- 2
tmpl/prometheus-mysql-exporter.defaults View File

@@ -1,4 +1,3 @@
1 1
 # Prometheus Mysql defaults
2
-CNF='/etc/mysql/debian.cnf'
3 2
 
4
-ARGS="--config.my-cnf=${CNF}"
3
+MY_EX_ARGS="--config.my-cnf=/etc/mysql/debian.cnf --log.level=info"

Loading…
Cancel
Save