Monitor Apache CouchDB for Availability and Performance

Are you using Apache CouchDB in your application? You can use IDERA Uptime Cloud Monitor to monitor your Apache CouchDB for availability and performance. As an illustration, you can configure and receive alerts for the following scenarios:

  • Performance: alert if the Apache CouchDB performance is poor.
    • If the request_time value is significantly above its normal range, that would imply that the Apache CouchDB server is under heavy load.


Uptime Cloud Monitor from IDERA(UCM) offers a SAAS based out-of-the-box solution for monitoring Apache CouchDB for performance and availability. If you are not familiar with the concept of custom metrics as used in Uptime Cloud Monitor, please go through Custom Metrics information once before continuing with this document.

  1. Uptime Cloud Monitor account.

If you don’t already have an account, you can sign up for a 14 day FREE TRIAL of Uptime Cloud Monitor here (no Credit Card required).

  1. Apache CouchDB up and running in your environment.
  2. Root access to server to install the Apache CouchDB agent.

Monitor Apache CouchDB using out-of-the-box custom metrics installer from Uptime Cloud Monitor

There are three steps that you need to do to start monitoring a Apache CouchDB service:

  1. Apache CouchDB Agent Installation
  2. Verify that your Apache CouchDB Dashboard is up and running
  3. Configure alerts to be notified about Apache CouchDB performance issues

1.Apache CouchDB Agent Installation

Figure 1: In your Uptime Cloud Monitor Account, navigate to Custom>Getting Started

Login to your Uptime Cloud Monitor account and navigate to Custom tab -> Getting Started. Click on Apache CouchDB icon. .

Figure 2: The Apache CouchDB agent installation script

Click on clipboard.png icon to copy the installer script to your clipboard. Paste the command into the terminal window on the server where you want to install the agent. Script can be run on the server running Apache CouchDB, or it can be a different server, but this server will need to be continually running in order to monitor Apache CouchDB.

As soon as the script is run on a terminal with root access, it starts downloading the required Apache CouchDB monitoring agent on your server. You will need to configure the following items in the agent installation process. Item specified in square brackets ( [ ] ) are the default.


Figure 3: Executing the Apache CouchDB agent installation script with user as copperegg, Group as copperegg and monitoring frequency as 60 seconds

  1. User and Group for running service as default values: [copperegg][copperegg]
  2. Monitoring frequency: 15, [60], 300, 900, 3600 seconds

Figure 4: Executing the Apache CouchDB agent installation script with group name as “Apache CouchDB” , group label as “Apache CouchDB Metrics” , Dashboard as “Apache CouchDB”

  1. Group label, group name and dashboard name for custom metrics [Apache CouchDB][Apache CouchDB Metrics][Apache CouchDB]

Figure 5: Executing the Couch agent installation script with unique id , server URL and port. Only one Apache CouchDB server is added for monitoring.

  1. Unique name for this db server. [<user>-Apache CouchDB]
  2. Server details : URL for service. [localhost]
  3. Username and Password are optional.
  4. Server details : Port for service. [5984]
  5. After configuring one node, you’ll get an option to add more Apache CouchDB servers.

Figure 6: Executing the Apache CouchDB agent installation script with an upstart init file and the default value for log file name. The installation completes successfully!

  1. Configure log file name and upstart job name (defaults present) [/usr/local/copperegg/log/Apache CouchDB_metrics.log][/etc/init/revealmetrics_Apache CouchDB.conf]

2.Verify that your Apache CouchDB Dashboard is up and running

Navigate to Dashboard and you will see a new Apache CouchDB Dashboards have been added automatically by the installer.

Figure 7: A new Dashboard for Apache CouchDB has been added

As the installed script executes, you will notice data samples appearing on the widgets for this Dashboard.

Figure 8: Widget inside Apache CouchDB Dashboard displaying count of open databases.

Figure 9: Widget inside Apache CouchDB Dashboard displaying count of database reads.

Figure 10: Widget inside Apache CouchDB Dashboard displaying count of database writes.

Monitored metrics

Uptime Cloud Monitor currently monitors 31 metrics which cover most of the important metrics for Apache CouchDB from a performance and stability perspective. You can see these 31 metrics by navigating to the Custom Tab > Custom Objects and selecting Details on the Custom Metrics Group Label [Apache CouchDB Metrics] that was given as installation input. For some of these metrics, alerts have been automatically created (see section 3 below). To create new alerts see section: Configuring your own Alerts for Apache CouchDB.

