Add mutual TLS support to prometheus_client output plugin
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
This commit is contained in:
17
plugins/outputs/prometheus_client/scripts/generate_certs.sh
Executable file
17
plugins/outputs/prometheus_client/scripts/generate_certs.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
scripts_dir=$(cd $(dirname $0) && pwd)
|
||||
|
||||
mkdir -p ${scripts_dir}/../assets
|
||||
assets_dir=$(cd ${scripts_dir}/../assets && pwd)
|
||||
|
||||
echo "Generating certs into ${assets_dir}"
|
||||
|
||||
test ! `which certstrap` && go get -u -v github.com/square/certstrap
|
||||
|
||||
rm -f ${assets_dir}/*
|
||||
|
||||
# CA to distribute to loggregator certs
|
||||
certstrap --depot-path ${assets_dir} init --passphrase '' --common-name telegrafCA --expires "25 years"
|
||||
certstrap --depot-path ${assets_dir} request-cert --passphrase '' --common-name telegraf
|
||||
certstrap --depot-path ${assets_dir} sign telegraf --CA telegrafCA --expires "25 years"
|
||||
Reference in New Issue
Block a user