Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 409baf9

Browse files
author
suckatrash
committed
Update README
1 parent f0fac1c commit 409baf9

File tree

1 file changed

+40
-20
lines changed

1 file changed

+40
-20
lines changed

README.md

+40-20
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,22 @@
1313

1414
## Description
1515

16-
This module is used to configure grafana, telegraf, and influxdb to consume metrics from Puppet service.
16+
This module is used to configure grafana, telegraf, and influxdb to consume metrics from Puppet services.
1717

1818
You have the option of getting metrics from any or all of three of these methods:
1919

20+
* Through telegraf, which polls several of Puppet's metrics endpoints (recommended)
2021
* Through Archive files from the [puppetlabs/puppet_metrics_collector](https://forge.puppet.com/puppetlabs/puppet_metrics_collector) module
2122
* Natively, via Puppetserver's [built-in graphite support](https://puppet.com/docs/pe/2019.0/getting_started_with_graphite.html#task-7933)
22-
* Through telegraf, which polls several of Puppet's metrics endpoints
2323

2424
## Setup
2525

2626
### Upgrade note
2727

2828
Previous versions of this module put several `[[inputs.httpjson]]` entries in
2929
`/etc/telegraf/telegraf.conf`. These entries should be removed now as all
30-
module-specific settings now reside in
31-
`/etc/telegraf/telegraf.d/puppet_metrics_dashboard.conf`. Telegraf will
32-
continue to work if you do not remove them, however, the old
30+
module-specific settings now reside in individual files within
31+
`/etc/telegraf/telegraf.d/`. Telegraf will continue to work if you do not remove them, however, the old
3332
`[[inputs.httpjson]]` will not be updated going forward.
3433

3534

@@ -45,12 +44,11 @@ include puppet_metrics_dashboard
4544

4645
## Usage
4746

48-
### To install example dashboards for all of the collection methods:
47+
### To install example dashboards and use the telegraf collection method (default):
4948

5049
```
5150
class { 'puppet_metrics_dashboard':
5251
add_dashboard_examples => true,
53-
influxdb_database_name => ['puppet_metrics','telegraf','graphite'],
5452
}
5553
```
5654

@@ -59,7 +57,6 @@ class { 'puppet_metrics_dashboard':
5957
```
6058
class { 'puppet_metrics_dashboard':
6159
add_dashboard_examples => true,
62-
influxdb_database_name => ['puppet_metrics','telegraf','graphite'],
6360
overwrite_dashboards => false,
6461
}
6562
```
@@ -68,8 +65,6 @@ class { 'puppet_metrics_dashboard':
6865

6966
```
7067
class { 'puppet_metrics_dashboard':
71-
configure_telegraf => true,
72-
enable_telegraf => true,
7368
master_list => ['master1.com',
7469
# Alternate ports may be configured using
7570
# a pair of: [hostname, port_number]
@@ -81,11 +76,11 @@ class { 'puppet_metrics_dashboard':
8176

8277
### Allow access to PE-managed postgres nodes with the following class:
8378

84-
This is required for collection of postgres metrics.
79+
This is required for collection of postgres metrics. The class should be applied to the master (or postgres server if using external postgres).
8580

8681
```
8782
class { 'puppet_metrics_dashboard::profile::postgres':
88-
grafana_host => 'postgres01',
83+
grafana_host => 'grafana-server.example.com',
8984
}
9085
```
9186

@@ -102,17 +97,15 @@ class { 'puppet_metrics_dashboard':
10297
}
10398
```
10499

105-
* This method requires enabling on the master side as described [here](https://puppet.com/docs/pe/2017.3/puppet_server_metrics/getting_started_with_graphite.html#enabling-puppet-server-graphite-support). The hostname(s) that you use in `master_list` should match the value(s) that you used for `metrics_server_id` in the `puppet_enterprise::profile::master` class.
100+
* This method requires enabling on the master side as described [here](https://puppet.com/docs/pe/2017.3/puppet_server_metrics/getting_started_with_graphite.html#enabling-puppet-server-graphite-support). The hostname(s) that you use in `master_list` should match the value(s) that you used for `metrics_server_id` in the `puppet_enterprise::profile::master` class.
106101

107-
### Enable Telegraf, Graphite, and Archive
102+
### Enable Telegraf, Graphite, and Archive (puppet_metrics)
108103

109104
```
110105
class { 'puppet_metrics_dashboard':
111106
add_dashboard_examples => true,
112107
influxdb_database_name => ['puppet_metrics','telegraf','graphite'],
113108
consume_graphite => true,
114-
configure_telegraf => true,
115-
enable_telegraf => true,
116109
}
117110
```
118111

@@ -130,14 +123,41 @@ By default, this will create a set of certificates in `/etc/grafana` that are ba
130123

131124
_Note:_ Enabling SSL on Grafana will not allow for running on privileged ports such as `443`. To enable this capability you can use the suggestions documented in [this Grafana documentation](http://docs.grafana.org/installation/configuration/#http-port)
132125

126+
### Profile defined types
127+
128+
The module includes defined types that you can use with an existing grafana implementation. For example:
129+
130+
#### Add telegraf to a master / compiler
131+
132+
```
133+
puppet_metrics_dashboard::profile::compiler{ $facts['networking']['fqdn']:
134+
timeout => '5s',
135+
}
136+
```
137+
138+
#### Add telegraf to a puppetdb node
139+
140+
```
141+
puppet_metrics_dashboard::profile::puppetdb{ $facts['networking']['fqdn']:
142+
timeout => '5s',
143+
}
144+
```
145+
146+
#### Add telegraf to a postgres server
147+
148+
```
149+
puppet_metrics_dashboard::profile::master::postgres{ $facts['networking']['fqdn']:
150+
query_interval => '10m',
151+
}
152+
```
153+
133154
### Other possibilities
134155

135-
Configure the passwords for the InfluxDB and Grafana administrator users and enable additional [TICK Stack](https://www.influxdata.com/time-series-platform/) components.
156+
Configure the passwords for the InfluxDB and enable additional [TICK Stack](https://www.influxdata.com/time-series-platform/) components.
136157

137158
```
138159
class { 'puppet_metrics_dashboard':
139160
influx_db_password => 'secret',
140-
grafana_password => 'secret',
141161
grafana_http_port => 8080,
142162
grafana_version => '4.5.2',
143163
enable_chronograf => true,
@@ -147,7 +167,7 @@ class { 'puppet_metrics_dashboard':
147167

148168
## Reference
149169

150-
**Note** This section is no longer maintained. Please see the REFERENCE.MD file for current listings.
170+
**Note** This section is no longer maintained. Please see the REFERENCE.MD file for current listings.
151171

152172
## Limitations
153173

@@ -159,7 +179,7 @@ Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install telegraf' returned 1: Err
159179
Error: /Stage[main]/Pe_metrics_dashboard::Telegraf/Package[telegraf]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install telegraf' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository: influxdb. Please verify its path and try again
160180
```
161181

162-
To recify the issue, please update `nss` and `curl` on the affected system.
182+
To rectify the issue, please update `nss` and `curl` on the affected system.
163183

164184
```
165185
yum install curl nss --disablerepo influxdb

0 commit comments

Comments
 (0)