Skip to main content

This is an extension for the Zabbix 4.x Agent to enable it to monitor CouchDB 3 servers.

Requirements

Installation (Agent side)

You first have to install the extension on the server that runs the Zabbix Agent.

From PyPI

Run the following command (as root):

pip3 install zabbix-agent-extension-couchdb3

Then copy the zabbix-agent-extension-couchdb3.conf file from this repository to the /etc/zabbix/zabbix_agentd.conf.d/ folder on the server.

And finally, restart the Zabbix Agent (with systemd: systemctl restart zabbix-agent).

Installation (Zabbix side)

1. Import the template

  • Go to Configuration -> Templates,

  • and click on the Import button.

Screenshot
  • Now select the template (zabbix-agent-extension-couchdb3.template.xml),

  • and click on the Import button.

Screenshot

2. Add the template to a host

  • Go to the host configuration,

  • and link the Template CouchDB 3 tempate to it.

Doc: https://www.zabbix.com/documentation/4.0/manual/config/hosts/host

Screenshot

3. Configure connection information using macros

  • Go to the host configuration page,

  • open the Macros tab,

  • configure required parameters.

The following parameters are available:

  • {$COUCHDB_HOST}: the CouchDB host (optional, default: localhost)

  • {$COUCHDB_PASSWORD}: the password to connect to CouchDB (required)

  • {$COUCHDB_PORT}: the CouchDB port (optional, default: 5984)

  • {$COUCHDB_PROTO}: the protocol to use to connect to CouchDB (http or https, optional, default: http)

  • {$COUCHDB_USER}: the user to connect to CouchDB (optional, default: admin)

At least the {$COUCHDB_PASSWORD} macro must be defined!

Screenshot

About polling interval

The default polling interval of this probe in Zabbix is 30s. In order to have accurate stats, you must configure the “stats interval” setting of your CouchDB to twice this value (60s):

[stats]
interval = 60

Read more in the CouchDB documentation.

CLI Usage

This extension also provides a CLI to simplify debugging.

usage: zabbix-agent-extension-couchdb3
[-h] [--host HOST] [--port PORT] [--user USER] --password PASSWORD
                   [--proto PROTO] [--show-json] [--show-stats] [--generate-template]

optional arguments:
  -h, --help           show this help message and exit
  --host HOST          The CouchDB server host (default: localhost)
  --port PORT          The CouchDB server port (default: 5984)
  --user USER          The username to use for the connexion (default: admin)
  --password PASSWORD  The password to use for the connexion (mandatory)
  --proto PROTO        The protocol to use (default: http)
  --show-json          Display the raw JSON stats from CouchDB and exit (no stats will be
                       sent to Zabbix)
  --show-stats         Display the available stats with their values and description and exit
                       (no stats will be sent to Zabbix)
  --generate-template  Generates a Zabbix 4 template with all supported keys and exit (no
                   stats will be sent to Zabbix)

Example: dumping CouchDB stats as JSON:

zabbix-agent-extension-couchdb3 --password=XXXXX --show-json

Example: displaying CouchDB stats in a more friendly format:

zabbix-agent-extension-couchdb3 --password=XXXXX --show-stats

Example: generating the Zabbix template:

zabbix-agent-extension-couchdb3 --password=XXXXX --generate-template > zabbix-agent-extension-couchdb3.template.xml

Changelog

  • v1.0.1: Send credential to CouchDB at first request instead of waiting for a 401 first

  • v1.0.0:

    • Adds a command to generate the template from the available CouchDB stats

    • Adds a template for Zabbix 4.0

    • Adds documentation

  • v0.2.0: Handles histogram-type values

  • v0.1.1: Fixes an issue with the entry point

  • v0.1.0: Initial release

Metadata

Release files for zabbix-agent-extension-couchdb3 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zabbix-agent-extension-couchdb3 1.0.1
File Size Uploaded
zabbix-agent-extension-couchdb3-1.0.1.tar.gz 8.0 kB Details

Release files / zabbix-agent-extension-couchdb3-1.0.1.tar.gz

Download URL zabbix-agent-extension-couchdb3-1.0.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5db4fdcd3553d69b7919819df6ce2f5210f71991df62e1c2814bfd175ac36dd4
BLAKE2b-256 checksum
How to use checksums
d2b9ad4344dc170a70b4991e0f1354d500d3d2be5a83e6e6e83074f61d9a55a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page