You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+82-32
Original file line number
Diff line number
Diff line change
@@ -13,25 +13,44 @@
13
13
14
14
## Description
15
15
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 and influxdb to consume metrics from Puppet services.
17
+
By default the metrics collection is done by another service called telegraf.
17
18
18
-
You have the option of getting metrics from any or all of three of these methods:
19
+
These services can all run on a single server by applying the base class. You also have the option
20
+
to use the [included defined types](#profile-defined-types) to configure telegraf on each of your Puppet infrastructure components
21
+
(master,compilers, puppetdb, postgres server) and the metrics will be stored on another server
22
+
running grafana and influxdb. In environments where there is an existing grafana / influxdb
23
+
instance, the later option is recommended. See [Determining where telegraf runs](#determining-where-telegraf-runs) for further
24
+
details.
19
25
26
+
You have the option of collecting metrics using any or all of these methods:
27
+
28
+
* Through telegraf, which polls several of Puppet's metrics endpoints (recommended)
20
29
* Through Archive files from the [puppetlabs/puppet_metrics_collector](https://forge.puppet.com/puppetlabs/puppet_metrics_collector) module
21
30
* 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
23
31
24
32
## Setup
25
33
26
-
### Upgrade note
34
+
### Upgrade notes, breaking changes in v2
35
+
36
+
The `puppet_metrics_dashboard::profile::postgres` class is now deprecated and you should use the `puppet_metrics_dashboard::profile::Master::postgres_access` class instead.
37
+
38
+
Parameters `telegraf_agent_interval` and `http_response_timeout` were previously integers but are now strings. The value should match a time interval, such as `5s`, `10m`, or `1h`.
39
+
40
+
`influxdb_urls` was previously a string, it should now be an array.
27
41
28
42
Previous versions of this module put several `[[inputs.httpjson]]` entries in
29
43
`/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
44
+
module-specific settings now reside in individual files within
45
+
`/etc/telegraf/telegraf.d/`. Telegraf will continue to work if you do not remove them, however, the old
33
46
`[[inputs.httpjson]]` will not be updated going forward.
34
47
48
+
### Determining where telegraf runs
49
+
50
+
Telegraf can run on the grafana server or on each Puppet infrastructure node. To configure telegraf to run on the same host that
51
+
grafana runs on, use the `puppet_metrics_dashboard` class and the parameters: `master_list`, `puppetdb_list` and `postgres_host_list`. These parameters determine which hosts that telegraf polls.
52
+
53
+
To configure telegraf to run on each Puppet infrastructure node, use the corresponding profiles for those hosts. See [Profile defined types](#profile-defined-types). The `puppet_metrics_dashboard` class is still applied to a separate host to setup grafana and influxdb and the profile classes configure telegraf when applied to your Puppet infrastructure hosts.
35
54
36
55
### Beginning with puppet_metrics_dashboard
37
56
@@ -45,12 +64,11 @@ include puppet_metrics_dashboard
45
64
46
65
## Usage
47
66
48
-
### To install example dashboards for all of the collection methods:
67
+
### To install example dashboards and use the telegraf collection method (default):
@@ -68,8 +85,6 @@ class { 'puppet_metrics_dashboard':
68
85
69
86
```
70
87
class { 'puppet_metrics_dashboard':
71
-
configure_telegraf => true,
72
-
enable_telegraf => true,
73
88
master_list => ['master1.com',
74
89
# Alternate ports may be configured using
75
90
# a pair of: [hostname, port_number]
@@ -79,18 +94,6 @@ class { 'puppet_metrics_dashboard':
79
94
}
80
95
```
81
96
82
-
### Allow access to PE-managed postgres nodes with the following class:
83
-
84
-
This is required for collection of postgres metrics.
85
-
86
-
```
87
-
class { 'puppet_metrics_dashboard::profile::postgres':
88
-
grafana_host => 'postgres01',
89
-
}
90
-
```
91
-
92
-
`grafana_host` is optional. If you do not specify it, the class will look for a node with the `puppet_metrics_dashboard` class applied in PuppetDB and use the `certname` of the first host returned. If the PuppetDB lookup fails and you do not specify `grafana_host` then the class outputs a warning.
93
-
94
97
### Enable Graphite support
95
98
96
99
```
@@ -102,17 +105,15 @@ class { 'puppet_metrics_dashboard':
102
105
}
103
106
```
104
107
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.
108
+
* This method requires enabling on the master side as described [here](https://puppet.com/docs/pe/latest/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.
106
109
107
-
### Enable Telegraf, Graphite, and Archive
110
+
### Enable Telegraf, Graphite, and Archive (puppet_metrics)
@@ -130,14 +131,63 @@ By default, this will create a set of certificates in `/etc/grafana` that are ba
130
131
131
132
_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)
132
133
134
+
### Allow access to PE-managed postgres nodes with the following class:
135
+
136
+
This is required for collection of postgres metrics. The class should be applied to the master (or postgres server if using external postgres).
137
+
138
+
```
139
+
class { 'puppet_metrics_dashboard::profile::master::postgres_access':
140
+
telegraf_host => 'grafana-server.example.com',
141
+
}
142
+
```
143
+
144
+
`telegraf_host` is optional. If you do not specify it, the class will look for a node with the `puppet_metrics_dashboard` class applied in PuppetDB and use the `certname` of the first host returned. If the PuppetDB lookup fails and you do not specify `telegraf_host` then the class outputs a warning.
145
+
146
+
### Profile defined types
147
+
148
+
The module includes defined types that you can use with an existing grafana implementation. For example:
Because of the way that the telegraf module works, these examples will overwrite any configuration in telegraf.config if it is *not* already puppet-managed. See the [puppet-telegraf documentation](https://forge.puppet.com/puppet/telegraf#usage) on how to manage this file and add important settings.
183
+
133
184
### Other possibilities
134
185
135
-
Configure the passwords for the InfluxDB and Grafana administrator users and enable additional [TICK Stack](https://www.influxdata.com/time-series-platform/) components.
186
+
Configure the passwords for the InfluxDB and enable additional [TICK Stack](https://www.influxdata.com/time-series-platform/) components.
136
187
137
188
```
138
189
class { 'puppet_metrics_dashboard':
139
190
influx_db_password => 'secret',
140
-
grafana_password => 'secret',
141
191
grafana_http_port => 8080,
142
192
grafana_version => '4.5.2',
143
193
enable_chronograf => true,
@@ -147,7 +197,7 @@ class { 'puppet_metrics_dashboard':
147
197
148
198
## Reference
149
199
150
-
**Note** This section is no longer maintained. Please see the REFERENCE.MD file for current listings.
200
+
**Note** This section is no longer maintained. Please see the REFERENCE.MD file for current listings.
151
201
152
202
## Limitations
153
203
@@ -159,7 +209,7 @@ Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install telegraf' returned 1: Err
159
209
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
160
210
```
161
211
162
-
To recify the issue, please update `nss` and `curl` on the affected system.
212
+
To rectify the issue, please update `nss` and `curl` on the affected system.
0 commit comments