Skip to content

Commit 133b96b

Browse files
Merge pull request #125 from MartyEwings/main
Readme Update and Addition of SLES 12 Test Platform
2 parents 9d0f349 + c08233b commit 133b96b

File tree

4 files changed

+40
-95
lines changed

4 files changed

+40
-95
lines changed

.github/workflows/pe_latest_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup Acceptance Test Matrix
5454
id: get-matrix
5555
run: |
56-
echo "::set-output name=matrix::{\"platforms\":[{\"label\":\"CentOS-7\",\"provider\":\"provision::provision_service\",\"image\":\"centos-7\"},{\"label\":\"CentOS-8\",\"provider\":\"provision::provision_service\",\"image\":\"centos-8\"},{\"label\":\"RedHat-7\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-7\"},{\"label\":\"Ubuntu-1804\",\"provider\":\"provision::provision_service\",\"image\":\"ubuntu-1804-lts\"},{\"label\":\"RedHat-8\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-8\"}],\"collection\":[\"2021.2.0\"]}"
56+
echo "::set-output name=matrix::{\"platforms\":[{\"label\":\"CentOS-7\",\"provider\":\"provision::provision_service\",\"image\":\"centos-7\"},{\"label\":\"CentOS-8\",\"provider\":\"provision::provision_service\",\"image\":\"centos-8\"},{\"label\":\"RedHat-7\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-7\"},{\"label\":\"Ubuntu-1804\",\"provider\":\"provision::provision_service\",\"image\":\"ubuntu-1804-lts\"},{\"label\":\"RedHat-8\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-8\"},{\"label\":\"Sles-12\",\"provider\":\"provision::provision_service\",\"image\":\"sles-12\"}],\"collection\":[\"2021.2.0\"]}"
5757
- name: "Honeycomb: Record Setup Test Matrix time"
5858
if: ${{ always() }}
5959
run: |

.github/workflows/pe_lts_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup Acceptance Test Matrix
5454
id: get-matrix
5555
run: |
56-
echo "::set-output name=matrix::{\"platforms\":[{\"label\":\"CentOS-7\",\"provider\":\"provision::provision_service\",\"image\":\"centos-7\"},{\"label\":\"CentOS-8\",\"provider\":\"provision::provision_service\",\"image\":\"centos-8\"},{\"label\":\"RedHat-7\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-7\"},{\"label\":\"Ubuntu-1804\",\"provider\":\"provision::provision_service\",\"image\":\"ubuntu-1804-lts\"},{\"label\":\"RedHat-8\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-8\"}],\"collection\":[\"2019.8.7\"]}"
56+
echo "::set-output name=matrix::{\"platforms\":[{\"label\":\"CentOS-7\",\"provider\":\"provision::provision_service\",\"image\":\"centos-7\"},{\"label\":\"CentOS-8\",\"provider\":\"provision::provision_service\",\"image\":\"centos-8\"},{\"label\":\"RedHat-7\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-7\"},{\"label\":\"Ubuntu-1804\",\"provider\":\"provision::provision_service\",\"image\":\"ubuntu-1804-lts\"},{\"label\":\"RedHat-8\",\"provider\":\"provision::provision_service\",\"image\":\"rhel-8\"},{\"label\":\"Sles-12\",\"provider\":\"provision::provision_service\",\"image\":\"sles-12\"}],\"collection\":[\"2019.8.7\"]}"
5757
- name: "Honeycomb: Record Setup Test Matrix time"
5858
if: ${{ always() }}
5959
run: |

README.md

