-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from systemli/add-option-for-textfile-collector
Add Option to enable Prometheus Textfile Collector
- Loading branch information
Showing
10 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
|
||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
|
||
roles: | ||
- name: weareinteractive.apt | ||
- name: geerlingguy.apache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
|
||
collections: | ||
- community.general | ||
- community.mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
- name: Copy Textfile Collector Service | ||
ansible.builtin.template: | ||
src: "{{ item }}.j2" | ||
dest: "/etc/systemd/system/{{ item }}" | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: | ||
- Reload systemd daemon | ||
- Restart userli-collector | ||
loop: | ||
- userli-collector.service | ||
- userli-collector.timer | ||
|
||
- name: Enable Textfile Collector Service | ||
ansible.builtin.systemd: | ||
name: "{{ item }}" | ||
enabled: yes | ||
state: started | ||
loop: | ||
- userli-collector.service | ||
- userli-collector.timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Userli Prometheus Textfile Collector | ||
After=systemd-modules-load.service | ||
DefaultDependencies=no | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/bin/bash -c 'php {{ userli_symfony_path }}/bin/console app:metrics | sponge {{ userli_prometheus_textfile_collector_path }}/userli.prom' | ||
SyslogIdentifier=userli-textfile-collector | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Userli Prometheus Textfile Collector Timer | ||
|
||
[Timer] | ||
OnCalendar={{ userli_prometheus_textfile_collector_on_calendar }} | ||
Persistent=true | ||
|
||
[Install] | ||
WantedBy=timers.target |