Filippo Giunchedi has submitted this change and it was merged.

Change subject: Add /var/lib/prometheus to prometheus clients
......................................................................


Add /var/lib/prometheus to prometheus clients

Bug: T126757
Change-Id: I41522334666be23a94af6c27d41c9f033ffb5a9a
---
M modules/prometheus/manifests/mysqld_exporter.pp
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
  Jcrespo: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/prometheus/manifests/mysqld_exporter.pp 
b/modules/prometheus/manifests/mysqld_exporter.pp
index 6b389c3..67f60c9 100644
--- a/modules/prometheus/manifests/mysqld_exporter.pp
+++ b/modules/prometheus/manifests/mysqld_exporter.pp
@@ -26,6 +26,13 @@
 ) {
     require_package('prometheus-mysqld-exporter')
 
+    file { '/var/lib/prometheus':
+        ensure => directory,
+        mode   => '0550',
+        owner  => 'prometheus',
+        group  => 'prometheus',
+    }
+
     # default .my.cnf location (i.e. $HOME/.my.cnf)
     file { '/var/lib/prometheus/.my.cnf':
         ensure  => present,
@@ -33,7 +40,10 @@
         owner   => 'prometheus',
         group   => 'prometheus',
         content => template('prometheus/mysqld_exporter.cnf.erb'),
-        require => Package['prometheus-mysqld-exporter'],
+        require => [
+          Package['prometheus-mysqld-exporter'],
+          File['/var/lib/prometheus'],
+        ],
         notify  => Service['prometheus-mysqld-exporter'],
     }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/301787
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I41522334666be23a94af6c27d41c9f033ffb5a9a
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <jcre...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Jcrespo <jcre...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to