The metrics are:

  • auth_cache_hits : Authentication Cache Hits
  • auth_cache_misses : Authentication Cache Misses
  • db_reads : Database Reads
  • db_writes : Database Writes
  • open_databases : Open Databases
  • open_files : Open File Descriptors
  • request_time : Request Time (alert automatically created)
  • bulk_requests : Bulk Requests
  • requests : Total HTTP Requests
  • temporary_view_reads : Temporary View Reads
  • view_reads : View Reads
  • clients_requesting_changes : Clients Requesting Changes
  • COPY : HTTP COPY Responses
  • DELETE : HTTP DELETE Responses
  • GET : HTTP GET Responses
  • HEAD : HTTP HEAD Responses
  • POST : HTTP POST Responses
  • PUT : HTTP PUT Responses
  • 200 : HTTP 200 Requests
  • 201 : HTTP 201 Requests
  • 202 : HTTP 202 Requests
  • 301 : HTTP 301 Requests
  • 304 : HTTP 304 Requests
  • 400 : HTTP 400 Requests (alert automatically created)
  • 401 : HTTP 401 Requests (alert automatically created)
  • 403 : HTTP 403 Requests (alert automatically created)
  • 404 : HTTP 404 Requests (alert automatically created)
  • 405 : HTTP 405 Requests (alert automatically created)
  • 409 : HTTP 409 Requests (alert automatically created)
  • 412 : HTTP 412 Requests (alert automatically created)
  • 500 : HTTP 500 Requests (alert automatically created)

3.Configure Alerts to be notified about Apache CouchDB performance issues

Default Pre-Configured Alerts for Apache CouchDB

As soon as your Apache CouchDB Monitoring Dashboard comes up, you will notice that some alert configurations have been automatically created by our Installation Script (under Alerts > Configure Alerts). These pre-configured alerts for Apache CouchDB include:

Sr. No. Metric Name Definition Alert Definitions Duration
1 HTTP 4xx 5xx Requests The number of failed HTTP requests. Alert will be triggered for every request. 3 Min
2 Request Time Length of a request inside Apache CouchDB without MochiWeb Alert will be triggered when request time exceeds 48000 ms 3 Min

If the alerting condition is met for these pre-configured alerts, some alert notifications may also be triggered.

Configuring your own Alerts for Apache CouchDB

Figure 11: A new alert being added that will be triggered when Apache CouchDB request time metric exceeds a threshold of 400000 within a time period of 1 min

Alerts can also be configured against any of these 31 monitored metrics for Apache CouchDB.

You can configure new alerts that will be triggered when performance issues with Apache CouchDB arise. You can also configure the notification mechanisms for a triggered alert.

  1. Go to Alerts Tab > Configure alerts and click on “New Alerts” button
  2. Provide values for these fields in the New Alert page:
    • Description: A description of the alert that will be easily recognized by you and your team if the alert is triggered
    • Alert me when: Select the metric of interest and the condition upon which the alert is triggered. In the Alert me when dropdown, you can prefill “Custom: <your Apache CouchDB Metric Group>” to get only the list of monitored metrics for your specific Apache CouchDB installation. From this list, you can then select the specific metric for which you want to configure an alert. As an illustration, in Figure 11, the chosen metric of interest in ‘Alert me when’ is ‘Custom: CouchDB Metrics: Data Size’ from the Apache CouchDB Metrics group and the condition for triggering the alert is if the average value is more than the specified value of 400000
    • For at least: The duration for which the alert condition must be valid for the alert to be triggered
    • Matching tags: By default, (match everything) is chosen. If needed, you can attach tags to a particular metric object and select those tags here, which would cause only alerts on that metric object to be triggered.
    • Excluding tags: By default, (exclude nothing) is chosen. If needed, you can attach tags to a particular metric object and select those tags here, which would cause alerts on that metric object to be skipped.
    • Annotate: When enabled, an annotation is automatically created when the alert is triggered. Annotations will be visible in the custom metrics dashboard where the data stream is displayed.
    • Automatic Clear: When enabled, the alert issue is automatically cleared if the triggering condition is no longer true
    • Notify on clear: When enabled, notifications are also sent when the alert issue is cleared. Please do note that notifications are always sent when the alert issue is triggered.
    • Send Notifications To: Here you can configure the notification mechanisms by which the alert is communicated to you and others in your team.

Uptime Cloud Monitor supports notifying different sets of users with differing notification mechanisms for each alert type.

Notification mechanisms include:

  • Email
  • SMS
  • PagerDuty
  • Twitter
  • HipChat
  • Campfire
  • Slack
  • OpsGenie

Webhooks are also exposed for clients to configure custom notification mechanisms.

More about setting up website probe alerts can be found here.

Uptime Cloud Monitor Free Trial! Sign up today!

Sign up for a 14 day FREE TRIAL of Uptime Cloud Monitor (no Credit Card required).

You can find more information about Uptime Cloud Monitor pricing options here.

We charge only $0.08 per month per metric!

Sign up today!