1

Im trying to monitor my scala akka app in the docker-grafana-graphite using kamon. I can see the actors stats in the Kamon Dashboard but I can't see any data in the System dashboard (JVM & OS)

Here is my build.sbt file:

    import com.typesafe.sbt.SbtAspectj._

    name := """kinneret"""

    scalaVersion := "2.11.6"

    resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

    val akkaVersion = "2.3.9"
    val kamonVersion = "0.3.4"

    libraryDependencies ++= Seq(
      "com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
      "com.typesafe.akka" %% "akka-actor" % akkaVersion,
      "io.kamon" %% "kamon-core" % kamonVersion,
      "io.kamon" %% "kamon-statsd" % kamonVersion,
      "io.kamon" %% "kamon-play" % kamonVersion,
      "io.kamon" %% "kamon-log-reporter" % kamonVersion,
      "io.kamon" %% "kamon-system-metrics" % kamonVersion,
      "org.aspectj" % "aspectjweaver" % "1.8.1"
    )

aspectjSettings

javaOptions <++= AspectjKeys.weaverOptions in Aspectj

fork in run := true

this is my configuration file:

akka {
  loglevel = INFO

  extensions = ["kamon.metric.Metrics", "kamon.statsd.StatsD",  "kamon.system.SystemMetrics", "kamon.logreporter.LogReporter"]
}

# Kamon Metrics
# ~~~~~~~~~~~~~~

kamon {
   metrics {
    filters = [
      {
        actor {
          includes = [ "*"]
          excludes = []
        }
      },
      {
        trace {
          includes = [ "*" ]
          excludes = []
        }
      }
    ]
  }

  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  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 = "192.168.59.103"
    port = 8125

    # 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.
    includes {
      actor       = [ "*" ]
      trace       = [ "*" ]
      dispatcher  = [ "*" ]
    }

    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 = "kinneret"
    }
  }
}

I'm using Mac(Yosemite) and i'm running docker using boot2docker. boot2docker ip is 192.168.59.103.

What do i need to add in order to see the OS & JVM stats in the docker dashboard?

Thanks.

ebl
  • 115
  • 1
  • 9

1 Answers1

2

Comparing your config setup to mine which works, I think you are missing the following config property:

kamon {
    ...
    statsd {
        ...
        report-system-metrics = true
        ...
    }
}
nickebbitt
  • 1,711
  • 1
  • 13
  • 13
  • @ebl could you please help me in setting up statsD. I am able to setup datadog as backend for graphite is just not working. Its already showing some random data in already existing kamon dashborad. Could you please clearify, do I need to use the same default kamon dashboard or create a new one, if so how to add data source? – Vinay Sep 08 '15 at 09:31
  • 1
    @Vinay I've added some notes to the Kamon user group which may help: https://groups.google.com/forum/#!topic/kamon-user/gspr7tfWT7c – nickebbitt Sep 08 '15 at 09:45
  • @nickebbitt Thanks for sharing url. I added localhost:8000 as data source url. my code isn't emitting any data even though graphana dashboard is showing some random values. how to verify them? – Vinay Sep 08 '15 at 10:54
  • The random values are from the test/demo data source, make sure you choose your new data source that you just created for your dashboards – nickebbitt Sep 08 '15 at 11:07
  • @nickebbitt I got it working now, thank you so much.:) – Vinay Sep 08 '15 at 11:28
  • @Vinay no problem, if you want to separate this out to a separate question I'd be happy to answer it as the solution is a bit hidden in these comments otherwise – nickebbitt Sep 08 '15 at 11:30
  • @nickebbitt I have added separate question here http://stackoverflow.com/questions/32459582/how-to-set-up-statsd-along-with-grafana-graphite-as-backend-for-kamon, you can answer it, though I have found the solution and got my things working. I added it because it might be helpful for someone else who might be struggling or may struggle in future and come here by goggle search. – Vinay Sep 08 '15 at 13:52