sensu / sensu-dashboard

A dashboard for Sensu, for displaying & managing events & clients.
http://sensuapp.org
MIT License
96 stars 44 forks source link

Add dashboard config api section to override host/port #162

Closed mrichar1 closed 10 years ago

mrichar1 commented 10 years ago

By default, sensu dashboard takes the api host and port from the api configuration file.

If the dashboard and api are running on the same box, and you use a web proxy, then the api config will have 'host: localhost'. However, this will obviously break for the dashboard when run remotely.

This patch allows you to specify an explicit api host and port for the dashboard to connect to, e.g.:

{
  "dashboard": {
    "bind": "127.0.0.1",
    "port": 8080,
    "api": {
      "host": "api.web-proxy.example.com", 
      "port": 80
    }
  }
}

No change in previous behaviour should be expected if this api subsection isn't defined.

portertech commented 10 years ago

Seems reasonable. Going to merge this.