Skip to content

Commit 93658f5

Browse files
Merge pull request #105 from open-craft/shimulch/bb-3847
Add LimitNOFILE in prometheus.service
2 parents ef2f0cb + 0af3603 commit 93658f5

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ prometheus_snmp_exporter_version: '0.20.0'
7979

8080
# Blackbox exporter
8181
prometheus_blackbox_exporter_version: '0.18.0'
82+
83+
# Number of open file allowed, value for LimitNOFILE
84+
prometheus_service_limitnofile: infinity
8285
```
8386
8487
[DOCS: Prometheus variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/prometheus.md)

defaults/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,6 @@ prometheus_black_box_log__level: 'info'
551551

552552
prometheus_black_box_config_modules:
553553
# Blackbox modules config in format of YAML
554+
555+
# Number of open file allowed, value for LimitNOFILE
556+
prometheus_service_limitnofile: infinity

templates/prometheus.service.j2

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Group={{prometheus_group}}
1616
StandardOutput=journal
1717
StandardError=journal
1818
WorkingDirectory={{ prometheus_install_dir }}/{{ prometheus_archive }}
19+
LimitNOFILE={{ prometheus_service_limitnofile }}
1920

2021
[Install]
2122
WantedBy=multi-user.target

0 commit comments

Comments
 (0)