You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/06/02 18:23:04 UTC
[GitHub] [couchdb-documentation] tonysun83 opened a new pull request #660: Update documentation with couch_prometheus endpoint API
tonysun83 opened a new pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660
## Overview
In the upcoming 3.2 release, we added supported for prometheus endpoints:
https://github.com/apache/couchdb/issues/3377
https://github.com/apache/couchdb/pull/3416
https://github.com/apache/couchdb/pull/3506
This updates our documentation to reflect this new addition.
## Testing recommendations
<!-- Describe how we can test your changes.
Does it provides any behaviour that the end users
could notice? -->
## GitHub issue number
https://github.com/apache/couchdb/issues/3377
## Related Pull Requests
<!-- If your changes affects multiple components in different
repositories please put links to those pull requests here. -->
## Checklist
- [ ] Update [rebar.config.script](https://github.com/apache/couchdb/blob/main/rebar.config.script) with the commit hash once this PR is rebased and merged
<!-- Before opening the PR, consider running `make check` locally for a faster turnaround time -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] tonysun83 commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
tonysun83 commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645673827
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
Review comment:
@wohali it was a rather long set of metrics and I cut it short not to take up a lot of space. I can include the entire thing so that it doesn't confuse users.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] flimzy commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
flimzy commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r644307570
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,75 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+============================
+``/_node/{node-name}/_prometheus``
+=============================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. Currently the format version 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
+
+If an additional port config option is specified, then a client can call this api using a
Review comment:
```suggestion
If an additional port config option is specified, then a client can call this API using
```
##########
File path: src/config/misc.rst
##########
@@ -269,3 +269,37 @@ Configuration of Database Purge
[purge]
index_lag_warn_seconds = 86400
+
+.. _config/prometheus:
+
+Configuration of Prometheus Endpoint
+===============================
+
+.. config:section:: prometheus :: Configuration of Prometheus Options
+
+ .. config:option:: additional_port
+
+ .. versionadded:: 3.2
+
+ Sets whether or not to create a separate, non-authenticated port (default is false)::
+
+ [prometheus]
+ additional_port = true
+
+ .. config:option:: bind_address
+
+ .. versionadded:: 3.2
+
+ The ip address to bind::
+
+ [prometheus]
+ bind_address = 127.0.0.1
+
+ .. config:option:: port
+
+ .. versionadded:: 3.2
+
+ The port which clients can query prometheus endpoint data without authentication
Review comment:
```suggestion
The port on which clients can query prometheus endpoint data without authentication
```
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,75 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+============================
+``/_node/{node-name}/_prometheus``
+=============================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. Currently the format version 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
+
+If an additional port config option is specified, then a client can call this api using a
+that port which does not require authentication. This option is false(OFF) by default.
Review comment:
```suggestion
that port which does not require authentication. This option is ``false`` (OFF) by default.
```
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,75 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+============================
+``/_node/{node-name}/_prometheus``
+=============================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. Currently the format version 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
+
+If an additional port config option is specified, then a client can call this api using a
+that port which does not require authentication. This option is false(OFF) by default.
+When the option true(ON), the default ports for a 3 node cluster are 17986, 27986, 37986.
Review comment:
```suggestion
When the option is ``true`` (ON), the default ports for a 3 node cluster are ``17986``, ``27986``, and ``37986``.
```
##########
File path: src/config/misc.rst
##########
@@ -269,3 +269,37 @@ Configuration of Database Purge
[purge]
index_lag_warn_seconds = 86400
+
+.. _config/prometheus:
+
+Configuration of Prometheus Endpoint
+===============================
+
+.. config:section:: prometheus :: Configuration of Prometheus Options
+
+ .. config:option:: additional_port
+
+ .. versionadded:: 3.2
+
+ Sets whether or not to create a separate, non-authenticated port (default is false)::
+
+ [prometheus]
+ additional_port = true
+
+ .. config:option:: bind_address
+
+ .. versionadded:: 3.2
+
+ The ip address to bind::
Review comment:
```suggestion
The IP address to bind::
```
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,75 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+============================
+``/_node/{node-name}/_prometheus``
+=============================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. Currently the format version 2.0.
Review comment:
I feel like this last sentence is missing a word? "Currently the format version is 2.0" perhaps?
Also, we can probably remove the word "Currently", as I think that's implicit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] tonysun83 commented on pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
tonysun83 commented on pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#issuecomment-854168811
@flimzy I've updated the documentation with your suggestions. Let me know what you think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] tonysun83 commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
tonysun83 commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645721622
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
Review comment:
added an ellipsis (I think I did it correctly) in there. This was a good catch. I had mistakenly added `_active_tasks` into the documentation because originally I wanted the PR to include `_active_tasks`. But upon inspecting the entire list output I realized I didn't have it. I went back to the PR and I remembered that `_active_tasks` is a little different given how it's actually something we accumulate at the top of chttpd and not per node. That's why I excluded it for this first version. The next improvement would be to dig deeper grab tasks per node.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] wohali commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
wohali commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645680648
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
Review comment:
Oh no need! Just put an ellipsis in and state that it contains the full content of `_stats` and `_system` maybe? Or if there are intentional omissions, list that too. Even a bulleted list of what to expect would be sufficient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] wohali merged pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
wohali merged pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] wohali commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
wohali commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645639987
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_prometheus HTTP/1.1
+ Accept: text/plain
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 187
+ Content-Type: text/plain; version=2.0
+ Date: Sat, 10 May 2020 11:41:11 GMT
+ Server: CouchDB (Erlang/OTP)
+
+ # TYPE couchdb_uptime_seconds counter
+ couchdb_uptime_seconds 1
+ # TYPE couchdb_erlang_memory_bytes gauge
+ couchdb_erlang_memory_bytes{memory_type="total"} 71237784
+ couchdb_erlang_memory_bytes{memory_type="processes"} 12248504
+ couchdb_erlang_memory_bytes{memory_type="processes_used"} 12235928
+ couchdb_erlang_memory_bytes{memory_type="system"} 58989280
+ couchdb_erlang_memory_bytes{memory_type="atom"} 1172689
+ couchdb_erlang_memory_bytes{memory_type="atom_used"} 1156575
+ couchdb_erlang_memory_bytes{memory_type="binary"} 182568
+ couchdb_erlang_memory_bytes{memory_type="code"} 27819083
+ couchdb_erlang_memory_bytes{memory_type="ets"} 3143536
+ # TYPE couchdb_erlang_gc_collections_total counter
+ couchdb_erlang_gc_collections_total 13417
+ # TYPE couchdb_erlang_gc_words_reclaimed_total counter
+ couchdb_erlang_gc_words_reclaimed_total 71296018
+ # TYPE couchdb_erlang_context_switches_total counter
+ couchdb_erlang_context_switches_total 358276
+ # TYPE couchdb_erlang_reductions_total counter
+ couchdb_erlang_reductions_total 46527253
+ # TYPE couchdb_erlang_processes gauge
+ couchdb_erlang_processes 528
+ # TYPE couchdb_erlang_process_limit gauge
+ couchdb_erlang_process_limit 262144
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_read"} 4524
+ ouchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "docs_written"} 4524
+ couchdb_active_task{type="replication", source="mailbox", target="http://mailsrv:5984/mailbox <http://mailsrv:5984/mailbox>", docs_count = "missing_revisions_found"} 4524
Review comment:
Is there any explanation as to why this subset of the metrics are available, vs. the full metrics we can see at `_system` or `_stats`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] tonysun83 commented on pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
tonysun83 commented on pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#issuecomment-854876727
@flimzy @wohali made the changes you both recommended. will be away for a bit so feel free to squash and merge if there are no more changes you'd like to see
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] flimzy commented on pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
flimzy commented on pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#issuecomment-854170737
> @flimzy I've updated the documentation with your suggestions. Let me know what you think.
Looks good! I think the `ip` => `IP` capitalization was missed. And on a second look, I found a couple other suggestions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] flimzy commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
flimzy commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645116740
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
Review comment:
```suggestion
``_stats``, ``active_task``, and ``_system`` endpoints. The format is determined by
```
Maybe link to the docs about these endpoints, too?
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
Review comment:
```suggestion
https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
```
Make this URL a link, too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] flimzy commented on pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
flimzy commented on pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#issuecomment-854170737
> @flimzy I've updated the documentation with your suggestions. Let me know what you think.
Looks good! I think the `ip` => `IP` capitalization was missed. And on a second look, I found a couple other suggestions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] tonysun83 commented on pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
tonysun83 commented on pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#issuecomment-854168811
@flimzy I've updated the documentation with your suggestions. Let me know what you think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] flimzy commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
flimzy commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645116740
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
Review comment:
```suggestion
``_stats``, ``active_task``, and ``_system`` endpoints. The format is determined by
```
Maybe link to the docs about these endpoints, too?
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
Review comment:
```suggestion
https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
```
Make this URL a link, too?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] wohali commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
wohali commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645639138
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
+ https://prometheus.io/docs/introduction/overview/. The format version is 2.0.
Review comment:
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb-documentation] wohali commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API
Posted by GitBox <gi...@apache.org>.
wohali commented on a change in pull request #660:
URL: https://github.com/apache/couchdb-documentation/pull/660#discussion_r645636220
##########
File path: src/api/server/common.rst
##########
@@ -1586,6 +1586,76 @@ node, you can use:
This returns an entire statistics object, as with the full request, but
containing only the requested individual statistic.
+==================================
+``/_node/{node-name}/_prometheus``
+==================================
+
+.. http:get:: /_node/{node-name}/_prometheus
+ :synopsis: Returns server statistics in prometheus format
+
+ The ``_prometheus`` resource returns a text/plain response that consolidates our
+ `_stats`, `active_task`, and `_system` endpoints. The format is determined by
Review comment:
+1 to Flimzy's comment here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org