Showing with 38 additions and 25 deletions.
  1. +37 −24 README.md
  2. +1 −1 metadata.json
61 changes: 37 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Table of Contents
* [Split Install ( Running on the Master )](#split-install--running-on-the-master-)
* [Monolithic With Compile Masters ( Running on the MoM )](#monolithic-with-compile-masters--running-on-the-mom-)
* [Split With Compile Masters ( Running on the MoM )](#split-with-compile-masters--running-on-the-mom-)
* [Running on PE 3\.8](#running-on-pe-38)
* [Other Option](#other-option)
* [What do you get](#what-do-you-get)
* [Grepping for Metrics](#grepping-for-metrics)
Expand Down Expand Up @@ -52,6 +53,18 @@ git clone https://github.com/npwalker/pe_metric_curl_cron_jobs;
puppet apply -e "class { 'pe_metric_curl_cron_jobs' : puppetdb_hosts => ['split-puppetdb.domain.com'], puppet_server_hosts => ['compile-master-1.domain.com', 'compile-master-2.domain.com'] }" --modulepath .
```

## Running on PE 3.8

You can still use this module on PE 3.8 although you have to run it with the future parser and you want to use `/opt/puppet` instead of `/opt/puppetlabs`.

```
cd /tmp;
git clone https://github.com/npwalker/pe_metric_curl_cron_jobs;
puppet apply -e "class { 'pe_metric_curl_cron_jobs' : output_dir => '/opt/puppet/pe_metric_curl_cron_jobs' }" --modulepath . --parser=future
```

Refer to the other examples if you want to change other parameters.

## Other Option

This option puts metrics on each individual node so I don't think it's as good as having centrally gathered metrics but you can also install the module on each individual node. If you install on a compile master you can set `puppetdb_metrics_ensure` to `absent` and if you install on a puppetdb node then you can set `$puppet_server_metrics_ensure` to `absent`.
Expand All @@ -65,13 +78,13 @@ A new directory `/opt/puppetlabs/pe_metric_curl_cron_jobs` that looks like:
```
/opt/puppetlabs/pe_metric_curl_cron_jobs/
├── puppetdb
│   ├── localhost-08_16_16_23:40.json
│   └── localhost-08_16_16_23:45.json
│   └── localhost-08_16_16_23:50.json
│   ├── 127.0.0.1-08_16_16_23:40.json
│   └── 127.0.0.1-08_16_16_23:45.json
│   └── 127.0.0.1-08_16_16_23:50.json
├── puppet_server
│   ├── localhost-08_16_16_23:40.json
│   ├── localhost-08_16_16_23:45.json
│   ├── localhost-08_16_16_23:50.json
│   ├── 127.0.0.1-08_16_16_23:40.json
│   ├── 127.0.0.1-08_16_16_23:45.json
│   ├── 127.0.0.1-08_16_16_23:50.json
└── scripts
├── puppetdb_metrics.sh
└── puppet_server_metrics.sh
Expand All @@ -97,45 +110,45 @@ crontab -l
You can get useful information with a grep like the one below run from inside of the directory containing the metrics files.

```
grep <metric_name> localhost-*
grep <metric_name> 127.0.0.1-*
```

### Puppetserver

Example output:

```
grep average-free-jrubies localhost-*
localhost-08_15_16_10:55.json: "average-free-jrubies": 3.6687597774999556,
localhost-08_15_16_11:00.json: "average-free-jrubies": 4.4209186472147248,
localhost-08_15_16_11:05.json: "average-free-jrubies": 3.610399319630555,
localhost-08_15_16_11:10.json: "average-free-jrubies": 4.9845629308522383,
grep average-free-jrubies 127.0.0.1-*
127.0.0.1-08_15_16_10:55.json: "average-free-jrubies": 3.6687597774999556,
127.0.0.1-08_15_16_11:00.json: "average-free-jrubies": 4.4209186472147248,
127.0.0.1-08_15_16_11:05.json: "average-free-jrubies": 3.610399319630555,
127.0.0.1-08_15_16_11:10.json: "average-free-jrubies": 4.9845629308522383,
```

### PuppetDB

Example output:

```
grep QueueSize localhost-*
localhost-08_16_16_23:40.json: "QueueSize" : 0,
localhost-08_16_16_23:45.json: "QueueSize" : 0,
grep QueueSize 127.0.0.1-*
127.0.0.1-08_16_16_23:40.json: "QueueSize" : 0,
127.0.0.1-08_16_16_23:45.json: "QueueSize" : 0,
```

```
grep CursorMemoryUsage localhost-*
localhost-08_16_16_23:40.json: "CursorMemoryUsage" : 0,
localhost-08_16_16_23:45.json: "CursorMemoryUsage" : 0,
grep CursorMemoryUsage 127.0.0.1-*
127.0.0.1-08_16_16_23:40.json: "CursorMemoryUsage" : 0,
127.0.0.1-08_16_16_23:45.json: "CursorMemoryUsage" : 0,
```

```
grep CursorFull localhost-*
localhost-08_16_16_23:40.json: "CursorFull" : false,
localhost-08_16_16_23:45.json: "CursorFull" : false,
grep CursorFull 127.0.0.1-*
127.0.0.1-08_16_16_23:40.json: "CursorFull" : false,
127.0.0.1-08_16_16_23:45.json: "CursorFull" : false,
```

```
grep CursorPercentUsage localhost-*
localhost-08_16_16_23:40.json: "CursorPercentUsage" : 0,
localhost-08_16_16_23:45.json: "CursorPercentUsage" : 0,
grep CursorPercentUsage 127.0.0.1-*
127.0.0.1-08_16_16_23:40.json: "CursorPercentUsage" : 0,
127.0.0.1-08_16_16_23:45.json: "CursorPercentUsage" : 0,
```
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npwalker/pe_metric_curl_cron_jobs",
"version": "1.0.2",
"version": "1.0.3",
"author": "npwalker",
"summary": "A Module for setting up cron jobs to curl metrics from PE components",
"license": "Apache-2.0",
Expand Down