eksoverzero / newrelic_elasticsearch_agent

Elasticsearch monitoring through New Relic
MIT License
21 stars 14 forks source link

Undifined method error #1

Closed igoratencompass closed 11 years ago

igoratencompass commented 11 years ago

Hi,

I get the following error when starting the plugin:

[Fri Sep 20 00:03:41 UTC 2013] WARN: SSL is disabled by default when using Ruby 1.8.x [Fri Sep 20 00:03:41 UTC 2013] INFO: Using Ruby SDK version: 1.2.1 [Fri Sep 20 00:03:41 UTC 2013] INFO: Agent ElasticSearch is at version 0.0.1 [Fri Sep 20 00:03:41 UTC 2013] DEBUG: Start collecting agent data for poll cycle ERROR while gathering stats from http://localhost:9200: undefined method `empty?' for #URI::HTTP:0x7f7fb8c09560 [Fri Sep 20 00:03:41 UTC 2013] ERROR: Error occurred in poll cycle: can't convert nil into String [Fri Sep 20 00:03:41 UTC 2013] DEBUG: Finished collecting agent data for poll cycle [Fri Sep 20 00:03:41 UTC 2013] WARN: Component with name "db11-prod" and guid "com.secondimpression.newrelic-elasticsearch-agent" had no metrics [Fri Sep 20 00:03:41 UTC 2013] DEBUG: JSON payload: {"components":[{"name":"db11-prod","guid":"com.secondimpression.newrelic-elasticsearch-agent","metrics":{},"duration":60}],"agent":{"version":"0.0.1"}} [Fri Sep 20 00:03:42 UTC 2013] INFO: Gathered 0 statistics from 0 components

This is the manual run:

curl -s -S "http://localhost:9200/searches/_stats?pretty=true"

{ "ok" : true, "_shards" : { "total" : 10, "successful" : 10, "failed" : 0 }, "_all" : { "primaries" : { "docs" : { "count" : 30784, "deleted" : 0 },

and so on ...

I mean the connection is working for sure we can see the index above. Is the code using GET method in the call? I don't understand why would it be empty.

ruby -v

ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Thanks, Igor

igoratencompass commented 11 years ago

ruby -v

ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Sent from Samsung Mobile

-------- Original message -------- From: Steven Eksteen notifications@github.com Date:
To: eksoverzero/newrelic_elasticsearch_agent newrelic_elasticsearch_agent@noreply.github.com Cc: igorcatportland igorc@encompasscorporation.com Subject: Re: [newrelic_elasticsearch_agent] Undifined method error (#1)

Hi,

Can you please give me your Ruby version so I can try to replicate the error?

Thanks

Sent from MobileToaster

On 20 Sep 2013, at 2:08, igorcatportland notifications@github.com wrote:

Hi,

I get the following error when starting the plugin:

[Fri Sep 20 00:03:41 UTC 2013] WARN: SSL is disabled by default when using Ruby 1.8.x [Fri Sep 20 00:03:41 UTC 2013] INFO: Using Ruby SDK version: 1.2.1 [Fri Sep 20 00:03:41 UTC 2013] INFO: Agent ElasticSearch is at version 0.0.1 [Fri Sep 20 00:03:41 UTC 2013] DEBUG: Start collecting agent data for poll cycle ERROR while gathering stats from http://localhost:9200: undefined method `empty?' for #URI::HTTP:0x7f7fb8c09560 [Fri Sep 20 00:03:41 UTC 2013] ERROR: Error occurred in poll cycle: can't convert nil into String [Fri Sep 20 00:03:41 UTC 2013] DEBUG: Finished collecting agent data for poll cycle [Fri Sep 20 00:03:41 UTC 2013] WARN: Component with name "db11-prod" and guid "com.secondimpression.newrelic-elasticsearch-agent" had no metrics [Fri Sep 20 00:03:41 UTC 2013] DEBUG: JSON payload: {"components":[{"name":"db11-prod","guid":"com.secondimpression.newrelic-elasticsearch-agent","metrics":{},"duration":60}],"agent":{"version":"0.0.1"}} [Fri Sep 20 00:03:42 UTC 2013] INFO: Gathered 0 statistics from 0 components

This is the manual run:

curl -XGET "http://localhost:9200/searches/search/_empty?pretty=true" -s

{ "_index" : "searches20130626192742", "_type" : "search", "_id" : "_empty", "exists" : false }

Any idea?

Thanks, Igor

— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.