Last active
August 29, 2015 14:07
-
-
Save megastef/80f6d34d02da92567d9c to your computer and use it in GitHub Desktop.
Configure CRATE.io for Sematext SPM (debian)
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
# SET ENV for INSTALLATION PARAMETERS | |
# Set your generated API Key from SPM Application web UI https://apps.sematext.com/users-web/register.do | |
# stop Crate before | |
export SPM_API_KEY="4feb144c-4da8-4081-XXXX-XXXX" | |
# adapt to your CRATE install dir and port | |
export CRATE_HOME="~/crate-0.44.6" | |
export CRATE_PORT="4200" | |
# SPM AGENT INSTALLATION | |
echo "deb http://pub-repo.sematext.com/debian sematext main" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install spm-client | |
bash /opt/spm/bin/spm-client-setup-conf.sh ${SPM_API_KEY} es javaagent | |
# Replace default 9200 with CRATE default CRATE_PORT (default 4200) | |
sed -i s/localhost\:9200/localhost\:${CRATE_PORT}/g /opt/spm/spm-monitor/conf/spm-monitor-config-${SPM_API_KEY}-default.properties | |
# It might be useful to add this line to Crate startup script as well (!) | |
export CRATE_JAVA_OPTS="-Dcom.sun.management.jmxremote -javaagent:/opt/spm/spm-monitor/lib/spm-monitor-es.jar=${SPM_API_KEY}::default" | |
sed -i s/\#\ es.api.enabled\:\ false/es.api.enabled\:\ true/g $CRATE_HOME/config/crate.yml | |
# run Crate | |
$CRATE_HOME/bin/crate -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment