Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
- make the credits section more prominent
- move the example metrics to its own file
  • Loading branch information
gesellix committed Jul 2, 2019
1 parent 1d69c55 commit d161c41
Show file tree
Hide file tree
Showing 2 changed files with 442 additions and 88 deletions.
96 changes: 8 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,97 +45,17 @@ The `examples` directory in this repository contains ready-to-run examples for
- [Docker Compose](examples/compose/README.md)
- [Docker Swarm/Stack](examples/stack/README.md)

## Metrics Overview
The following list gives you an overview on the currently exposed metrics.
Please note that beyond the complete CouchDB stats a metric `couchdb_up` has been
added as minimal connection health check.

The `node_name` label defaults to `master` for CouchDB 1.x and `nonode@nohost` for a single CouchDB 2.x setup.
The node name makes more sense in a clustered CouchDB 2.x environment with several nodes to provide separated stats for each node.

# HELP couchdb_database_data_size data size
# TYPE couchdb_database_data_size gauge
couchdb_database_data_size{db_name="db-1"} 1.764941e+06
couchdb_database_data_size{db_name="db-2"} 4.93011369e+08
# HELP couchdb_database_disk_size disk size
# TYPE couchdb_database_disk_size gauge
couchdb_database_disk_size{db_name="db-1"} 2.098663e+06
couchdb_database_disk_size{db_name="db-2"} 6.60108847e+08
# HELP couchdb_database_overhead disk size overhead
# TYPE couchdb_database_overhead gauge
couchdb_database_overhead{db_name="db-1"} 333722
couchdb_database_overhead{db_name="db-2"} 1.67097478e+08
# HELP couchdb_httpd_auth_cache_hits number of authentication cache hits
# TYPE couchdb_httpd_auth_cache_hits gauge
couchdb_httpd_auth_cache_hits{node_name="nonode@nohost"} 0
# HELP couchdb_httpd_auth_cache_misses number of authentication cache misses
# TYPE couchdb_httpd_auth_cache_misses gauge
couchdb_httpd_auth_cache_misses{node_name="nonode@nohost"} 0
# HELP couchdb_httpd_bulk_requests number of bulk requests
# TYPE couchdb_httpd_bulk_requests gauge
couchdb_httpd_bulk_requests{node_name="nonode@nohost"} 1871
# HELP couchdb_httpd_clients_requesting_changes number of clients for continuous _changes
# TYPE couchdb_httpd_clients_requesting_changes gauge
couchdb_httpd_clients_requesting_changes{node_name="nonode@nohost"} 0
# HELP couchdb_httpd_database_reads number of times a document was read from a database
# TYPE couchdb_httpd_database_reads gauge
couchdb_httpd_database_reads{node_name="nonode@nohost"} 8
# HELP couchdb_httpd_database_writes number of times a database was changed
# TYPE couchdb_httpd_database_writes gauge
couchdb_httpd_database_writes{node_name="nonode@nohost"} 14955
# HELP couchdb_httpd_open_databases number of open databases
# TYPE couchdb_httpd_open_databases gauge
couchdb_httpd_open_databases{node_name="nonode@nohost"} 16
# HELP couchdb_httpd_open_os_files number of file descriptors CouchDB has open
# TYPE couchdb_httpd_open_os_files gauge
couchdb_httpd_open_os_files{node_name="nonode@nohost"} 16
# HELP couchdb_httpd_request_methods number of HTTP requests by method
# TYPE couchdb_httpd_request_methods gauge
couchdb_httpd_request_methods{method="COPY",node_name="nonode@nohost"} 0
couchdb_httpd_request_methods{method="DELETE",node_name="nonode@nohost"} 0
couchdb_httpd_request_methods{method="GET",node_name="nonode@nohost"} 1465
couchdb_httpd_request_methods{method="HEAD",node_name="nonode@nohost"} 0
couchdb_httpd_request_methods{method="POST",node_name="nonode@nohost"} 2995
couchdb_httpd_request_methods{method="PUT",node_name="nonode@nohost"} 152
# HELP couchdb_httpd_request_time length of a request inside CouchDB without MochiWeb
# TYPE couchdb_httpd_request_time gauge
couchdb_httpd_request_time{node_name="nonode@nohost"} 0
# HELP couchdb_httpd_requests number of HTTP requests
# TYPE couchdb_httpd_requests gauge
couchdb_httpd_requests{node_name="nonode@nohost"} 4611
# HELP couchdb_httpd_status_codes number of HTTP responses by status code
# TYPE couchdb_httpd_status_codes gauge
couchdb_httpd_status_codes{code="200",node_name="nonode@nohost"} 2422
couchdb_httpd_status_codes{code="201",node_name="nonode@nohost"} 2171
couchdb_httpd_status_codes{code="202",node_name="nonode@nohost"} 0
couchdb_httpd_status_codes{code="301",node_name="nonode@nohost"} 0
couchdb_httpd_status_codes{code="304",node_name="nonode@nohost"} 4
couchdb_httpd_status_codes{code="400",node_name="nonode@nohost"} 0
couchdb_httpd_status_codes{code="401",node_name="nonode@nohost"} 2
couchdb_httpd_status_codes{code="403",node_name="nonode@nohost"} 0
couchdb_httpd_status_codes{code="404",node_name="nonode@nohost"} 9
couchdb_httpd_status_codes{code="405",node_name="nonode@nohost"} 0
couchdb_httpd_status_codes{code="409",node_name="nonode@nohost"} 0
couchdb_httpd_status_codes{code="412",node_name="nonode@nohost"} 1
couchdb_httpd_status_codes{code="500",node_name="nonode@nohost"} 0
# HELP couchdb_httpd_temporary_view_reads number of temporary view reads
# TYPE couchdb_httpd_temporary_view_reads gauge
couchdb_httpd_temporary_view_reads{node_name="nonode@nohost"} 0
# HELP couchdb_httpd_up Was the last query of CouchDB stats successful.
# TYPE couchdb_httpd_up gauge
couchdb_httpd_up 1
# HELP couchdb_httpd_view_reads number of view reads
# TYPE couchdb_httpd_view_reads gauge
couchdb_httpd_view_reads{node_name="nonode@nohost"} 0
# HELP couchdb_server_active_tasks active tasks
# TYPE couchdb_server_active_tasks gauge
couchdb_server_active_tasks{database_compaction="0",indexer="0",node_name="nonode@nohost",replication="1",view_compaction="0"} 1
... (more go internal stats)

## Thanks
## Credits

Thanks go to the Prometheus team, which is very active and responsive!

I also have to admit that the couchdb-prometheus-exporter code is heavily inspired by
the other [available exporters](http://prometheus.io/docs/instrumenting/exporters/),
and that some ideas have just been copied from them.

Last but not least, this project wouldn't be possible without users submitting issues,
feature requests and adding [code contributions](https://github.com/gesellix/couchdb-prometheus-exporter/graphs/contributors).
Thanks a lot!

## Metrics Overview
The file [README_metrics.md](https://github.com/gesellix/couchdb-prometheus-exporter/blob/master/README_metrics.md) gives you an overview on the currently exposed metrics.
Loading

0 comments on commit d161c41

Please sign in to comment.