Skip to content

Instantly share code, notes, and snippets.

@kleppy
Forked from artschwagerb/install_scollector.sh
Created December 13, 2016 15:49
Show Gist options
  • Select an option

  • Save kleppy/913c7dfffe9489c66d08a4762b3cc3d2 to your computer and use it in GitHub Desktop.

Select an option

Save kleppy/913c7dfffe9489c66d08a4762b3cc3d2 to your computer and use it in GitHub Desktop.
bosun scollector install
apt-get -y install git
wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.3.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=/home/linuxadmin/go
go get github.com/bosun-monitor/scollector
echo 'description "upstart job for scollector"
author "Brian Artschwager"
start on runlevel [2345]
stop on shutdown
respawn
respawn limit 1 5
script
export GOPATH="/home/linuxadmin/go/"
exec /usr/local/go/bin/go run /home/linuxadmin/go/src/github.com/bosun-monitor/scollector/main.go -h="bosun.htps.us:8070"
end script' >> /etc/init/scollector.conf
start scollector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment