Last active
September 14, 2016 23:37
-
-
Save agup006/8be4c2ab60e4869d7aa0be6bca04badc to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Get the OMS Agent for Linux | |
wget https://github.com/Microsoft/OMS-Agent-for-Linux/releases/download/OMSAgent_GA_v1.2.0-25/omsagent-1.2.0-25.universal.x64.sh -O /tmp/omsagent-1.2.0-25.universal.x64.sh | |
# Install and onboard the OMS Agent for Linux | |
sh /tmp/omsagent-1.2.0-25.universal.x64.sh --upgrade -w $1 -s $2 | |
# Get clean configuration | |
cp /etc/opt/microsoft/omsagent/sysconf/omsagent.conf /etc/opt/microsoft/omsagent/conf/omsagent.conf | |
# Get filter plugin | |
wget -O /opt/microsoft/omsagent/plugin/filter_hdinsight.rb http://anugup.blob.core.windows.net/oms/filter_hdinsight.rb | |
# Get HDInsight Manifest Reader | |
wget -O /opt/microsoft/omsagent/bin/hdinsightmanifestreader.rb http://anugup.blob.core.windows.net/oms/hdinsightmanifestreader.rb | |
# Enable omsagent to use HD Insight manifest reader | |
echo 'omsagent ALL=(ALL) NOPASSWD: /opt/microsoft/omsagent/bin/hdinsightmanifestreader.rb' >> /etc/sudoers.d/omsagent | |
# Get HDInsight FluentD Configuration | |
wget -O /etc/opt/microsoft/omsagent/conf/omsagent.d/hbase.workernode.conf https://raw.githubusercontent.com/duoxu/darfo/master/hbase.workernode.conf | |
wget -O /etc/opt/microsoft/omsagent/conf/omsagent.d/hbase.zookeeper.conf https://raw.githubusercontent.com/duoxu/darfo/master/hbase.zookeeper.conf | |
chmod +x /etc/opt/microsoft/omsagent/conf/omsagent.d/hbase.workernode.conf | |
chmod +x /etc/opt/microsoft/omsagent/conf/omsagent.d/hbase.zookeeper.conf | |
#restart OMS Agent for Linux service | |
sudo service omsagent restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment