Skip to content

Instantly share code, notes, and snippets.

@paulmooring
Created July 1, 2014 22:28
Show Gist options
  • Save paulmooring/646bd54e4714ed238dc6 to your computer and use it in GitHub Desktop.
Save paulmooring/646bd54e4714ed238dc6 to your computer and use it in GitHub Desktop.
sensu-metric-relay config

The sensu-metric-relay extension starts up, and iniates a tcp connection to graphite, but no data ever gets sent and the queue always stays at 0. Relevant configs are below, the check is from the sensu-community-plugins and sensu-metric-relay is unmodified and pulled from master (at a95718c4c0dd7ecbd472cdec2926ca3496d217bb)

/etc/sensu/conf.d/config_relay.json:

{
  "relay": {
    "graphite": {
      "host": "192.168.112.14",
      "port": 2003
    }
  }
}

A check - cat /etc/sensu/conf.d/checks/vmstat-metrics.json:

{
  "checks": {
    "vmstat-metrics": {
      "command": "/var/opt/sensu/sensu-community-plugins/plugins/system/vmstat-metrics.rb",
      "handlers": [
        "relay"
      ],
      "subscribers": [
        "base"
      ],
      "interval": 60
    }
  }
}

From sensu-client.log:

{"timestamp":"2014-07-01T22:24:48.149433+0000","level":"info","message":"relay queue size for graphite: 0"}
...
{"timestamp":"2014-07-01T22:25:45.232777+0000","level":"info","message":"publishing check result","payload":{"client":"i-39959531","check":{"name":"vmstat-metrics","issued":1404253543,"command":"/var/opt/sensu/sensu-community-plugins/plugins/system/vmstat-metrics.rb","handlers":["relay"],"subscribers":["base"],"interval":60,"executed":1404253543,"output":"ip-192-168-112-21.vmstat.procs.waiting\t0\t1404253545\nip-192-168-112-21.vmstat.procs.uninterruptible\t0\t1404253545\nip-192-168-112-21.vmstat.memory.swap_used\t2296\t1404253545\nip-192-168-112-21.vmstat.memory.free\t332600\t1404253545\nip-192-168-112-21.vmstat.memory.buffers\t44824\t1404253545\nip-192-168-112-21.vmstat.memory.cache\t893800\t1404253545\nip-192-168-112-21.vmstat.swap.in\t0\t1404253545\nip-192-168-112-21.vmstat.swap.out\t0\t1404253545\nip-192-168-112-21.vmstat.io.received\t0\t1404253545\nip-192-168-112-21.vmstat.io.sent\t20\t1404253545\nip-192-168-112-21.vmstat.system.interrupts_per_second\t53\t1404253545\nip-192-168-112-21.vmstat.system.context_switches_per_second\t106\t1404253545\nip-192-168-112-21.vmstat.cpu.user\t1\t1404253545\nip-192-168-112-21.vmstat.cpu.system\t1\t1404253545\nip-192-168-112-21.vmstat.cpu.idle\t78\t1404253545\nip-192-168-112-21.vmstat.cpu.waiting\t0\t1404253545\n\n","status":0,"duration":1.518}}}

From sensu-server.log:

{"timestamp":"2014-07-01T22:08:41.389831+0000","level":"info","message":"loaded extension","type":"mutator","name":"metrics","description":"mutates metrics for relay to metric stores"}
{"timestamp":"2014-07-01T22:08:41.394602+0000","level":"info","message":"loaded extension","type":"handler","name":"relay","description":"Relay metrics via a persistent TCP connection"}
{"timestamp":"2014-07-01T22:09:41.687123+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:10:41.688353+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:11:41.689505+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:12:41.690638+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:13:41.691584+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:14:41.692455+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:15:41.693282+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:16:41.694015+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:17:41.694658+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:18:41.695023+0000","level":"info","message":"relay queue size for graphite: 0"}
{"timestamp":"2014-07-01T22:19:41.695458+0000","level":"info","message":"relay queue size for graphite: 0"}
@deepakhj
Copy link

deepakhj commented Mar 9, 2015

Did you ever figure this issue out? I see a commit on the repo that supposedly fixed it but I'm having the same exact issue.

@aimanparvaiz
Copy link

Any updates on this please?

@thesaadarshad
Copy link

still getting this issue. any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment