Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maintenance metric #40

Open
moreiramarti opened this issue Jul 18, 2019 · 4 comments
Open

Add maintenance metric #40

moreiramarti opened this issue Jul 18, 2019 · 4 comments

Comments

@moreiramarti
Copy link

Hello,

I'm wondering if it's possible to get a metric for the _up page to check if a node is in maintenance mode ?

I haven't find it in the existing metrics.

Thanks,
Martinho MOREIRA

@gesellix
Copy link
Owner

That metric isn't available, yet. We only got a node_up metric as of #13.
Would you like to prepare a pull request?

@moreiramarti
Copy link
Author

Yeah if it's possible it will be great, to ensure that all nodes are up after a maintenance.

Thanks

@gesellix
Copy link
Owner

gesellix commented Jul 18, 2019

API docs: https://docs.couchdb.org/en/stable/api/server/common.html#get--_up

If maintenance_mode is true or nolb, the endpoint will return a 404 response.

Example response:

HTTP/1.1 200 OK
Cache-Control: must-revalidate
Content-Length: 16
Content-Type: application/json
Date: Sat, 17 Mar 2018 04:46:26 GMT
Server: CouchDB/2.2.0-f999071ec (Erlang OTP/19)
X-Couch-Request-ID: c57a3b2787
X-CouchDB-Body-Time: 0

{"status":"ok", "seeds":{}}

API docs for the maintenance_mode: https://docs.couchdb.org/en/stable/config/couchdb.html#couchdb/maintenance_mode
Use case for the maintenance mode: https://docs.couchdb.org/en/2.3.1/cluster/sharding.html

The "seeds" attribute in the health response relates to the new "inital nodes" feature as of CouchDB 2.3.0: apache/couchdb#1658 (release notes).

gesellix added a commit that referenced this issue Aug 5, 2019
Needs every public address for all nodes, which might be different from the internally known cluster node addresses.

Relates to #40
@gesellix
Copy link
Owner

gesellix commented Sep 4, 2019

So, I'm finally back to your suggestion. After looking into the api docs and at the current implementation of the exporter I have to note that this feature will need another config parameter, namely a list of all node addresses. I'll check in more detail whether this is really necessary, so please bear with me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants