prometheus: First version of role
This commit is contained in:
parent
051acc86cc
commit
9b1aa236c5
6 changed files with 172 additions and 0 deletions
23
roles/prometheus/files/prometheus.service
Normal file
23
roles/prometheus/files/prometheus.service
Normal file
|
@ -0,0 +1,23 @@
|
|||
[Unit]
|
||||
Description=Prometheus
|
||||
After=network-online.target
|
||||
Requires=local-fs.target
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="GOMAXPROCS={{ ansible_processor_vcpus|default(ansible_processor_count) }}"
|
||||
User=prometheus
|
||||
Group=prometheus
|
||||
UMask=007
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStart=/usr/local/sbin/prometheus \
|
||||
--config.file=/srv/prometheus/prometheus.yml \
|
||||
--log.level=info \
|
||||
--storage.tsdb.path=/srv/prometheus/data \
|
||||
--storage.tsdb.retention.time=365d \
|
||||
--web.console.libraries=/usr/local/share/prometheus/console_libraries
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue