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
+20-7Lines changed: 20 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,8 @@ These services can all run on a single server by applying the base class. You a
20
20
to use the [included defined types](#profile-defined-types) to configure telegraf on each of your Puppet infrastructure components
21
21
(master,compilers, puppetdb, postgres server) and the metrics will be stored on another server
22
22
running grafana and influxdb. In environments where there is an existing grafana / influxdb
23
-
instance, the later option probably makes the most sense.
23
+
instance, the later option is recommended. See [Determining where telegraf runs](#determining-where-telegraf-runs) for further
24
+
details.
24
25
25
26
You have the option of collecting metrics using any or all of these methods:
26
27
@@ -30,14 +31,26 @@ You have the option of collecting metrics using any or all of these methods:
30
31
31
32
## Setup
32
33
33
-
### 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.
34
41
35
42
Previous versions of this module put several `[[inputs.httpjson]]` entries in
36
43
`/etc/telegraf/telegraf.conf`. These entries should be removed now as all
37
44
module-specific settings now reside in individual files within
38
45
`/etc/telegraf/telegraf.d/`. Telegraf will continue to work if you do not remove them, however, the old
39
46
`[[inputs.httpjson]]` will not be updated going forward.
40
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.
41
54
42
55
### Beginning with puppet_metrics_dashboard
43
56
@@ -92,7 +105,7 @@ class { 'puppet_metrics_dashboard':
92
105
}
93
106
```
94
107
95
-
* 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.
96
109
97
110
### Enable Telegraf, Graphite, and Archive (puppet_metrics)
98
111
@@ -123,12 +136,12 @@ _Note:_ Enabling SSL on Grafana will not allow for running on privileged ports s
123
136
This is required for collection of postgres metrics. The class should be applied to the master (or postgres server if using external postgres).
124
137
125
138
```
126
-
class { 'puppet_metrics_dashboard::profile::postgres':
127
-
grafana_host => 'grafana-server.example.com',
139
+
class { 'puppet_metrics_dashboard::profile::master::postgres_access':
140
+
telegraf_host => 'grafana-server.example.com',
128
141
}
129
142
```
130
143
131
-
`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.
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.
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.
# @summary This class is deprecated. Please use the Puppet_metrics_dashboard::Profile::Master::Postgres_access class.
2
+
#
3
+
# @param grafana_host
4
+
# The FQDN of the host where telegraf runs.
5
+
# Defaults to an empty string. You can explicitly set this parameter or the class attempts to lookup which host has the puppet_metrics_dashboard class applied in PuppetDB. If the parameter is not set and the lookup does not return anything we issue a warning.
fail('The Puppet_metrics_dashboard::Profile::Postgres class is deprecated. Please use the Puppet_metrics_dashboard::Profile::Master::Postgres_access instead.')
0 commit comments