Go to file
Christophe Siraut 409a162329 fix node_exporter error #485 (see https://github.com/voxpupuli/puppet-prometheus_reporter/issues/9) 2018-01-24 10:37:37 +01:00
.github modulesync 1.4.1 2017-11-11 12:08:40 +01:00
lib/puppet/reports fix node_exporter error #485 (see https://github.com/voxpupuli/puppet-prometheus_reporter/issues/9) 2018-01-24 10:37:37 +01:00
spec modulesync 1.4.1 2017-11-11 12:08:40 +01:00
.gitignore modulesync 0.21.0 2017-04-19 11:25:21 +02:00
.msync.yml modulesync 1.6.0 2018-01-03 23:46:17 +01:00
.overcommit.yml modulesync 0.21.0 2017-04-19 11:25:21 +02:00
.pmtignore modulesync 0.21.0 2017-04-19 11:25:21 +02:00
.rspec modulesync 0.21.0 2017-04-19 11:25:21 +02:00
.rspec_parallel modulesync 0.21.3 2017-06-11 18:00:52 +02:00
.rubocop.yml modulesync 1.6.0 2018-01-03 23:46:17 +01:00
.sync.yml add secrets 2017-04-19 13:33:19 +02:00
.travis.yml modulesync 1.6.0 2018-01-03 23:46:17 +01:00
.yardopts modulesync 0.21.0 2017-04-19 11:25:21 +02:00
CHANGELOG.md release 0.2.0 2017-11-11 12:16:09 +01:00
Gemfile modulesync 1.5.0 2017-11-16 22:13:56 +01:00
LICENSE Add Readme and LICENSE 2016-10-21 11:06:50 +02:00
README.md Fix syntax in README.md 2017-04-19 13:00:03 +02:00
Rakefile modulesync 1.6.0 2018-01-03 23:46:17 +01:00
metadata.json [blacksmith] Bump version to 0.2.1-rc0 2017-11-11 12:22:48 +01:00

README.md

Puppet Prometheus Reports Processor

This module contains a Puppet reports processor that writes report metrics in a format that is accepted by Prometheus node_exporter Textfile Collector.

How to

Puppet setup

Include this module in your path, and create a file named prometheus.yaml in your Puppet configuration directory.

---
textfile_directory: /var/lib/prometheus-dropzone

Include prometheus in your Puppet reports configuration; enable pluginsync:

[agent]
report = true
pluginsync = true

[master]
report = true
reports = prometheus
pluginsync = true

Note: you can use a comma separated list of reports processors:

reports = puppetdb,prometheus

Prometheus

Call the Prometheus node_exporter with the -collector.textfile.directory flag:

node_exporter -collector.textfile.directory=/var/lib/prometheus-dropzone

Sample

puppet_report_resources{name="Changed",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Failed",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Failed to restart",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Out of sync",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Restarted",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Scheduled",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Skipped",environment="production",host="node.example.com"} 0
puppet_report_resources{name="Total",environment="production",host="node.example.com"} 519
puppet_report_time{name="Acl",environment="production",host="node.example.com"} 3.8629975709999984
puppet_report_time{name="Anchor",environment="production",host="node.example.com"} 0.002442332
puppet_report_time{name="Augeas",environment="production",host="node.example.com"} 10.629003954
puppet_report_time{name="Concat file",environment="production",host="node.example.com"} 0.0026740609999999997
puppet_report_time{name="Concat fragment",environment="production",host="node.example.com"} 0.012010700000000003
puppet_report_time{name="Config retrieval",environment="production",host="node.example.com"} 20.471957786
puppet_report_time{name="Cron",environment="production",host="node.example.com"} 0.000874118
puppet_report_time{name="Exec",environment="production",host="node.example.com"} 0.4114313850000001
puppet_report_time{name="File",environment="production",host="node.example.com"} 0.32955574000000015
puppet_report_time{name="File line",environment="production",host="node.example.com"} 0.002702939
puppet_report_time{name="Filebucket",environment="production",host="node.example.com"} 0.0003994
puppet_report_time{name="Grafana datasource",environment="production",host="node.example.com"} 0.187452552
puppet_report_time{name="Group",environment="production",host="node.example.com"} 0.0031514940000000003
puppet_report_time{name="Mysql datadir",environment="production",host="node.example.com"} 0.000422795
puppet_report_time{name="Package",environment="production",host="node.example.com"} 1.670733222
puppet_report_time{name="Service",environment="production",host="node.example.com"} 0.8740041969999999
puppet_report_time{name="Total",environment="production",host="node.example.com"} 38.468031933999995
puppet_report_time{name="User",environment="production",host="node.example.com"} 0.005163427
puppet_report_time{name="Yumrepo",environment="production",host="node.example.com"} 0.0010542610000000001
puppet_report_changes{name="Total",environment="production",host="node.example.com"} 0
puppet_report_events{name="Failure",environment="production",host="node.example.com"} 0
puppet_report_events{name="Success",environment="production",host="node.example.com"} 0
puppet_report_events{name="Total",environment="production",host="node.example.com"} 0
puppet_report{environment="production",host="node.example.com"} 1477054915347

Contributors

See Github.

Special thanks to Puppet, Inc for Puppet, and its store reports processor, to EvenUp for their graphite reports processor, and to Vox Pupuli to provide a platform that allows us to develop of this module.

Copyright © 2016 Puppet Inc

Copyright © 2016 EvenUp

Copyright © 2016 Multiple contributors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.