Commit 5524922b authored by Marian Babik's avatar Marian Babik
Browse files

added web dir to store metric details

parent e47b2a30
...@@ -81,6 +81,7 @@ if [[ "${ETF_ALERTS_ENABLED}" -eq "1" ]] && [[ -f /etc/check_mk/notifications.mk ...@@ -81,6 +81,7 @@ if [[ "${ETF_ALERTS_ENABLED}" -eq "1" ]] && [[ -f /etc/check_mk/notifications.mk
sed -i "s/ETF_NAGIOS_HOST/${ETF_NAGIOS_HOST}/" /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/conf.d/wato/notifications.mk sed -i "s/ETF_NAGIOS_HOST/${ETF_NAGIOS_HOST}/" /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/conf.d/wato/notifications.mk
fi fi
touch /var/www/html/status_snapshot.json && chown etf.etf /var/www/html/status_snapshot.json touch /var/www/html/status_snapshot.json && chown etf.etf /var/www/html/status_snapshot.json
mkdir -p /var/www/html/etf-raw && chown etf.etf /var/www/html/etf-raw
echo "Configuring HT-Condor ..." echo "Configuring HT-Condor ..."
if [[ -f /usr/bin/condor_status ]]; then if [[ -f /usr/bin/condor_status ]]; then
......
...@@ -80,6 +80,18 @@ if [[ "${ETF_ALERTS_ENABLED}" -eq "1" ]] && [[ -f /etc/check_mk/notifications.mk ...@@ -80,6 +80,18 @@ if [[ "${ETF_ALERTS_ENABLED}" -eq "1" ]] && [[ -f /etc/check_mk/notifications.mk
sed -i "s/ETF_HOSTED_BY/${ETF_HOSTED_BY}/" /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/conf.d/wato/notifications.mk sed -i "s/ETF_HOSTED_BY/${ETF_HOSTED_BY}/" /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/conf.d/wato/notifications.mk
sed -i "s/ETF_NAGIOS_HOST/${ETF_NAGIOS_HOST}/" /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/conf.d/wato/notifications.mk sed -i "s/ETF_NAGIOS_HOST/${ETF_NAGIOS_HOST}/" /opt/omd/sites/${CHECK_MK_SITE}/etc/check_mk/conf.d/wato/notifications.mk
fi fi
touch /var/www/html/status_snapshot.json && chown etf.etf /var/www/html/status_snapshot.json
mkdir -p /var/www/html/etf-raw && chown etf.etf /var/www/html/etf-raw
echo "Configuring HT-Condor ..."
if [[ -f /usr/bin/condor_status ]]; then
/usr/bin/condor_status -schedd -af MyAddress -pool $(hostname) > /var/lib/condor/spool/.schedd_address
fi
if [[ ! -s /var/lib/condor/spool/.schedd_address ]]; then
echo "Schedd address file empty, waiting 5 seconds before restarting ..."
sleep 5
exit 1
fi
cp /etc/ncgx/templates/generic/handlers.cfg /opt/omd/sites/etf/etc/nagios/conf.d/ cp /etc/ncgx/templates/generic/handlers.cfg /opt/omd/sites/etf/etc/nagios/conf.d/
...@@ -97,11 +109,12 @@ echo "Configuring ETF ..." ...@@ -97,11 +109,12 @@ echo "Configuring ETF ..."
if [[ -z "${ETF_NAGIOS_HOST}" ]]; then if [[ -z "${ETF_NAGIOS_HOST}" ]]; then
echo " Variable ETF_NAGIOS_HOST is not defined, using hostname" echo " Variable ETF_NAGIOS_HOST is not defined, using hostname"
ETF_NAGIOS_HOST=`hostname` ETF_NAGIOS_HOST=`hostname`
grep -qF "${ETF_NAGIOS_HOST}" /etc/ncgx/ncgx.cfg || echo "NAGIOS_HOST = \"${ETF_NAGIOS_HOST}\"" >> /etc/ncgx/ncgx.cfg
else
grep -qF "${ETF_NAGIOS_HOST}" /etc/ncgx/ncgx.cfg || echo "NAGIOS_HOST = \"${ETF_NAGIOS_HOST}\"" >> /etc/ncgx/ncgx.cfg
fi fi
grep -qF "${ETF_NAGIOS_HOST}" /etc/ncgx/ncgx.cfg || echo "NAGIOS_HOST = \"${ETF_NAGIOS_HOST}\"" >> /etc/ncgx/ncgx.cfg
sed -i "s/ETF_NAGIOS_HOST/${ETF_NAGIOS_HOST}/" /etc/httpd/conf.d/welcome.conf
sed -i "s/ETF_NAGIOS_HOST/${ETF_NAGIOS_HOST}/" /var/www/html/index.html
su etf -c "ncgx --ipv6 --log | tee /opt/omd/sites/etf/var/log/ncgx.log" su etf -c "ncgx --ipv6 --log | tee /opt/omd/sites/etf/var/log/ncgx.log"
su - etf -c "cmk -II; cmk -O" su - etf -c "cmk -II; cmk -O"
if [[ "${NSTREAM_ENABLED}" -eq "1" ]] ; then if [[ "${NSTREAM_ENABLED}" -eq "1" ]] ; then
......
...@@ -93,6 +93,7 @@ metrics = { ...@@ -93,6 +93,7 @@ metrics = {
"--job-schedule" : 12, "--job-schedule" : 12,
"--env-file" : "/tmp/etf-env.sh", "--env-file" : "/tmp/etf-env.sh",
"--wnfm-config" : "/tmp/etf_wnfm.json", "--wnfm-config" : "/tmp/etf_wnfm.json",
"--web-dir" : "/var/www/html/etf-raw",
}, },
"docurl" : "https://etf.cern.ch/docs", "docurl" : "https://etf.cern.ch/docs",
"doc" : "https://etf.cern.ch/docs", "doc" : "https://etf.cern.ch/docs",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment