Monitoring CouchDB

This article will help you get the Couchdb plugin for sd-agent configured and returning metrics

Installing the couchdb plugin package

Install the couchdb plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-couchdb

Install the couchdb plugin on RHEL/CentOS:

sudo yum install sd-agent-couchdb

Read more about agent plugins.

Configuring the agent to monitor Apache CouchDB

1. Configure /etc/sd-agent/conf.d/couch.yaml

init_config:

instances:
- server: http://localhost:5984
  • If your DB requires additional authentication, you wish to specify a timeout or fine tune other details, amend the config file as necessary.

2. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

couchdb
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check couch

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the couchdb metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

Metric Values
couchdb.couchdb.auth_cache_hits

Number of authentication cache hits
hit / None
Type: float
couchdb.couchdb.auth_cache_misses

Number of authentication cache misses
miss / None
Type: float
couchdb.couchdb.database_reads

Number of times a document was read from a database
read / None
Type: float
couchdb.couchdb.database_writes

Number of times a document was changed
write / None
Type: float
couchdb.httpd.bulk_requests

Number of bulk requests
request / None
Type: float
couchdb.httpd.clients_requesting_changes

Number of clients requesting a change
connection / None
Type: float
couchdb.httpd.view_reads

Number of view reads
read / None
Type: float
couchdb.httpd_request_methods.DELETE

Number of HTTP DELETE requests
request / None
Type: float
couchdb.httpd_request_methods.HEAD

Number of HTTP HEAD requests
request / None
Type: float
couchdb.httpd_request_methods.POST

Number of HTTP POST requests
request / None
Type: float
couchdb.httpd_status_codes.201

Number of HTTP 201 Created responses
request / None
Type: float
couchdb.httpd_status_codes.202

Number of HTTP 202 Accepted responses
request / None
Type: float
couchdb.httpd_status_codes.301

Number of HTTP 301 Moved Permanently responses
request / None
Type: float
couchdb.httpd_status_codes.304

Number of HTTP 304 Not Modified responses
request / None
Type: float
couchdb.httpd_status_codes.400

Number of HTTP 400 Bad Request responses
request / None
Type: float
couchdb.httpd_status_codes.401

Number of HTTP 401 Unauthorized responses
request / None
Type: float
couchdb.httpd_status_codes.403

Number of HTTP 403 Forbidden responses
request / None
Type: float
couchdb.httpd_status_codes.404

Number of HTTP 404 Not Found responses
request / None
Type: float
couchdb.httpd_status_codes.405

Number of HTTP 405 Method Not Allowed responses
request / None
Type: float
couchdb.httpd_status_codes.409

Number of HTTP 409 Conflict responses
request / None
Type: float
couchdb.httpd_status_codes.412

Number of HTTP 412 Precondition Failed responses
request / None
Type: float
couchdb.httpd_status_codes.500

Number of HTTP 500 Internal Server Error responses
request / None
Type: float

Metrics Conversion

Please refer to the metrics conversion document to map old metrics names to the new metric names.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.