author | Luke Hoersten <luke@hoersten.org> |
Wed, 13 May 2020 09:25:09 -0500 | |
changeset 21 | fecc27fe5aef |
parent 15 | 6d7db9bae6c2 |
child 22 | adeda2afeb75 |
permissions | -rw-r--r-- |
6
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
1 |
--- |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
2 |
|
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
3 |
- name: add prometheus user to video group for rpi GPU stats |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
4 |
become: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
5 |
user: name="prometheus" groups="video" append="yes" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
6 |
|
8
20975062661d
Added grafana restart handler.
Luke Hoersten <luke@hoersten.org>
parents:
6
diff
changeset
|
7 |
- name: install prometheus rpi-exporter |
6
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
8 |
unarchive: |
15
6d7db9bae6c2
Fixed some bugs with prometheus node exporter not starting.
Luke Hoersten <luke@hoersten.org>
parents:
8
diff
changeset
|
9 |
src: "{{prometheus_client_rpi_src}}" |
6
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
10 |
remote_src: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
11 |
dest: "/tmp/" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
12 |
|
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
13 |
- name: install systemd service for rpi-exporter |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
14 |
become: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
15 |
copy: |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
16 |
src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter.service" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
17 |
remote_src: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
18 |
dest: "/lib/systemd/system/rpi_exporter.service" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
19 |
|
21
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
20 |
- name: disable GPU temp scraping |
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
21 |
become: yes |
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
22 |
lineinfile: |
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
23 |
path: "/lib/systemd/system/rpi_exporter.service" |
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
24 |
regexp: "^ExecStart=/usr/local/bin/rpi_exporter" |
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
25 |
line: "ExecStart=/usr/local/bin/rpi_exporter --collector.gpu=false" |
fecc27fe5aef
Disable prometheus rpi exporter GPU query.
Luke Hoersten <luke@hoersten.org>
parents:
15
diff
changeset
|
26 |
|
6
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
27 |
- name: install rpi-exporter binary |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
28 |
become: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
29 |
copy: |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
30 |
src: "/tmp/{{prometheus_client_rpi_dest}}/rpi_exporter" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
31 |
remote_src: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
32 |
dest: "/usr/local/bin/rpi_exporter" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
33 |
mode: "0755" |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
34 |
|
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
35 |
- name: ensure systemd service is started |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
36 |
become: yes |
3b1f18f6a5a4
Updated prometheus roles. WIP psql, nginx exporters.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
37 |
systemd: name="rpi_exporter.service" enabled="yes" state="started" |