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/04 15:44:37 UTC

[GitHub] [couchdb-documentation] tonysun83 commented on a change in pull request #660: Update documentation with couch_prometheus endpoint API

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