StackState-CouchDB Integration

Overview

Capture CouchDB data in StackState to:

  • Visualize key CouchDB metrics.
  • Correlate CouchDB performance with the rest of your applications.

Setup

Installation

This check is packaged with the Agent, so simply install the agent.

Configuration

To capture CouchDB metrics you need to install the StackState Agent.

  1. Configure the Agent to connect to CouchDB, edit conf.d/couch.yaml

    init_config:
    
    instances:
        - server: http://localhost:5984
    

  2. Restart the Agent

Validation

Execute the info command and verify that the integration check has passed. The output of the command should contain a section similar to the following:

Checks
======

  [...]

  couch
  -----
      - instance #0 [OK]
      - Collected 8 metrics & 0 events

Data Collected

Metrics

couchdb.by_db.disk_size
(gauge)
Disk size per database
shown as byte
couchdb.by_db.doc_count
(gauge)
Document count per database
shown as document
couchdb.httpd.requests
(gauge)
Number of HTTP requests
shown as request
couchdb.httpd.view_reads
(gauge)
Number of view reads
shown as read
couchdb.couchdb.auth_cache_hits
(gauge)
Number of authentication cache hits
shown as hit
couchdb.couchdb.auth_cache_misses
(gauge)
Number of authentication cache misses
shown as miss
couchdb.couchdb.database_reads
(gauge)
Number of times a document was read from a database
shown as read
couchdb.couchdb.database_writes
(gauge)
Number of times a document was changed
shown as write
couchdb.couchdb.open_databases
(gauge)
Number of open databases
shown as item
couchdb.couchdb.open_os_files
(gauge)
Number of file descriptors CouchDB has open
shown as file
couchdb.couchdb.request_time
(gauge)
Length of a request inside CouchDB without MochiWeb
shown as second
couchdb.httpd.bulk_requests
(gauge)
Number of bulk requests
shown as request
couchdb.httpd.clients_requesting_changes
(gauge)
Number of clients requesting a change
shown as connection
couchdb.httpd_request_methods.DELETE
(gauge)
Number of HTTP DELETE requests
shown as request
couchdb.httpd_request_methods.GET
(gauge)
Number of HTTP GET requests
shown as request
couchdb.httpd_request_methods.HEAD
(gauge)
Number of HTTP HEAD requests
shown as request
couchdb.httpd_request_methods.POST
(gauge)
Number of HTTP POST requests
shown as request
couchdb.httpd_request_methods.PUT
(gauge)
Number of HTTP PUT requests
shown as request
couchdb.httpd_status_codes.200
(gauge)
Number of HTTP 200 OK responses
shown as request
couchdb.httpd_status_codes.201
(gauge)
Number of HTTP 201 Created responses
shown as request
couchdb.httpd_status_codes.202
(gauge)
Number of HTTP 202 Accepted responses
shown as request
couchdb.httpd_status_codes.301
(gauge)
Number of HTTP 301 Moved Permanently responses
shown as request
couchdb.httpd_status_codes.304
(gauge)
Number of HTTP 304 Not Modified responses
shown as request
couchdb.httpd_status_codes.400
(gauge)
Number of HTTP 400 Bad Request responses
shown as request
couchdb.httpd_status_codes.401
(gauge)
Number of HTTP 401 Unauthorized responses
shown as request
couchdb.httpd_status_codes.403
(gauge)
Number of HTTP 403 Forbidden responses
shown as request
couchdb.httpd_status_codes.404
(gauge)
Number of HTTP 404 Not Found responses
shown as request
couchdb.httpd_status_codes.405
(gauge)
Number of HTTP 405 Method Not Allowed responses
shown as request
couchdb.httpd_status_codes.409
(gauge)
Number of HTTP 409 Conflict responses
shown as request
couchdb.httpd_status_codes.412
(gauge)
Number of HTTP 412 Precondition Failed responses
shown as request
couchdb.httpd_status_codes.500
(gauge)
Number of HTTP 500 Internal Server Error responses
shown as request

Service Checks

couchdb.can_connect:

Returns Critical if the Agent cannot connect to CouchDB to collect metrics.