Anybody had any luck moving from Graphite to InfluxDB? If so, are you a wizard?

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. Sensu InfluxDB 0.9 UDP Line Protocol · GitHub

···

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

···

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

It sounds like it is executing that file "as is" (like a shell script)

Add a she-bang to the right ruby?

···

On Mon, Sep 14, 2015 at 12:47 PM, Adam Stracener <adamstracener@gmail.com> wrote:

I don't know what I'm doing wrong here.
Getting an error in the logs that it can't open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you're using Influx 0.9, you can send the data using the line protocol.
I had gotten it working through a regular Ruby handler but with only 40
servers it was starting to crush the Sensu server. With the UDP protocol
load is practically non-existent on the Sensu server. Here's a gist of what
I'm using. It consists of a mutator to get the data in the right format and
a udp handler. Sensu InfluxDB 0.9 UDP Line Protocol · GitHub

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I'm trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?
I've tried using GitHub - seegno/sensu-influxdb-extension: A sensu handler for sending metrics to influxdb
But I'm having no luck with metrics getting into Influx.

Place the file in /etc/sensu/extensions and try again.

···

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamstracener@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

···

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

Also want to add that I am getting metrics from both collectd and graphite modules when i enable them… just nothing from the UDP port.
Not sure it matters but Sensu and InfluxDB are on different servers within AWS.

···

On Tuesday, September 15, 2015 at 11:53:16 AM UTC-5, Adam Stracener wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

···

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamstracener@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

···

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

I took https://github.com/sensu-plugins/sensu-plugins-influxdb/blob/master/bin/metrics-influxdb.rb and modified it to suit my needs. This conversation reminded me of the need to submit a pull request to have this included there.

That’s looks about how they should come in according to what I have. If you want to have the ‘.’ separation you can remove the gsub! call. I do this because I want to enforce the host value. I haven’t gotten around to tailoring it more specifically for some other cases such as using other naming schemes. You can get the original prefix by taking m[0].split('.', 2)[0]

···

On Tue, Sep 15, 2015 at 12:57 PM, Adam Stracener adamstracener@gmail.com wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

Are you using the community sensu plugins to pull metrics? If so are you customizing the schema that the plugin outputs?

···

On Tuesday, September 15, 2015 at 1:29:34 PM UTC-5, Steve V wrote:

I took https://github.com/sensu-plugins/sensu-plugins-influxdb/blob/master/bin/metrics-influxdb.rb and modified it to suit my needs. This conversation reminded me of the need to submit a pull request to have this included there.

That’s looks about how they should come in according to what I have. If you want to have the ‘.’ separation you can remove the gsub! call. I do this because I want to enforce the host value. I haven’t gotten around to tailoring it more specifically for some other cases such as using other naming schemes. You can get the original prefix by taking m[0].split('.', 2)[0]

On Tue, Sep 15, 2015 at 12:57 PM, Adam Stracener adamst...@gmail.com wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

I am using a number of plugins from github.com/sensu-plugins. To this point I haven’t customized the schema much. When I do I’ll probably modify then line protocol code a bit.

···

On Tue, Sep 15, 2015 at 4:17 PM, Adam Stracener adamstracener@gmail.com wrote:

Are you using the community sensu plugins to pull metrics? If so are you customizing the schema that the plugin outputs?

On Tuesday, September 15, 2015 at 1:29:34 PM UTC-5, Steve V wrote:

I took https://github.com/sensu-plugins/sensu-plugins-influxdb/blob/master/bin/metrics-influxdb.rb and modified it to suit my needs. This conversation reminded me of the need to submit a pull request to have this included there.

That’s looks about how they should come in according to what I have. If you want to have the ‘.’ separation you can remove the gsub! call. I do this because I want to enforce the host value. I haven’t gotten around to tailoring it more specifically for some other cases such as using other naming schemes. You can get the original prefix by taking m[0].split('.', 2)[0]

On Tue, Sep 15, 2015 at 12:57 PM, Adam Stracener adamst...@gmail.com wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

You can use Graphite influxdb plugin and Sensu Handler see http://develify.com/sensu-metrics-to-graphite-with-tcp-handler/

