Package: zabbix-agent-extension-couchdb3
This is an extension for the Zabbix 4.x Agent to enable it to monitor CouchDB
3 servers.RequirementsZabbix 4.0+Python 3.5+py-zabbixInstallation (Agent side)You first have to install the extension on the server that runs the Zabbix
Agent.From PyPIRun the following command (as root):pip3 install zabbix-agent-extension-couchdb3Then copy thezabbix-agent-extension-couchdb3.conffile from this
repository to the/etc/zabbix/zabbix_agentd.conf.d/folder on the server.And finally, restart the Zabbix Agent (with systemd:systemctl restartzabbix-agent).Installation (Zabbix side)1. Import the templateGo toConfiguration->Templates,and click on theImportbutton.Now select the template (zabbix-agent-extension-couchdb3.template.xml),and click on theImportbutton.2. Add the template to a hostGo to the host configuration,and link theTemplate CouchDB 3tempate to it.Doc:https://www.zabbix.com/documentation/4.0/manual/config/hosts/host3. Configure connection information using macrosGo to the host configuration page,open theMacrostab,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 (httporhttps, optional, default:http){$COUCHDB_USER}: the user to connect to CouchDB (optional, default:admin)At least the{$COUCHDB_PASSWORD}macro must be defined!About polling intervalThe default polling interval of this probe in Zabbix is30s. In order to
have accurate stats, you must configure the “stats interval” setting of your
CouchDB to twice this value (60s):[stats]
interval = 60Read morein the CouchDB documentation.CLI UsageThis 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-jsonExample: displaying CouchDB stats in a more friendly format:zabbix-agent-extension-couchdb3 --password=XXXXX --show-statsExample: generating the Zabbix template:zabbix-agent-extension-couchdb3 --password=XXXXX --generate-template > zabbix-agent-extension-couchdb3.template.xmlChangelogv1.0.1:Send credential to CouchDB at first request instead of waiting
for a 401 firstv1.0.0:Adds a command to generate the template from the available CouchDB statsAdds a template for Zabbix 4.0Adds documentationv0.2.0:Handles histogram-type valuesv0.1.1:Fixes an issue with the entry pointv0.1.0:Initial release