This is an example of using MITM Proxy to inspect HTTPS traffic between services.
Install Python 3, then use Pip to install the latest MITM Proxy package:
pip3 install mitmproxyThis is an example of using MITM Proxy to inspect HTTPS traffic between services.
Install Python 3, then use Pip to install the latest MITM Proxy package:
pip3 install mitmproxyThis gist contains various scripts for scraping metrics. Mostly useful for processing the contents of Puppet Enterprise support bundles:
sar2influx.rb: A Ruby script that uses sadf to turn SAR archives into InfluxDB line format. For best results, run from a Linux VM using a recent operating system. Such as Ubuntu 22.04.pdb2influx.sh: A bash script that uses awk and mlr to extract command processing times from puppetdb.log files.top-api-calls.sh: Extracts the 10 most popular API calls from *-access.log along with their median and max duration grouped into 30 minute periods (Puppet $runinterval). Uses awk and mlr.| #!/bin/bash | |
| # Initialize a Puppet Intermediate Certificate Authority (CA) by generating | |
| # a RSA key and Certificate Signing Request using the OpenSSL CLI. | |
| # Fail if any subcommand fails. | |
| set -e | |
| # Ensure files created by this script are only accessible to the user | |
| # that ran the script. | |
| umask 0077 |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| set -e | |
| PUPPET_BIN='/opt/puppetlabs/puppet/bin' | |
| ca_cert=$("${PUPPET_BIN}/puppet" config print --section master cacert) | |
| ca_key=$("${PUPPET_BIN}/puppet" config print --section master cakey) | |
| ca_dir=$(dirname "${ca_cert}") |
| #!/bin/bash | |
| # ARGV[1]: hostname or IP address to test for postgresql connectivity. | |
| HOST="${1:?A hostname must be passed to this script}" | |
| cleanup() { | |
| printf '%s\n' "Closing TCP connection to ${HOST}." | |
| exec 3<&- | |
| exit | |
| } |
| #!/bin/bash | |
| # A reaper script that scans the PIDs of services belonging to the puppet-agent | |
| # package. When invoked with --check, the script exits non-zero if any such | |
| # PIDs are found and also executes `systemctl daemon-reload` if needed. When | |
| # invoked with --clean, the script kills any such PIDs and re-starts the | |
| # affected services. | |
| PUPPET_SERVICES=(puppet pxp-agent mcollective) | |
| PARENT=$PPID |
| #!/opt/puppetlabs/puppet/bin/ruby | |
| # This script executes the front end of a `puppet agent` run. Specifically it: | |
| # | |
| # - loads settings | |
| # - ensures a SSL certificate is presant | |
| # - syncs plugins | |
| # - retrieves a catalog | |
| require 'puppet' |
__ __ ______ _ __
/ / / /___ _ __ / ____/___ _ __(_)________ ____ ____ ___ ___ ____ / /______
/ /_/ / __ \ | /| / / / __/ / __ \ | / / / ___/ __ \/ __ \/ __ `__ \/ _ \/ __ \/ __/ ___/
/ __ / /_/ / |/ |/ / / /___/ / / / |/ / / / / /_/ / / / / / / / / / __/ / / / /_(__ )
/_/ /_/\____/|__/|__/ /_____/_/ /_/|___/_/_/ \____/_/ /_/_/ /_/ /_/\___/_/ /_/\__/____/
__ __ __
/ / / /___ _____ ____ ___ ____ / /
/ /_/ / __ `/ __ \/ __ \/ _ \/ __ \/ /
| #!/usr/bin/env ruby | |
| # Generate a DOT file showing links between ActiveMQ brokers using | |
| # a list of activemq.xml files passed as ARGV. | |
| require 'rexml/document' | |
| require 'erb' | |
| broker_map = Hash.new |