# Metrics-curl.rb output not sent to influxdb?

**URL:** <https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579>\
**Category:** Sensu Plugins\
**Created:** [January 13, 2020, 9:40pm UTC](https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579 "2020-01-13T21:40:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![billm](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@billm](https://discourse.sensu.io/u/billm)\
**Post date:** [January 13, 2020, 9:40pm UTC](https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579/1 "2020-01-13T21:40:54Z")

</div>

My check looks like this:

```auto
---
type: CheckConfig
api_version: core/v2
metadata:
  name: metrics
spec:
  command: "metrics-curl.rb -u https://thesite.com"
  proxy_entity_name: thesite.com
  round_robin: true
  publish: true
  interval: 30
  handlers:
  - plivo
  runtime_assets:
  - sensu-plugins/sensu-plugins-http
  - sensu/sensu-ruby-runtime
  subscriptions:
  - proxy
  output_metric_format: nagios_perfdata
  output_metric_handlers:
  - influxdb

```

I see what appear to be metrics in the event list:

```auto
  thesite.com thesite-metrics dc2e6cb14e16.curl_timings.time_total 0.179716 1578949159 0 false 2020-01-13 12:59:19 -0800 PST  
                                          dc2e6cb14e16.curl_timings.time_namelookup 0.008926 1578949159                                                                                                                                     
                                          dc2e6cb14e16.curl_timings.time_connect 0.019085 1578949159                                                                                                                                        
                                          dc2e6cb14e16.curl_timings.time_pretransfer 0.088613 1578949159                                                                                                                                    
                                          dc2e6cb14e16.curl_timings.time_redirect 0.000000 1578949159                                                                                                                                       
                                          dc2e6cb14e16.curl_timings.time_starttransfer 0.169122 1578949159                                                                                                                                  
                                          dc2e6cb14e16.curl_timings.http_code 200 1578949159                                                                                                                                                

```

but no data in influxdb. i have other checks using sensu/monotoring-plugins that are able to output metrics to influx, so the handler seems to be working correctly. Why isn’t this working?

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [January 13, 2020, 9:47pm UTC](https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579/2 "2020-01-13T21:47:00Z")

</div>

you have the metric format set wrong.  
that looks like graphite\_plaintext to me not nagios\_perfdata

[https://docs.sensu.io/sensu-go/latest/guides/extract-metrics-with-checks/#supported-output-metric-formats](https://docs.sensu.io/sensu-go/latest/guides/extract-metrics-with-checks/#supported-output-metric-formats)

---

<div class="post-metadata">

**Author:** ![billm](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@billm](https://discourse.sensu.io/u/billm)\
**Post date:** [January 13, 2020, 9:47pm UTC](https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579/3 "2020-01-13T21:47:37Z")

</div>

lol. Was just going to post about that and/or delete the post. looks like it should be graphite\_plaintext.

---

<div class="post-metadata">

**Author:** ![billm](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@billm](https://discourse.sensu.io/u/billm)\
**Post date:** [January 14, 2020, 6:27pm UTC](https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579/4 "2020-01-14T18:27:04Z")

</div>

Hey I have one more question about the influxdb handler.

Is there a way to name the measurement that’s created? It seems to be a randomized string.

Since I’m running dockerized, my queries all break when I restart the db and it creates a new measurement name. I have to go in and update all the queries to use the new string. It would be cool if I could specify that… somewhere.

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [January 14, 2020, 8:13pm UTC](https://discourse.sensu.io/t/metrics-curl-rb-output-not-sent-to-influxdb/1579/5 "2020-01-14T20:13:00Z")

</div>

its actual the check that is naming the measurements. In in the case of that check… its using the hostname of the running agent by default.

The `-s` scheme option lets you replace the prefix with anything you want.

using that option and then using token substitution refering to Sensu Agent labels/annotations you can make a reusable check that uses the scheme from the agent config.