Lines changed: 31 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Table of Contents
1010
* [Sharing Metrics Data](#sharing-metrics-data)
1111
* [Reference](#reference)
1212
* [Directory Layout](#directory-layout)
13-
* [Cron Jobs](#cron-jobs)
13+
* [Systemd Timers](#systemd-timers)
1414
* [Alternate Setup](#alternate-setup)
1515
* [Temporary Installation](#temporary-installation)
1616
* [Manual Configuration of Hosts](#manual-configuration-of-hosts)
@@ -33,11 +33,11 @@ The metrics can be used to identify performance issues that may be addressed by
3333

3434
Install this module with `puppet module install puppetlabs-puppet_metrics_collector` or add it to your Puppetfile.
3535

36-
To activate this module, classify your Primary Master (aka Master of Masters or MoM) with the `puppet_metrics_collector` class using your preferred classification method.
36+
To activate this module, classify your Primary Server with the `puppet_metrics_collector` class using your preferred classification method.
3737
Below is an example using `site.pp`.
3838

3939
```puppet
40-
node 'master.example.com' {
40+
node 'primary.example.com' {
4141
include puppet_metrics_collector
4242
}
4343
```
@@ -47,7 +47,7 @@ Unlike service metrics, system metrics have to be enabled locally on each PE Inf
4747
This functionality depends on `sysstat`.
4848

4949
```puppet
50-
node 'master.example.com' {
50+
node 'primary.example.com' {
5151
include puppet_metrics_collector
5252
include puppet_metrics_collector::system
5353
}
@@ -57,7 +57,7 @@ node 'compilerA.example.com', 'compilerB.example.com,' {
5757
}
5858
```
5959

60-
> Note: Do not `include` the top-level `puppet_metrics_collector` class on any PE Infrastructure Host other than the Primary Master, otherwise it will collect the same data as the Primary Master.
60+
> Note: Do not `include` the top-level `puppet_metrics_collector` class on any PE Infrastructure Host other than the Primary Server, otherwise it will collect the same data as the Primary Server.
6161
6262
### Configuration
6363

@@ -140,14 +140,14 @@ In order to convert the metric files into a multi-line format, they can be proce
140140

141141
```bash
142142
cd /opt/puppetlabs/puppet-metrics-collector
143-
for i in <service_name>/master.example.com/*.json; do echo "$(python -m json.tool < $i)" > $i; done
143+
for i in <service_name>/primary.example.com/*.json; do echo "$(python -m json.tool < $i)" > $i; done
144144
```
145145

146146
You can search for useful information by performing a `grep`, run from inside the directory containing the metrics.
147147

148148
```bash
149149
cd /opt/puppetlabs/puppet-metrics-collector
150-
grep <metric_name> <service_name>/master.example.com/*.json
150+
grep <metric_name> <service_name>/primary.example.com/*.json
151151
```
152152

153153
Since the metrics are archived once per day, you can only search metrics for the current day.
@@ -158,23 +158,23 @@ To search older metrics, decompress the archived files into a subdirectory of `/
158158
Example:
159159

160160
```bash
161-
grep average-free-jrubies puppetserver/master.example.com/*.json
161+
grep average-free-jrubies puppetserver/primary.example.com/*.json
162162

163-
puppetserver/master.example.com/20190404T170501Z.json: "average-free-jrubies": 0.9950009285369501,
164-
puppetserver/master.example.com/20190404T171001Z.json: "average-free-jrubies": 0.9999444653324225,
165-
puppetserver/master.example.com/20190404T171502Z.json: "average-free-jrubies": 0.9999993830655706,
163+
puppetserver/primary.example.com/20190404T170501Z.json: "average-free-jrubies": 0.9950009285369501,
164+
puppetserver/primary.example.com/20190404T171001Z.json: "average-free-jrubies": 0.9999444653324225,
165+
puppetserver/primary.example.com/20190404T171502Z.json: "average-free-jrubies": 0.9999993830655706,
166166
```
167167

168168
#### Grepping PuppetDB Metrics
169169

170170
Example:
171171

172172
```bash
173-
grep queue_depth puppetdb/master.example.com/*.json
173+
grep queue_depth puppetdb/primary.example.com/*.json
174174

175-
puppetdb/master.example.com/20190404T170501Z.json: "queue_depth": 0,
176-
puppetdb/master.example.com/20190404T171001Z.json: "queue_depth": 0,
177-
puppetdb/master.example.com/20190404T171502Z.json: "queue_depth": 0,
175+
puppetdb/primary.example.com/20190404T170501Z.json: "queue_depth": 0,
176+
puppetdb/primary.example.com/20190404T171001Z.json: "queue_depth": 0,
177+
puppetdb/primary.example.com/20190404T171502Z.json: "queue_depth": 0,
178178
```
179179

180180
### Sharing Metrics Data
@@ -212,42 +212,30 @@ Example:
212212

213213
```bash
214214
/opt/puppetlabs/puppet-metrics-collector/puppetserver
215-
├── master.example.com
215+
├── primary.example.com
216216
│ ├── 20190404T020001Z.json
217217
│ ├── ...
218218
│ ├── 20190404T170501Z.json
219219
│ └── 20190404T171001Z.json
220220
└── puppetserver-2019.04.04.02.00.01.tar.gz
221221
/opt/puppetlabs/puppet-metrics-collector/puppetdb
222-
└── master.example.com
222+
└── primary.example.com
223223
│ ├── 20190404T020001Z.json
224224
│ ├── ...
225225
│ ├── 20190404T170501Z.json
226226
│ ├── 20190404T171001Z.json
227227
└── puppetdb-2019.04.04.02.00.01.tar.gz
228228
```
229229

230-
### Cron Jobs
230+
### Systemd Timers
231231

232-
This module creates two cron jobs for each Puppet Enterprise service:
232+
This module creates two systemd timers for each Puppet Enterprise service:
233233

234-
- A cron job to collect the metrics
234+
- One to collect the metrics
235235
- Runs as per `collection_frequency`
236-
- A cron job to archive collected metrics and delete metrics older than the retention period, as per `retention_days`
236+
- One to archive collected metrics and delete metrics older than the retention period, as per `retention_days`
237237
- Runs at randomly selected time between 12:00 AM and 3:00 AM
238238

239-
Example:
240-
241-
```bash
242-
crontab -l
243-
...
244-
# Puppet Name: puppetserver_metrics_collection
245-
*/5 * * * * /opt/puppetlabs/puppet-metrics-collector/scripts/tk_metrics --metrics_type puppetserver --output_dir /opt/puppetlabs/puppet-metrics-collector/puppetserver
246-
# Puppet Name: puppetserver_metrics_tidy
247-
0 2 * * * /opt/puppetlabs/puppet-metrics-collector/scripts/metrics_tidy /opt/puppetlabs/puppet-metrics-collector puppetserver 90
248-
```
249-
250-
251239
## Alternate Setup
252240

253241

@@ -268,84 +256,36 @@ The preferred method is via Hiera data.
268256
The following examples show you how to specify those parameters for different infrastructures, and assumes you declare this module on the Primary Master.
269257

270258

271-
#### Monolithic Infrastructure with Compile Masters
259+
#### Monolithic Infrastructure with Compilers
272260

273261
##### Hiera Data Example
274262

275263
```yaml
276264
puppet_metrics_collector::puppetserver_hosts:
277-
- 'master.example.com'
278-
- 'compile-master-1.example.com'
279-
- 'compile-master-2.example.com'
265+
- 'primary.example.com'
266+
- 'compiler-1.example.com'
267+
- 'compiler-2.example.com'
280268
puppet_metrics_collector::puppetdb_hosts:
281-
- 'master.example.com'
269+
- 'primary.example.com'
282270
```
283271
284272
##### Class Declaration Example
285273
286274
```puppet
287275
class { 'puppet_metrics_collector':
288276
puppetserver_hosts => [
289-
'master.example.com',
290-
'compile-master-1.example.com',
291-
'compile-master-2.example.com'
277+
'primary.example.com',
278+
'compiler-1.example.com',
279+
'compiler-2.example.com'
292280
],
293-
puppetdb_hosts => ['master.example.com'],
294-
}
295-
```
296-
297-
298-
#### Split Infrastructures without Compile Masters
299-
300-
##### Hiera Data Example
301-
302-
```yaml
303-
puppet_metrics_collector::puppetserver_hosts:
304-
- 'split-master.example.com'
305-
puppet_metrics_collector::puppetdb_hosts:
306-
- 'split-puppetdb.example.com'
307-
```
308-
309-
##### Class Declaration Example
310-
311-
```puppet
312-
class { 'puppet_metrics_collector':
313-
puppetserver_hosts => ['split-master.example.com'],
314-
puppetdb_hosts => ['split-puppetdb.example.com'],
315-
}
316-
```
317-
318-
319-
#### Split Infrastructure with Compile Masters
320-
321-
##### Hiera Data Example
322-
323-
```yaml
324-
puppet_metrics_collector::puppetserver_hosts:
325-
- 'split-master.example.com'
326-
- 'compile-master-1.example.com'
327-
- 'compile-master-2.example.com'
328-
puppet_metrics_collector::puppetdb_hosts:
329-
- 'split-puppetdb.example.com'
330-
```
331-
332-
##### Class Definition Example
333-
334-
```puppet
335-
class { 'puppet_metrics_collector':
336-
puppetserver_hosts => [
337-
'split-master.example.com',
338-
'compile-master-1.example.com',
339-
'compile-master-2.example.com'
340-
],
341-
puppetdb_hosts => ['split-puppetdb.example.com'],
281+
puppetdb_hosts => ['primary.example.com'],
342282
}
343283
```
344284

345285

346286
### Configuration for Distributed Metrics Collection
347287

348-
This option collect metrics on each PE Infrastructure Host instead of collecting metrics centrally on the Primary Master.
288+
This option collect metrics on each PE Infrastructure Host instead of collecting metrics centrally on the Primary Server.
349289
This option is discouraged, but allows for the collection of metrics when the Primary Master cannot access the API endpoints of the other PE Infrastructure Hosts.
350290
Classify each PE Infrastructure Host with this module, specifying the following parameters.
351291

@@ -378,4 +318,3 @@ class { 'puppet_metrics_collector':
378318

379319
If you are a PE user and need support using this module or are encountering issues, our Support team would be happy to help you resolve your issue and help reproduce any bugs. Just raise a ticket on the [support portal](https://support.puppet.com/hc/en-us/requests/new).
380320
If you have a reproducible bug or are a community user you can raise it directly on the Github issues page of the module [here](https://github.com/puppetlabs/puppetlabs-puppet_metrics_collector/issues). We also welcome PR contributions to improve the module. Please see further details about contributing [here](https://puppet.com/docs/puppet/7.5/contributing.html#contributing_changes_to_module_repositories).
381-

metadata.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
"operatingsystemrelease": [
4343
"18.04"
4444
]
45-
}
45+
},
46+
{
47+
"operatingsystem": "SLES",
48+
"operatingsystemrelease": [
49+
"12"
50+
]
51+
}
4652
],
4753
"requirements": [
4854
{

0 commit comments

Comments
 (0)