Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update monitoring.sh #2

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions src/main/resources/scripts/monitoring.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#!/bin/bash
#HOSTNAME=$(cat /etc/hostname)
#sed -i -e "s/HOSTNAMEMONITORING/$HOSTNAME/g" /etc/collectd/collectd.conf
#MONITORING_URL='172.22.28.70'
#sed -i -e "s/172.22.2.70/$MONITORING_URL/g" /etc/collectd/collectd.conf
#/etc/init.d/collectd restart
#HOSTNAME_MONITORING="HOSTNAMEMONITORING"
mkdir -p /opt/
echo export NUBOMEDIASTUNSERVERADDRESS=NUBOMEDIA_STUN_SERVER_ADDRESS > /opt/envvars
echo export NUBOMEDIASTUNSERVERPORT=3478 >> /opt/envvars
echo export NUBOMEDIATURNSERVERADDRESS=NUBOMEDIA_TURN_SERVER_ADDRESS >> /opt/envvars
echo export NUBOMEDIATURNSERVERPORT=3478 >> /opt/envvars
echo export NUBOMEDIAMONITORINGIP=NUBOMEDIA_MONITORING_IP >> /opt/envvars

cd /root/deploy && git pull origin master
mv /root/deploy/WebRtcEndpoint.conf.ini /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
mv /root/deploy/fix.sh /usr/local/bin/
mv /root/deploy/logstash-forwarder.conf /etc/logstash-forwarder.conf
mv /root/deploy/collectd.conf /etc/collectd/collectd.conf

# Update the configurations
bash /usr/local/bin/fix.sh
sed -i -e "s/HOSTNAMEMONITORING/$HOSTNAME/g" /etc/collectd/collectd.conf

service collectd restart
service collectd restart