To retrieve complete metricbeat data from the elasticsearch

I want to get full metricbeat data from elasticsearch in json through API.

I tried with - /metricbeat*/_search
but it is not giving complete data.

Please suggest.

You will need to use Scroll API | Elasticsearch Guide [7.14] | Elastic for that.

ok thanks, it worked.
1 more query- I want to retrieve cpu usage for a particular host agent.
I tried like this in request Body -

 "query": {
        "match": {
            "hostname": "sd-**.net"

Response I received -

    "took": 0,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    "hits": {
        "total": {
            "value": 0,
            "relation": "eq"
        "max_score": null,
        "hits": []

Please suggest..

Hi mark,
please guide..

You might want to try Query string query | Elasticsearch Guide [7.14] | Elastic with the wildcard options.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.