Example #1
0
//TestIfIsAlive test active if the database system is alive.
func (connector *Connector) TestIfIsAlive() bool {
	result := helper.RequestedReturnCodeIsOK(connector.httpClient, connector.connectionHost+"/ping", "GET")
	connector.isAlive = result
	connector.log.Infof("Is InfluxDB running: %t", result)
	config.PauseNagflux.Store(!result)
	return result
}
Example #2
0
//TestIfIsAlive test active if the database system is alive.
func (connector *Connector) TestIfIsAlive() bool {
	result := helper.RequestedReturnCodeIsOK(connector.httpClient, connector.connectionHost, "HEAD")
	connector.isAlive = result
	return result
}