forked from voxpupuli/container-puppetserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- manage environment timeout - manage graphite exporter
- Loading branch information
Showing
5 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# | ||
if [ -n "$PUPPETSERVER_ENVIRONMENT_TIMEOUT" ]; then | ||
echo "Settings environment_timeout to ${PUPPETSERVER_ENVIRONMENT_TIMEOUT}" | ||
puppet config set --section master environment_timeout $PUPPETSERVER_ENVIRONMENT_TIMEOUT | ||
else | ||
echo "Removing environment_timeout" | ||
puppet config delete --section master environment_timeout | ||
fi | ||
|
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$PUPPETSERVER_GRAPHITE_EXPORTER_ENABLED" == "true" ]]; then | ||
if [ -n "$PUPPETSERVER_GRAPHITE_HOST" and -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 | ||
echo "ERROR: no PUPPETSERVER_GRAPHITE_HOST or PUPPETSERVER_GRAPHITE_PORT set." | ||
exit 99 | ||
fi | ||
fi | ||
|
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# settings related to metrics | ||
metrics: { | ||
# a server id that will be used as part of the namespace for metrics produced | ||
# by this server | ||
server-id: localhost | ||
registries: { | ||
puppetserver: { | ||
# specify metrics to allow in addition to those in the default list | ||
#metrics-allowed: ["compiler.compile.production"] | ||
|
||
reporters: { | ||
# enable or disable JMX metrics reporter | ||
jmx: { | ||
enabled: true | ||
} | ||
# enable or disable Graphite metrics reporter | ||
graphite: { | ||
enabled: true | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
# this section is used to configure settings for reporters that will send | ||
# the metrics to various destinations for external viewing | ||
reporters: { | ||
graphite: { | ||
# graphite host | ||
host: "GRAPHITE_HOST" | ||
# graphite metrics port | ||
port: GRAPHITE_PORT | ||
# how often to send metrics to graphite | ||
update-interval-seconds: 5 | ||
} | ||
} | ||
metrics-webservice: { | ||
jolokia: { | ||
# Enable or disable the Jolokia-based metrics/v2 endpoint. | ||
# Default is true. | ||
# enabled: false | ||
|
||
# Configure any of the settings listed at: | ||
# https://jolokia.org/reference/html/agents.html#war-agent-installation | ||
servlet-init-params: { | ||
# Specify a custom security policy: | ||
# https://jolokia.org/reference/html/security.html | ||
# policyLocation: "file:///etc/puppetlabs/puppetserver/jolokia-access.xml" | ||
} | ||
} | ||
} | ||
|
||
} |