Code Monkey home page Code Monkey logo

gocbmgr's Introduction

GoDoc

This repository is unmaintained and part of Operator until 2.1. Please delete when it goes out of support. Note it was also used on legacy versions of Cloud, so see them first!

gocbmgr's People

Contributors

ashwin2002 avatar jamesl33 avatar lelvisl avatar mikewied avatar spjmurray avatar staticgc avatar tahmmee avatar tx0c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gocbmgr's Issues

panic on couch down

Example:

func getClusterStats(couch *cbmgr.Couchbase) {
	clstInf, err := couch.ClusterInfo()
	if err != nil {
		log.Printf("getClusterStats error:%s", err.Error())
	}
	if clstInf.Balanced {
		ClusterStats.WithLabelValues("balanced").Set(0)
	} else {
		ClusterStats.WithLabelValues("balanced").Set(1)
	}

if node down, we have panic on clstInf.Balanced (nil pointer dereference)

2018/03/15 19:52:21 [Get http://localhost:8091/pools/default/buckets/: dial tcp 127.0.0.1:8091: connect: connection refused]
2018/03/15 19:52:21 getClusterStats error:[Get http://localhost:8091/pools/default: dial tcp 127.0.0.1:8091: connect: connection refused]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x6b8e7d]

goroutine 9 [running]:
main.getClusterStats(0xc420096240)
        /Users/elvis/prog/go/src/github.com/lelvisl/couchbase_exporter/couchbase_stats.go:47 +0x5d
main.main.func1(0xc420096240)
        /Users/elvis/prog/go/src/github.com/lelvisl/couchbase_exporter/couchbase_exporter.go:56 +0x39
created by main.main
        /Users/elvis/prog/go/src/github.com/lelvisl/couchbase_exporter/couchbase_exporter.go:53 +0x227

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.