简体   繁体   中英

Play framework: Server monitoring and performance admin page

I am using Play 2.2.x with Scala. I want an admin dashboard which shows CPU/Memory, list of recent HTTP requests, performance and load metrics, logs, server console etc in a nice HTML charts GUI page. Is there a Play plugin or a Java EE drop-in I can use? Takipi / NewRelic looks good but it does not have a nice HTTP log UI . JavaMelody looks good too but it is geared for traditional Java EE apps rather than a Play2 Scala app.

For metrics related to HTTP requests/JVM Stats Twitter's Ostrich is awesome: https://github.com/twitter/ostrich .

For CPU/Memory you can execute Unix commands to obtain the metrics by importing scala.sys.process._ package.

Since you are using Play! you can have a separate routes: one for number of HTTP requests managed by Ostrich Stats collector, one for CPU/Memory, one for performance metrics (also managed by Ostrich) and so on..

We love using's coda-hale's metrics library for metering application, jvm, http and logging metrics. http://metrics.codahale.com/

The metrics library supports reporting to various monitoring systems, eg graphite, ganglia. (There's a www.hostedgraphite.com service if you wish not to install graphite locally)

There's a metrics plugin for play framework (disclaimer: I'm the plugin author) here https://github.com/kenshoo/metrics-play

To monitor your play! application, you can use the typesafe console : https://github.com/sbt/sbt-atmos

But there is no log UI ...

For logs, if you want to query them (with a good UI), you can take a look at kibana with logstash : http://www.elasticsearch.org/overview/kibana/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM