Skip to content
agent462 edited this page Apr 10, 2013 · 2 revisions

Advanced Configuration

Multiple Environments

~/.sensu/settings.rb

environment = ENV['MY_ENV']
if environment == "dev"
  host "127.0.0.1"
  port "4567"
  ssl  false
elsif environment == "prod"
  host "127.0.0.1"
  port "4567"
  ssl  false
end

in your ~/.profile or ~/.bash_rc

if [ "$1" ]; then
    export MY_ENV=$1
else
  export MY_ENV=dev
fi
alias prod='. ~/.profile prod'
alias dev='. ~/.profile dev'

Then all you have to do to switch environments is type "prod" or "dev"

Clone this wiki locally