Another option If you are using Influxdb 0.8.xxx you can use this GitHub - jcmartins/sensu-influxdb-extension: A sensu handler for sending metrics to influxdb

regards

Joao Martins

···

Em quinta-feira, 17 de setembro de 2015 12:12:20 UTC-3, Steve V escreveu:

I am using a number of plugins from github.com/sensu-plugins. To this point I haven’t customized the schema much. When I do I’ll probably modify then line protocol code a bit.

On Tue, Sep 15, 2015 at 4:17 PM, Adam Stracener adamst...@gmail.com wrote:

Are you using the community sensu plugins to pull metrics? If so are you customizing the schema that the plugin outputs?

On Tuesday, September 15, 2015 at 1:29:34 PM UTC-5, Steve V wrote:

I took https://github.com/sensu-plugins/sensu-plugins-influxdb/blob/master/bin/metrics-influxdb.rb and modified it to suit my needs. This conversation reminded me of the need to submit a pull request to have this included there.

That’s looks about how they should come in according to what I have. If you want to have the ‘.’ separation you can remove the gsub! call. I do this because I want to enforce the host value. I haven’t gotten around to tailoring it more specifically for some other cases such as using other naming schemes. You can get the original prefix by taking m[0].split('.', 2)[0]

On Tue, Sep 15, 2015 at 12:57 PM, Adam Stracener adamst...@gmail.com wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.

https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

I’m trying to get this running as well with the udp line protocol handler… I have got sensu outputting to influxdb, however, there’s no data passing… influxdb is seeing 0 length udp packets and the debug log has this:

{“timestamp”:“2015-09-27T00:49:54.915916+0000”,“level”:“debug”,“message”:“handling event”,“event_data”:“”,“handler”:{“type”:“udp”,“mutator”:“influxdb_line_protocol”,“socket”:{“host”:“influxdb1”,“port”:8089},“name”:“influxdb_udp”}}

It looks like event_data is not getting populated. Any idea why that would happen?

Here is one of my check definitions:

“cpu_util”: {

“command”: “/etc/sensu/plugins/sensu_community_plugins/system/check-cpu.rb”,

“type”: “metric”,

“subscribers”: [

“linux”

],

“interval”: 60,

“handlers”: [

“metrics”

]

},

···


James Ochs

On September 15, 2015 at 1:57:23 PM, Adam Stracener (adamstracener@gmail.com) wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.


https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler.
https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Ok, I figured it out… the check scripts (and I was on some pretty old versions as well) don’t seem to put out info in the format that the handler wants them, the metrics checks work as expected.

DND submitted it as PR# 10 on sensu-plugins-influxdb… I vote it gets included :wink:

Thanks DND!

···


James Ochs

On September 26, 2015 at 8:54:56 PM, James Ochs (jochs@froody.org) wrote:

I’m trying to get this running as well with the udp line protocol handler… I have got sensu outputting to influxdb, however, there’s no data passing… influxdb is seeing 0 length udp packets and the debug log has this:

{“timestamp”:“2015-09-27T00:49:54.915916+0000”,“level”:“debug”,“message”:“handling event”,“event_data”:“”,“handler”:{“type”:“udp”,“mutator”:“influxdb_line_protocol”,“socket”:{“host”:“influxdb1”,“port”:8089},“name”:“influxdb_udp”}}

It looks like event_data is not getting populated. Any idea why that would happen?

Here is one of my check definitions:

“cpu_util”: {

“command”: “/etc/sensu/plugins/sensu_community_plugins/system/check-cpu.rb”,

“type”: “metric”,

“subscribers”: [

“linux”

],

“interval”: 60,

“handlers”: [

“metrics”

]

},

James Ochs

On September 15, 2015 at 1:57:23 PM, Adam Stracener (adamstracener@gmail.com) wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.


https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler.
https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

I’ve added the PR (slightly modified). I still need to fix the comment regarding how to use it, and I need to test it more.

···

On Tuesday, 29 September 2015 12:48:52 UTC+1, James Ochs wrote:

Ok, I figured it out… the check scripts (and I was on some pretty old versions as well) don’t seem to put out info in the format that the handler wants them, the metrics checks work as expected.

DND submitted it as PR# 10 on sensu-plugins-influxdb… I vote it gets included :wink:

Thanks DND!


