Hi -
I have a setup with Elastic Search, Kibana and MetricBeat running with 5.1.1 version on my Windows-7 machine.
Am trying to create a test case to check CPU rate at the API level; using Ruby elasticsearch-5.0.0 gem.
I have installed required gem on my machine and trying to connect to my cluster, which I couldn't proceed up.
Am getting the unauthorized error, may be because, my set-up is installed with x-pack.
Could you please let me know how do I connect to the Elastic Search cluster and query the CPU usage from API level (i.e. ealsticsearch.gem).
this doesn't look like a (HTTP) response to me but rather a debugger view of the client object.
You could verify it by simply retrieving the version (my Ruby is a bit rusty ;)):
puts client.info()["version"]["number"]
You should see 5.1.1. in your terminal.
I'm not familiar with the document schema. I think you should ask this question in a Beats forum rather than the Elasticsearch forum. Can you please open a new topic there?
Hi @danielmitterdorfer:
Yes, You are absolutely right, I've got 5.1.1 as version on my IRB console.
So, I believe, I've got connected to the cluster. I'd like to know, how do we query for the cpu usage of a node.
Thank you very much for your help.
My Scenario is: I've to check the CPU Usage of a windows server, to make sure continue the Test cases execution
If it goes beyond the threshold, I'd abort the Test case execution.
I would be able to check CPU only via API (Not with Kibana). So I tried using Ruby gem (elasticsearch-5.1.1), As I mentioned in my previous posts, Am able to connect to the cluster and able to get the version.
I'd need a help in querying the data to get the CPU Usage. Please let me know if am unclear. Thanks !
Hi @ruflin-
I have this query so far (GET metricbeat-2017.01.09/metricsets/_search?q=cpu) .
I'd like to know how to run the GET queries with the Ruby Client Gem. Could you please help me out. Thanks !
Am having hard time to execute the below query with the examples I had gone thru, Could you please help with executing the below query using Ruby Client
For the error: You must paste it here in text not screenshot, otherwise it is very hard to read.
I'm not really an expert on Ruby or the es client, but I strongly recommend you to either check some examples online or check the source code which has good docs inside.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.