updated integration of agent
This commit is contained in:
parent
c677a02fde
commit
588fe344f1
6 changed files with 121 additions and 13 deletions
20
files/generate-config.sh
Normal file
20
files/generate-config.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
tmpfile=`mktemp`
|
||||
|
||||
(
|
||||
|
||||
cat /etc/prometheus/conf.d/*.conf
|
||||
echo "alerting:"
|
||||
echo " alertmanagers:"
|
||||
(cat /etc/prometheus/conf.d/alerting/*.conf 2> /dev/null | sed "s/^/ /") || echo ""
|
||||
|
||||
echo "scrape_configs:"
|
||||
cat /etc/prometheus/conf.d/scrape_configs/*.conf
|
||||
|
||||
) > $tmpfile
|
||||
|
||||
chmod 0644 $tmpfile
|
||||
mv $tmpfile /etc/prometheus/prometheus.yml
|
||||
/usr/bin/systemctl reload prometheus
|
||||
Loading…
Add table
Add a link
Reference in a new issue