-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cherry-pick-532adfe0' into 'master_6.rc.x'
CP 6RC - Story #10943: node_exporter logs redirect Story #10943: node_exporter logs redirect Update role node_exporter * Configure logs output under `/vitam/log/node_exporter/` * Deploy custom systemd script * Configure log_level with parameter `prometheus.node_exporter.log_level` * Add logrotate function with parameters * `prometheus.node_exporter.logrotate`: default(enabled) or disabled * `prometheus.node_exporter.history_days`: default(30) See merge request vitam/vitam!9444 (cherry picked from commit 532adfe) a435472 Story #10943: node_exporter logs redirect See merge request vitam/vitam!9448
- Loading branch information
Showing
6 changed files
with
66 additions
and
1 deletion.
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
15 changes: 15 additions & 0 deletions
15
...t/ansible-vitam-extra/roles/prometheus-node-exporter/templates/node-exporter.logrotate.j2
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,15 @@ | ||
{{ ansible_managed | comment }} | ||
|
||
{{ vitam_defaults.folder.root_path }}/log/node_exporter/node-exporter.log { | ||
daily | ||
rotate {{ prometheus.node_exporter.history_days | default(30) }} | ||
copytruncate | ||
dateext | ||
dateformat -%Y-%m-%d | ||
dateyesterday | ||
extension .log | ||
compress | ||
delaycompress | ||
notifempty | ||
missingok | ||
} |
2 changes: 1 addition & 1 deletion
2
deployment/ansible-vitam-extra/roles/prometheus-node-exporter/templates/node_exporter.j2
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 +1 @@ | ||
NODE_EXPORTER_OPTS='--web.listen-address={{ ip_admin }}:{{ prometheus.node_exporter.port | default(9101) }} --web.telemetry-path={{ prometheus.node_exporter.metrics_path | default('/metrics') }} --collector.textfile.directory /vitam/data/node_exporter/textfile_collector' | ||
NODE_EXPORTER_OPTS='--web.listen-address={{ ip_admin }}:{{ prometheus.node_exporter.port | default(9101) }} --web.telemetry-path={{ prometheus.node_exporter.metrics_path | default('/metrics') }} --collector.textfile.directory /vitam/data/node_exporter/textfile_collector --log.level={{ prometheus.node_exporter.log_level | default('warn') }}' |
18 changes: 18 additions & 0 deletions
18
...sible-vitam-extra/roles/prometheus-node-exporter/templates/vitam-node-exporter.service.j2
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,18 @@ | ||
# -*- mode: conf -*- | ||
|
||
[Unit] | ||
Description=Prometheus Node Exporter. | ||
Documentation=https://github.com/prometheus/node_exporter | ||
After=network.target | ||
|
||
[Service] | ||
EnvironmentFile=-/vitam/conf/node_exporter/sysconfig/node_exporter | ||
User=vitam | ||
Group=vitam | ||
ExecStart=/bin/bash -c 'exec /vitam/bin/node_exporter/node_exporter $NODE_EXPORTER_OPTS 2>> {{ vitam_defaults.folder.root_path | default('/vitam') }}/log/node_exporter/node-exporter.log' | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
Restart=always | ||
LimitNOFILE=65536 | ||
|
||
[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