Skip to content
cyrille-leclerc edited this page Apr 13, 2013 · 1 revision

Send metrics to Librato monitoring metrics service.

Counter and Gauge metrics configuration

Librato distinguishes 2 types of metrics: counter (ever increasing values like 'request count') and gauge (fluctuating values like 'pool size'). The metric type is defined the the jmxtrans query configuration specifying type for the given attribute. If no type is defined, metric are seen as counters.

Sample query configuration with gauge and counter metrics:

{
  "objectName": "java.lang:type=OperatingSystem",
  "attributes": [
      {
          "name": "SystemLoadAverage",
          "type":"gauge"
      },
      {
          "name": "ProcessCpuTime",
          "type":"counter"
      }
  ]
}

Settings

  • url: Librato server URL. Optional, default value: https://metrics-api.librato.com/v1/metrics.
  • user: Librato user. Mandatory.
  • token: Librato token. Mandatory.
  • libratoApiTimeoutInMillis: read timeout of the calls to Librato HTTP API. Optional, default value: 1000.
  • enabled: flag to enable/disable the writer. Optional, default value: true.
  • source: Librato . Optional, default value: #hostname# (the hostname of the server).

Sample configuration

"outputWriters": [
    {
        "@class": "org.jmxtrans.embedded.output.LibratoWriter",
        "settings": {
            "username": "${librato.username:}",
            "token": "${librato.token:}",
            "enabled": "${librato.enabled:false}"
        }
    }
]

Note: this sample uses default blank values for username and token to allow "zero config" setup on dev environment (by default, "enabled": false).