portertech / sensu-prom-mutator

Mutate Sensu Go event metrics into the Prometheus format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sensu Go Prometheus Mutator

TravisCI: TravisCI Build Status

The Sensu Go Prometheus Mutator is a Sensu Event Mutator which mutates Sensu Go Event metrics into to the Prometheus metric format. This mutator is intended to be used in combination with a TCP Event Handler to send metrics to a Sumo Logic collector.

This mutator turns this:

{
  "entity": "...",
  "metrics": {
    "handlers": [
      "sumologic"
    ],
    "points": [
      {
        "name": "sensu-go-sandbox.curl_timings.time_total",
        "tags": [
          {
            "name": "foo",
            "value": "42"
          }
        ],
        "timestamp": 1552506033,
        "value": 0.005
      },
      {
        "name": "sensu-go-sandbox.curl_timings.time_namelookup",
        "tags": [],
        "timestamp": 1552506033,
        "value": 0.004
      }
    ]
  },
  "timestamp": 1552506033
}

Into this:

sensu-go-sandbox.curl_timings.time_total{foo="42"} 0.005 1552506033000
sensu-go-sandbox.curl_timings.time_namelookup{} 0.004 1552506033000

About

Mutate Sensu Go event metrics into the Prometheus format

License:MIT License


Languages

Language:Go 100.0%