Skip to content

Commit 5fa5367

Browse files
author
Jarret Lavallee
committed
Use the hostname instead of IP in the readme
Prior to this commit, the documentation stil specified `127.0.0.1` in the examples. In a previous commit, this was changed to the FQDN of the master and this commit updates the readme to use an example FQDN.
1 parent 8e593ad commit 5fa5367

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This module collects metrics provided by the status endpoints of Puppet Enterpri
2929

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

32-
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.
32+
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. Below is an example when using the `site.pp`.
3333

3434
```
3535
node 'master.example.com' {
@@ -48,7 +48,7 @@ node 'master.example.com' {
4848
node 'compilerA.example.com', 'compilerB.example.com,' {
4949
include puppet_metrics_collector::system
5050
}
51-
```
51+
```
5252

5353
### Configuration
5454

@@ -112,14 +112,14 @@ The metrics come in a JSON hash on one line. In order to convert the metric file
112112

113113
```bash
114114
cd /opt/puppetlabs/puppet-metrics-collector
115-
for i in <service_name>/127.0.0.1/*.json; do echo "$(python -m json.tool < $i)" > $i; done
115+
for i in <service_name>/master.example.com/*.json; do echo "$(python -m json.tool < $i)" > $i; done
116116
```
117117

118118
You can search for useful information by performing a `grep` in the following format, run from inside the directory containing the metrics.
119119

120120
```
121121
cd /opt/puppetlabs/puppet-metrics-collector
122-
grep <metric_name> <service_name>/127.0.0.1/*.json
122+
grep <metric_name> <service_name>/master.example.com/*.json
123123
```
124124

125125
Since the metrics are compressed every night, you can only search metrics for the current day. To search older metrics, decompress the compressed files into a subdirectory of `/tmp` and run from inside that directory.
@@ -130,36 +130,36 @@ Since the metrics are compressed every night, you can only search metrics for th
130130
Example:
131131

132132
```
133-
grep average-free-jrubies puppetserver/127.0.0.1/*.json
134-
puppetserver/127.0.0.1/20170404T170501Z.json: "average-free-jrubies": 0.9950009285369501,
135-
puppetserver/127.0.0.1/20170404T171001Z.json: "average-free-jrubies": 0.9999444653324225,
136-
puppetserver/127.0.0.1/20170404T171502Z.json: "average-free-jrubies": 0.9999993830655706,
133+
grep average-free-jrubies puppetserver/master.example.com/*.json
134+
puppetserver/master.example.com/20170404T170501Z.json: "average-free-jrubies": 0.9950009285369501,
135+
puppetserver/master.example.com/20170404T171001Z.json: "average-free-jrubies": 0.9999444653324225,
136+
puppetserver/master.example.com/20170404T171502Z.json: "average-free-jrubies": 0.9999993830655706,
137137
```
138138

139139
#### Grepping PuppetDB Metrics
140140

141141
Example:
142142

143143
```
144-
grep queue_depth puppetdb/127.0.0.1/*.json
145-
puppetdb/127.0.0.1/20170404T170501Z.json: "queue_depth": 0,
146-
puppetdb/127.0.0.1/20170404T171001Z.json: "queue_depth": 0,
147-
puppetdb/127.0.0.1/20170404T171502Z.json: "queue_depth": 0,
144+
grep queue_depth puppetdb/master.example.com/*.json
145+
puppetdb/master.example.com/20170404T170501Z.json: "queue_depth": 0,
146+
puppetdb/master.example.com/20170404T171001Z.json: "queue_depth": 0,
147+
puppetdb/master.example.com/20170404T171502Z.json: "queue_depth": 0,
148148
```
149149

150150
Example for PE 2016.5 and older:
151151

152152
```
153-
grep Cursor puppetdb/127.0.0.1/*.json
154-
puppetdb/127.0.0.1/20170404T171001Z.json: "CursorMemoryUsage": 0,
155-
puppetdb/127.0.0.1/20170404T171001Z.json: "CursorFull": false,
156-
puppetdb/127.0.0.1/20170404T171001Z.json: "CursorPercentUsage": 0,
157-
puppetdb/127.0.0.1/20170404T171502Z.json: "CursorMemoryUsage": 0,
158-
puppetdb/127.0.0.1/20170404T171502Z.json: "CursorFull": false,
159-
puppetdb/127.0.0.1/20170404T171502Z.json: "CursorPercentUsage": 0,
160-
puppetdb/127.0.0.1/20170404T172002Z.json: "CursorMemoryUsage": 0,
161-
puppetdb/127.0.0.1/20170404T172002Z.json: "CursorFull": false,
162-
puppetdb/127.0.0.1/20170404T172002Z.json: "CursorPercentUsage": 0,
153+
grep Cursor puppetdb/master.example.com/*.json
154+
puppetdb/master.example.com/20170404T171001Z.json: "CursorMemoryUsage": 0,
155+
puppetdb/master.example.com/20170404T171001Z.json: "CursorFull": false,
156+
puppetdb/master.example.com/20170404T171001Z.json: "CursorPercentUsage": 0,
157+
puppetdb/master.example.com/20170404T171502Z.json: "CursorMemoryUsage": 0,
158+
puppetdb/master.example.com/20170404T171502Z.json: "CursorFull": false,
159+
puppetdb/master.example.com/20170404T171502Z.json: "CursorPercentUsage": 0,
160+
puppetdb/master.example.com/20170404T172002Z.json: "CursorMemoryUsage": 0,
161+
puppetdb/master.example.com/20170404T172002Z.json: "CursorFull": false,
162+
puppetdb/master.example.com/20170404T172002Z.json: "CursorPercentUsage": 0,
163163
```
164164

165165

@@ -191,14 +191,14 @@ Example:
191191

192192
```
193193
/opt/puppetlabs/puppet-metrics-collector/puppetserver
194-
├── 127.0.0.1
194+
├── master.example.com
195195
│   ├── 20170404T020001Z.json
196196
│   ├── ...
197197
│ ├── 20170404T170501Z.json
198198
│ └── 20170404T171001Z.json
199199
└── puppetserver-2017.04.04.02.00.01.tar.bz2
200200
/opt/puppetlabs/puppet-metrics-collector/puppetdb
201-
└── 127.0.0.1
201+
└── master.example.com
202202
│ ├── 20170404T020001Z.json
203203
│ ├── ...
204204
│ ├── 20170404T170501Z.json
@@ -336,13 +336,13 @@ If the future parser is enabled, globally or in the environment, the following c
336336

337337
```
338338
class { 'puppet_metrics_collector':
339-
output_dir => '/opt/puppet/puppet_metrics_collector'
339+
output_dir => '/opt/puppet/puppet-metrics-collector'
340340
}
341341
```
342342

343343
Otherwise, use the following commands.
344344

345345
```
346346
puppet module install puppetlabs-puppet_metrics_collector --modulepath /tmp;
347-
puppet apply -e "class { 'puppet_metrics_collector' : output_dir => '/opt/puppet/puppet_metrics_collector' }" --modulepath /tmp --parser=future
347+
puppet apply -e "class { 'puppet_metrics_collector' : output_dir => '/opt/puppet/puppet-metrics-collector' }" --modulepath /tmp --parser=future
348348
```

0 commit comments

Comments
 (0)