mallocator/Elasticsearch-Exporter

TypeError: Cannot read property 'num_docs' of undefined

fozcodes opened this issue · 3 comments

Hi Ravi,

I'm getting this error when I try to run the following command:

node exporter.js -a localhost -p 9200 -b 10.128.99.35 -p 9200

I can make curls to both nodes no problem. The error I get is:

Caught exception in Main process: TypeError: Cannot read property 'num_docs' of undefined
TypeError: Cannot read property 'num_docs' of undefined
at IncomingMessage. (/root/node_modules/elasticsearch-exporter/drivers/es.js:243:58)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)
Number of calls: 0
Fetched Entries: 0 documents
Processed Entries: 0 documents
Source DB Size: 0 documents

localhost: v 1.0.1
10.128.99.35: v 0.90.7

Apologies if there's something I'm missing. Thanks!

Hey Ian,

thanks for using the exporter. I'll try to look into the problem and I'm beginning to think that there must be something wrong with the 0.9x implementation of the tool. Unfortunately though I don't have that much time right now, so it might take a bit until I get this sorted out.

Only other thing you could include is how many nodes your cluster has and where the script is run from.

Thanks

Hi Ravi,

No worries - thanks for getting back. For now, I found another plugin that can do it, but I have to go index by index, which sucks, but what can you do.

I upgraded the second machine to 1.3.4, so now they're both on 1.3. Still getting the same issue.

To your other question - maybe that's the issue. Technically, these aren't the same cluster. They're in the same private network, but not on a connected cluster via ES settings. Machine A is just a single node with the entire group of indices on it - which is why I'm trying to do this, it's getting too big.

Right now, machine B is also just a single node as well.

Thanks again!

Closing this since the code base has changed so much it's not really related to 1.x versions anymore.