Skip to content

Commit

Permalink
Added failback to localhost on connect, and displaying the hostname i…
Browse files Browse the repository at this point in the history
…n the UI
  • Loading branch information
chrusty committed Mar 14, 2015
1 parent 70b5bec commit a4ff071
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion display.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func drawBorder(width int, height int) {

// Title:
printTb(1, 0, termbox.ColorBlue|termbox.AttrBold, defaultBackGroundColour, " C-top ")
printTb(8, 0, termbox.ColorBlue, defaultBackGroundColour, "(top for Cassandra) ")
printTb(8, 0, termbox.ColorBlue, defaultBackGroundColour, "(top for Cassandra) connected to ")
printTb(41, 0, termbox.ColorBlue|termbox.AttrBold, defaultBackGroundColour, cassandraHost)

// Menu:
// Positions: 2 15 28 42 58 76 94 105 113
Expand Down
4 changes: 2 additions & 2 deletions metricscollectormx4j.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ var (
)

// Checks the connection to MX4J:
func checkConnection(cassandraIP string) error {
func checkConnection(cassandraAddress string) error {
// Request the root URL:
URL := fmt.Sprintf("http://%s:%s/", cassandraHost, MX4JPort)
URL := fmt.Sprintf("http://%s:%s/", cassandraAddress, MX4JPort)

_, err := http.Get(URL)
return err
Expand Down

0 comments on commit a4ff071

Please sign in to comment.