Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 818
pathikrit Avatar asked Feb 05 '14 20:02

pathikrit


2 Answers

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

like image 138
Sudheer Aedama Avatar answered Sep 18 '22 22:09

Sudheer Aedama


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, e.g. 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

like image 39
LiorH Avatar answered Sep 19 '22 22:09

LiorH