James Ochs

On September 26, 2015 at 8:54:56 PM, James Ochs (jo...@froody.org) wrote:

I’m trying to get this running as well with the udp line protocol handler… I have got sensu outputting to influxdb, however, there’s no data passing… influxdb is seeing 0 length udp packets and the debug log has this:

{“timestamp”:“2015-09-27T00:49:54.915916+0000”,“level”:“debug”,“message”:“handling event”,“event_data”:“”,“handler”:{“type”:“udp”,“mutator”:“influxdb_line_protocol”,“socket”:{“host”:“influxdb1”,“port”:8089},“name”:“influxdb_udp”}}

It looks like event_data is not getting populated. Any idea why that would happen?

Here is one of my check definitions:

“cpu_util”: {

“command”: “/etc/sensu/plugins/sensu_community_plugins/system/check-cpu.rb”,

“type”: “metric”,

“subscribers”: [

“linux”

],

“interval”: 60,

“handlers”: [

“metrics”

]

},

James Ochs

On September 15, 2015 at 1:57:23 PM, Adam Stracener (adamst...@gmail.com) wrote:

I got it! i’m getting metrics holy crap! Why was that so hard??
Where did you get that file btw?

Not sure they are coming in correctly, so i guess i’ll figure out how to fix that.

On Tuesday, September 15, 2015 at 12:01:16 PM UTC-5, Steve V wrote:

It is both, but because it’s an extension I believe the proper place for it is in the extensions dir. No shebang or anything should be needed . if you’ve already done that try changing your log level to debug and see what else you get in there. It should give you some kind of indication what’s wrong when it attempts to load it at the start.

On Sep 15, 2015 11:53 AM, “Adam Stracener” adamst...@gmail.com wrote:

Is it an extention or a mutator?

I thought the missing she-bang to ruby was wrong so i did put that in.

But I never get any data

{“timestamp”:“2015-09-15T16:50:42.192681+0000”,“level”:“warn”,“message”:“loading extension file”,“file”:“/etc/sensu/extensions/influxdb_line_protocol.rb”}

{“timestamp”:“2015-09-15T16:50:45.564515+0000”,“level”:“warn”,“message”:“loading config file”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”}

{“timestamp”:“2015-09-15T16:33:13.205046+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/mutators/influx_line_protocol.json”,“changes”:{“mutators”:{“influxdb_line_protocol”:[null,{“command”:“influxdb_line_protocol.rb”}]}}}

{“timestamp”:“2015-09-15T16:50:45.562958+0000”,“level”:“warn”,“message”:“config file applied changes”,“file”:“/etc/sensu/conf.d/handlers/handler-influxdb_udp.json”,“changes”:{“handlers”:{“influxdb_udp”:[null,{“type”:“udp”,“socket”:{“host”:“ip-10-0-0-100”,“port”:8090},“mutator”:“influxdb_line_protocol”}]}}}

{“timestamp”:“2015-09-15T16:34:43.933053+0000”,“level”:“info”,“message”:“publishing check result”,“payload”:{“client”:“Sensu_Server”,“check”:{“handlers”:[“metrics”],“command”:“metrics-sqs.rb -a :::aws.access::: -k :::aws.secret::: -q dev-local-inbox”,“type”:“metric”,“interval”:5,“publish”:true,“standalone”:true,“name”:“Production_SQS-Dev”,“issued”:1442334883,“executed”:1442334883,“duration”:0.679,“output”:“aws.sqs.queue.dev_local_inbox.message_count 2 1442334883\n\n”,“status”:0}}}

On Monday, September 14, 2015 at 9:31:52 PM UTC-5, Steve V wrote:

Place the file in /etc/sensu/extensions and try again.

On Mon, Sep 14, 2015 at 2:47 PM, Adam Stracener adamst...@gmail.com wrote:

I don’t know what I’m doing wrong here.
Getting an error in the logs that it can’t open the Mutator.


https://gist.github.com/NeckBeardPrince/b7617df63dee371cac3e

On Friday, September 11, 2015 at 6:22:08 PM UTC-5, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler.
https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

Hello Steve,

There is something I didn’t get.

I added the mutator file (influxdb_line_protocol.rb**)** into the extensions dir, I configured the handler in UDP protocol, I restarted the sensu-server service but I don’t see anything in the sensu log file even in debug mode.

