smithsz commented on code in PR #6065:
URL: https://github.com/apache/couchdb/pull/6065#discussion_r3578792025
##########
src/couch_prometheus/src/couch_prometheus.erl:
##########
@@ -384,3 +396,100 @@ get_bt_engine_cache_stats() ->
to_prom(couchdb_bt_engine_cache_memory, gauge, "memory used by the
btree cache", Mem),
to_prom(couchdb_bt_engine_cache_size, gauge, "number of entries in the
btree cache", Size)
].
+
+get_clouseau_status() ->
+ Value =
+ case clouseau_rpc:connected() of
+ true -> ?CLOUSEAU_CONNECTED;
+ false -> ?CLOUSEAU_DISCONNECTED
+ end,
+ to_prom(clouseau_connected, gauge, "clouseau connectivity status", Value).
+
+get_database_count() ->
+ ShardsDb = config:get("mem3", "shards_db", "_dbs"),
+ case fabric:get_db_info(ShardsDb) of
+ {ok, Info} ->
+ DbCount = couch_util:get_value(doc_count, Info),
+ to_prom(database_count, gauge, "total database count", DbCount);
+ {error, Reason} ->
+ couch_log:warning("~p failed to get database count: ~p", [?MODULE,
Reason]),
+ []
+ end.
+
+get_ioq_stats() ->
+ IOQData = ioq:get_disk_queues(),
Review Comment:
Since switching over is a bit more effort, I went ahead and updated the PR
to support both IOQ implementations for now. Hope that's alright.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]