You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2020/11/04 15:24:27 UTC

[GitHub] [zeppelin] Reamer opened a new pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Reamer opened a new pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964


   ### What is this PR for?
   This PR includes:
    - two new metric endpoints (`/metrics/json`, `/metrics/prometheus`)
    - two new healthcheck endpoints (`/health/readiness`, `/health/liveness`)
    - some default metrics (jetty, jvm, interpreter)
    - a graphite metric exporter
   
   ### What type of PR is it?
   - Feature
   
   ### Todos
   * [ ] - Add Unit tests
   * [ ] - Add docu for InfluxDB reporter
   * [ ] - Add documentation for metric and healthcheck endpoints
   * [ ] - Check shiro protection for metric and healthcheck endpoints
   * [ ] - Add license informations for dropwizard metric library
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-4977
   * https://issues.apache.org/jira/browse/ZEPPELIN-4976
   
   ### How should this be tested?
   * https://travis-ci.com/github/Reamer/zeppelin/builds/198259695
   
   ### Questions:
   * Does the licenses files need update? Yes
   * Is there breaking changes for older versions? No
   * Does this needs documentation? Yes


----------------------------------------------------------------
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] [zeppelin] Reamer commented on pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Posted by GitBox <gi...@apache.org>.
Reamer commented on pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964#issuecomment-721800356


   This is a first draft, feedback is very welcome.


----------------------------------------------------------------
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] [zeppelin] Reamer commented on a change in pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964#discussion_r517854469



##########
File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java
##########
@@ -321,6 +326,21 @@ public void saveToFile() throws IOException {
     configStorage.save(info);
   }
 
+  private void initMetrics() {
+    // This class should  be a singleton
+    // Tests create more instances
+    Metrics.getMetricRegistry().removeMatching(
+      MetricFilter.startsWith(MetricRegistry.name(METRICS_PREFIX_INTERPRETER)));
+    Metrics.getMetricRegistry().<Gauge<Integer>>register(MetricRegistry.name(METRICS_PREFIX_INTERPRETER, "amount"),
+      interpreterSettings::size);
+    Metrics.getMetricRegistry().<Gauge<Integer>>register(MetricRegistry.name(METRICS_PREFIX_INTERPRETER, "group", "size"),
+      () -> getAllInterpreterGroup().size());
+    for (Map.Entry<String, InterpreterSetting> interpreterSetting : interpreterSettings.entrySet()) {

Review comment:
       Not dynamic, we should register the metric when the interpreter is created and remove the registration when the interpreter is removed.




----------------------------------------------------------------
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] [zeppelin] Reamer closed pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Posted by GitBox <gi...@apache.org>.
Reamer closed pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964


   


----------------------------------------------------------------
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] [zeppelin] Reamer commented on pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Posted by GitBox <gi...@apache.org>.
Reamer commented on pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964#issuecomment-726714912


   Closing this PR in favor of #3971
   Reason: Dropwizard does not support metric tags, which are quite powerful.


----------------------------------------------------------------
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] [zeppelin] Reamer commented on pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Posted by GitBox <gi...@apache.org>.
Reamer commented on pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964#issuecomment-722359943


   > I recently went through the effort to add Prometheus and Grafana based monitoring to a search stack for ecommerce applications, and what made the experience really great was that there was already a wonderful Solr template and Rails template dashboards available from Grafana. Writing your own Grafana dashboard isn't for the faint of heart!
   > 
   > Would you be able to publish a template dashboard for Zeppelin as well? That would move this from a "hey, we _should_ monitor Zeppelin" to a "no excuses, its easy to monitor Zeppelin" ;-)
   > 
   > [querqy/chorus#23](https://github.com/querqy/chorus/pull/23)
   
   Thank you very much for your feedback. I have created https://issues.apache.org/jira/browse/ZEPPELIN-5123 to track this.


----------------------------------------------------------------
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] [zeppelin] epugh commented on pull request #3964: [ZEPPELIN-4977] Metrics and healthcheck

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #3964:
URL: https://github.com/apache/zeppelin/pull/3964#issuecomment-722021750


   I recently went through the effort to add Prometheus and Grafana based monitoring to a search stack for ecommerce applications, and what made the experience really great was that there was already a wonderful Solr template and Rails template dashboards available from Grafana.   Writing your own Grafana dashboard isn't for the faint of heart!  
   
   Would you be able to publish a template dashboard for Zeppelin as well?   That would move this from a "hey, we *should* monitor Zeppelin" to a "no excuses, its easy to monitor Zeppelin" ;-)
   
   
   https://github.com/querqy/chorus/pull/23


----------------------------------------------------------------
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