But actually this is not the problem, what I don’t understand is that when I make a “nc -u -l 8086” on the influxdb server (it’s a docker container) I clearly see the metrics well parsed but nothing into the influxdb database.

Thank you for your help and your time.

···

Le vendredi 11 septembre 2015 16:22:08 UTC-7, Steve V a écrit :

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

It won't come through on 8086. That's the influx http port. Did you
enable and configure the UDP section in influx's config? I think the
default is port 8090 once enabled.

Also, you are correct, nothing will show in the sensu logs.

···

On Fri, Dec 18, 2015 at 6:58 PM, Adel Zemouri <adel.zemouriii@gmail.com> wrote:

Hello Steve,

There is something I didn't get.
I added the mutator file (influxdb_line_protocol.rb) into the extensions
dir, I configured the handler in UDP protocol, I restarted the sensu-server
service but I don't see anything in the sensu log file even in debug mode.
But actually this is not the problem, what I don't understand is that when I
make a "nc -u -l 8086" on the influxdb server (it's a docker container) I
clearly see the metrics well parsed but nothing into the influxdb database.

Thank you for your help and your time.

Le vendredi 11 septembre 2015 16:22:08 UTC-7, Steve V a écrit :

If you're using Influx 0.9, you can send the data using the line protocol.
I had gotten it working through a regular Ruby handler but with only 40
servers it was starting to crush the Sensu server. With the UDP protocol
load is practically non-existent on the Sensu server. Here's a gist of what
I'm using. It consists of a mutator to get the data in the right format and
a udp handler. Sensu InfluxDB 0.9 UDP Line Protocol · GitHub

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I'm trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?
I've tried using GitHub - seegno/sensu-influxdb-extension: A sensu handler for sending metrics to influxdb
But I'm having no luck with metrics getting into Influx.

Thank you very much !

Everything is working. I forgot to configure the UDP section in influx’s config :slight_smile:

···

Le vendredi 18 décembre 2015 17:26:36 UTC-8, Steve V a écrit :

It won’t come through on 8086. That’s the influx http port. Did you
enable and configure the UDP section in influx’s config? I think the
default is port 8090 once enabled.

Also, you are correct, nothing will show in the sensu logs.

On Fri, Dec 18, 2015 at 6:58 PM, Adel Zemouri adel.ze...@gmail.com wrote:

Hello Steve,

There is something I didn’t get.
I added the mutator file (influxdb_line_protocol.rb) into the extensions
dir, I configured the handler in UDP protocol, I restarted the sensu-server
service but I don’t see anything in the sensu log file even in debug mode.
But actually this is not the problem, what I don’t understand is that when I
make a “nc -u -l 8086” on the influxdb server (it’s a docker container) I
clearly see the metrics well parsed but nothing into the influxdb database.

Thank you for your help and your time.

Le vendredi 11 septembre 2015 16:22:08 UTC-7, Steve V a écrit :

If you’re using Influx 0.9, you can send the data using the line protocol.
I had gotten it working through a regular Ruby handler but with only 40
servers it was starting to crush the Sensu server. With the UDP protocol
load is practically non-existent on the Sensu server. Here’s a gist of what
I’m using. It consists of a mutator to get the data in the right format and
a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?
I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.

Hi Steve,

I’m trying your code.

However it’s not working for me

···

On Saturday, September 12, 2015 at 4:52:08 AM UTC+5:30, Steve V wrote:

If you’re using Influx 0.9, you can send the data using the line protocol. I had gotten it working through a regular Ruby handler but with only 40 servers it was starting to crush the Sensu server. With the UDP protocol load is practically non-existent on the Sensu server. Here’s a gist of what I’m using. It consists of a mutator to get the data in the right format and a udp handler. https://gist.github.com/dnd/0acda0bbeae530e24863

On Friday, September 11, 2015 at 10:46:33 AM UTC-5, Adam Stracener wrote:

I’m trying to move from Graphite to InfluxDB for metrics recording.
What are you using to send metrics to InfluxDB?

I’ve tried using https://github.com/seegno/sensu-influxdb-extension

But I’m having no luck with metrics getting into Influx.