Last active
August 14, 2019 18:47
-
-
Save merps/e023e22a7b5a595a35e6d3d8e5e5a000 to your computer and use it in GitHub Desktop.
Revisions
-
merps revised this gist
Aug 14, 2019 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ touch ./{prometheus,bigip}.yml ## Step 4: Configure statsd _`~/.statsd/config.js`_ ``` { port: 8125, @@ -53,15 +53,15 @@ _`~./statsd/config.js`_ ``` ## Step 5: Configure statsd-exporter _`~/.statsd-exporter/bigip-mappings.yaml`_ ``` mappings: - match: "f5telemetry.*.system.*" name: "f5system" ``` ## Step 6: Configure prometheus _`~/.prometheus/prometheus.yaml`_ ``` # Global config global: @@ -99,7 +99,7 @@ docker run -e GRAPHITE_HOST=127.0.0.1 -e STATSD_DUMP_MSG=true \ docker run --name=prom-statsd-exporter \ -p 9123:9102 \ -p 8125:8105/udp \ -v ~/.statsd-exporter/bigip-mappings.yaml:/tmp/bigip-mappings.yaml \ prom/statsd-exporter \ --statsd.mapping-config=/tmp/bigip-mappings.yaml \ --statsd.listen-udp=:8105 \ @@ -111,7 +111,7 @@ docker run --name=prom-statsd-exporter \ ``` docker run --name=prometheus \ -p 9090:9090 \ -v ~/.prometheus/prometheus.yaml:/prometheus.yaml \ prom/prometheus \ --config.file=/prometheus.yml \ --log.level=debug \ -
merps revised this gist
Aug 14, 2019 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ mkdir ~/.statsd && cd $_ touch ./config.js mkdir ~/.statsd-exporter && cd $_ touch ./bigip-mappings.yaml mkdir ~/.prometheus && cd $_ touch ./{prometheus,bigip}.yml @@ -53,15 +53,15 @@ _`~./statsd/config.js`_ ``` ## Step 5: Configure statsd-exporter _`~./statsd-exporter/bigip-mappings.yaml`_ ``` mappings: - match: "f5telemetry.*.system.*" name: "f5system" ``` ## Step 6: Configure prometheus _`~./prometheus/prometheus.yaml`_ ``` # Global config global: @@ -99,9 +99,9 @@ docker run -e GRAPHITE_HOST=127.0.0.1 -e STATSD_DUMP_MSG=true \ docker run --name=prom-statsd-exporter \ -p 9123:9102 \ -p 8125:8105/udp \ -v ~./statsd-exporter/bigip-mappings.yaml:/tmp/bigip-mappings.yaml \ prom/statsd-exporter \ --statsd.mapping-config=/tmp/bigip-mappings.yaml \ --statsd.listen-udp=:8105 \ --web.listen-address=:9102 ``` @@ -111,7 +111,7 @@ docker run --name=prom-statsd-exporter \ ``` docker run --name=prometheus \ -p 9090:9090 \ -v ~.prometheus/prometheus.yaml:/prometheus.yaml \ prom/prometheus \ --config.file=/prometheus.yml \ --log.level=debug \ -
merps revised this gist
Aug 14, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,6 +42,7 @@ touch ./{prometheus,bigip}.yml ## Step 4: Configure statsd _`~./statsd/config.js`_ ``` { port: 8125, -
merps revised this gist
Aug 14, 2019 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,13 +25,11 @@ sudo yum -y -q install docker sudo docker pull prom/prometheus sudo docker pull statsd/statsd sudo docker pull prom/statsd-exporter ``` ## Step 4: Create Paths/files ``` mkdir ~/.statsd && cd $_ touch ./config.js @@ -40,7 +38,6 @@ touch ./bigip.yaml mkdir ~/.prometheus && cd $_ touch ./{prometheus,bigip}.yml ``` ## Step 4: Configure statsd @@ -94,7 +91,6 @@ scrape_configs: docker run -e GRAPHITE_HOST=127.0.0.1 -e STATSD_DUMP_MSG=true \ -v ~/.statsd/config.js:config.js -p 8125:8125/udp -p 8126:8126/tcp -d statsd/statsd ``` ## Step 8: Start statsd-exporter: -
merps created this gist
Aug 14, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,123 @@ # F5 Telemetry cheat sheet for Red Hat/CentOS 7.x Brain dump of a `as-built` home-lab for CentOS 7.x and docker v1.12 ## Step 1: Prep for RH/CentOS 7.x ``` sudo yum -y -q update sudo yum -y -q install epel-release ``` Enable any kernel updates: ``reboot`` ## Step 2: Install docker ``` sudo yum -y -q install docker ``` ## Step 3: Pull Docker Images: ``` sudo docker pull prom/prometheus sudo docker pull statsd/statsd sudo docker pull prom/statsd-exporter ``` ## Step 4: Create Paths/files ``` mkdir ~/.statsd && cd $_ touch ./config.js mkdir ~/.statsd-exporter && cd $_ touch ./bigip.yaml mkdir ~/.prometheus && cd $_ touch ./{prometheus,bigip}.yml ``` ## Step 4: Configure statsd ``` { port: 8125, mgmt_port: 8126, backends: [ "./backends/console", "./backends/repeater" ], repeater: [ { host: '<docker-host-ip>', port: 8105 } ] } ``` ## Step 5: Configure statsd-exporter ``` mappings: - match: "f5telemetry.*.system.*" name: "f5system" ``` ## Step 6: Configure prometheus ``` # Global config global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. scrape_timeout: 15s # scrape_timeout is set to the global default (10s). # A scrape configuration containing exactly one endpoint to scrape:# Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. - job_name: 'prometheus' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9090'] - job_name: 'f5-ts-example' static_configs: - targets: ['<docker-host-ip>:9102'] ``` ## Step 7: Start statsd: ``` docker run -e GRAPHITE_HOST=127.0.0.1 -e STATSD_DUMP_MSG=true \ -v ~/.statsd/config.js:config.js -p 8125:8125/udp -p 8126:8126/tcp -d statsd/statsd ``` ## Step 8: Start statsd-exporter: ``` docker run --name=prom-statsd-exporter \ -p 9123:9102 \ -p 8125:8105/udp \ -v ~./statsd-exporter/bigip.yml:/tmp/bigip.yml \ prom/statsd-exporter \ --statsd.mapping-config=/tmp/bigip.yml \ --statsd.listen-udp=:8105 \ --web.listen-address=:9102 ``` ## Step 9: Start prometheus: ``` docker run --name=prometheus \ -p 9090:9090 \ -v ~.prometheus/prometheus.yml:/prometheus.yml \ prom/prometheus \ --config.file=/prometheus.yml \ --log.level=debug \ --web.listen-address=:9090 \ --web.page-title='Prometheus - BIGIP TS' ```