我试图使用来自github 的kamon-grafana-dashboard来使用kamon监控我的scala akka应用程序。
我使用Akka 2.3.6 Scala 2.10.4和kamon 0.5.1
系统指标会报告给grafana后端,但我不会报告任何演员指标。
这是我的build.sbt文件
organization in ThisBuild := "lolcat"
name := """ImageServerSpray"""
version := "1.0"
scalaVersion := "2.10.4"
val sprayVersion = "1.3.2"
val akkaVersion = "2.3.6"
val kamonVersion = "0.5.1"
scalacOptions ++=Seq(
"-feature",
"-unchecked",
"-deprecation",
"-encoding",
"utf8",
"-language:implicitConversions",
"-language:higherKinds",
"-language:existentials",
"-language:postfixOps"
)
resolvers ++=Seq("Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/",
"spray repo" at "http://repo.spray.io")
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"io.spray" %% "spray-can" % sprayVersion,
"io.spray" %% "spray-routing" % sprayVersion,
"io.spray" %% "spray-http" % sprayVersion,
"io.spray" %% "spray-httpx" % sprayVersion,
"io.spray" %% "spray-io" % sprayVersion,
"io.spray" %% "spray-json" % sprayVersion,
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"io.spray" %% "spray-util" % sprayVersion,
"org.json4s" %% "json4s-native" % "3.2.4",
"ch.qos.logback" % "logback-classic" % "1.1.2",
"io.kamon" %% "kamon-core" % kamonVersion,
"io.kamon" %% "kamon-akka" % kamonVersion,
"io.kamon" %% "kamon-statsd" % kamonVersion,
"io.kamon" %% "kamon-log-reporter" % kamonVersion,
"io.kamon" %% "kamon-system-metrics" % kamonVersion,
"org.aspectj" % "aspectjweaver" % "1.8.1",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"io.spray" %% "spray-testkit" % sprayVersion % "test",
"org.scalatest" %% "scalatest" % "2.1.4" % "test",
"com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2"
)
aspectjSettings
javaOptions in run <++= AspectjKeys.weaverOptions in Aspectj
fork in run := true
这是我的application.conf
akka {
loglevel = DEBUG
loggers = ["akka.event.slf4j.Slf4jLogger"]
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
log-config-on-start = off
actor.debug {
# enable function of LoggingReceive, which is to log any received message at DEBUG level
receive = on
# enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill and the like)
autoreceive = on
# enable DEBUG logging of actor lifecycle changes
lifecycle = on
}
}
spray.routing {
relaxed-header-parsing = on
}
kamon{
system-metrics {
#sigar is enabled by default
sigar-enabled = true
#jmx related metrics are enabled by default
jmx-enabled = true
}
metric{
tick-interval = 1 second
filters{
akka-actor {
includes = [ "LolcatActorSystem/user/*", "LolcatActorSystem/user/serviceActor", "LolcatActorSystem/user/serviceActor/*" ]
excludes = [ ]
}
akka-dispatcher {
includes = [ "LolcatActorSystem/akka.actor.default-dispatcher" ]
}
trace {
includes = [ "**" ]
excludes = [ ]
}
}
}
# ~~~~~~ StatsD configuration ~~~~~~~~~~~~~~~~~~~~~~~~
statsd {
# Hostname and port in which your StatsD is running. Remember that StatsD packets are sent using UDP and
# setting unreachable hosts and/or not open ports wont be warned by the Kamon, your data wont go anywhere.
hostname = "127.0.0.1"
port = 60001
# Interval between metrics data flushes to StatsD. It's value must be equal or greater than the
# kamon.metrics.tick-interval setting.
flush-interval = 1 second
# Max packet size for UDP metrics data sent to StatsD.
max-packet-size = 1024 bytes
# Subscription patterns used to select which metrics will be pushed to StatsD. Note that first, metrics
# collection for your desired entities must be activated under the kamon.metrics.filters settings.
subscriptions {
histogram = [ "**" ]
min-max-counter = [ "**" ]
gauge = [ "**" ]
counter = [ "**" ]
trace = [ "**" ]
trace-segment = [ "**" ]
akka-actor = [ "**" ]
akka-dispatcher = [ "**" ]
akka-router = [ "**" ]
system-metric = [ "**" ]
http-server = [ "**" ]
}
report-system-metrics = true
simple-metric-key-generator {
# Application prefix for all metrics pushed to StatsD. The default namespacing scheme for metrics follows
# this pattern:
# application.host.entity.entity-name.metric-name
application = "lolcatServer"
}
}
}
我的配置中是否做了一些本质上错误的操作? 我很感激任何帮助,因为我真的不知道导致问题的原因。
谢谢!