[ https://issues.apache.org/jira/browse/SOLR-15397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340637#comment-17340637 ]
Jan Høydahl commented on SOLR-15397: ------------------------------------ While testing I discover that with a 3 node ZK ensemble, if you stop 2 of them, the /admin/zookeeper/status API will return an exception instead of details about the Zookeepers. That is since it tries to talk to ZK to get the /zookeeper/configuration node. This defeats the purpose somewhat, so I intend to catch that exception and continue talking to each zookeeper over TCP using ZK_HOST. Then at least this endpoint will always return a JSON response, so you can know - both in Solr UI and in Grafana, how many Zookeepers you have live and which ones are dead. > Expose zookeeper status in the exporter > --------------------------------------- > > Key: SOLR-15397 > URL: https://issues.apache.org/jira/browse/SOLR-15397 > Project: Solr > Issue Type: New Feature > Security Level: Public(Default Security Level. Issues are Public) > Components: contrib - prometheus-exporter > Reporter: Jan Høydahl > Assignee: Jan Høydahl > Priority: Major > Attachments: Skjermbilde 2021-05-06 kl. 16.48.37.png, Skjermbilde > 2021-05-06 kl. 16.58.42.png > > > This issue will add these prometheus metrics to solr exporter: > {{solr_zookeeper_ensemble_size}}, {{solr_zookeeper_nodestatus}}, > {{solr_zookeeper_status}} > {code:java} > # HELP solr_zookeeper_nodestatus See following URL: > https://solr.apache.org/guide/cloud-screens.html#zk-status-view > # TYPE solr_zookeeper_nodestatus gauge > solr_zookeeper_nodestatus{host="zoo1:2181",zk_host="zoo1:2181,zoo2:2181,zoo3:2181",} > 1.0 > solr_zookeeper_nodestatus{host="zoo2:2181",zk_host="zoo1:2181,zoo2:2181,zoo3:2181",} > 1.0 > solr_zookeeper_nodestatus{host="zoo3:2181",zk_host="zoo1:2181,zoo2:2181,zoo3:2181",} > 0.0 > # HELP solr_zookeeper_status See following URL: > https://solr.apache.org/guide/cloud-screens.html#zk-status-view > # TYPE solr_zookeeper_status gauge > solr_zookeeper_status{status="yellow",zk_host="zoo1:2181,zoo2:2181,zoo3:2181",} > 0.0 > # HELP solr_zookeeper_ensemble_size See following URL: > https://solr.apache.org/guide/cloud-screens.html#zk-status-view > # TYPE solr_zookeeper_ensemble_size gauge > solr_zookeeper_ensemble_size{mode="ensemble",zk_host="zoo1:2181,zoo2:2181,zoo3:2181",} > 3.0 > {code} > The data is fetched and parsed from Solr's /admin/zookeeper/status endpoint. > Can be used for alerting on earlier ZK versions that do not natively support > prometheus, or if you don't want to setup separate ZK monitoring. Example > Grafana dashboard tile: > !Skjermbilde 2021-05-06 kl. 16.58.42.png! > I plan to add this to the new solr cluster row next to the solr live-nodes > graph: > !Skjermbilde 2021-05-06 kl. 16.48.37.png|width=800! -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org