Skip to content

Commit

Permalink
Merge pull request #54 from tuxmea/fix_metrics
Browse files Browse the repository at this point in the history
fix variable check on enable graphite
  • Loading branch information
tuxmea authored Jan 30, 2024
2 parents 9beecc3 + b3b8513 commit 3d2281e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion puppetserver/docker-entrypoint.d/84-enable_graphite.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ "$PUPPETSERVER_GRAPHITE_EXPORTER_ENABLED" == "true" ]]; then
if [ -n "$PUPPETSERVER_GRAPHITE_HOST" and -n "$PUPPETSERVER_GRAPHITE_PORT" ]; then
if [[ -n "$PUPPETSERVER_GRAPHITE_HOST" && -n "$PUPPETSERVER_GRAPHITE_PORT" ]]; then
echo "Enabling graphite exporter"
sed -e "s/GRAPHITE_HOST/$PUPPETSERVER_GRAPHITE_HOST/" -e "s/GRAPHITE_PORT/$PUPPETSERVER_GRAPHITE_PORT/" /metrics.conf.tmpl > /etc/puppetlabs/puppetserver/conf.d/metrics.conf
else
Expand Down

0 comments on commit 3d2281e

Please sign in to comment.