Php Sdk Query Stats FS

Hello,

Im actually doing a script that send a daoly report on the cluster.
Im looking for information about the fs.
With the information I have here what i was imaging:

$client = ClientBuilder::create()->setHosts(self::ElkClustIp)->build();
$params= array('fs');
$chk = $client->nodes()->stats($params);

but i'm meeting an exception:
""0" is not a valid parameter. Allowed parameters are "client", "completion_fields", "custom", "fielddata_fields", "fields", "filter_path", "groups", "human", "human", "include_segment_file_sizes", "level", "types"

I have found another way to access to these infos but from what I'me reading of the source file i was supposed to correctly using it. If ever you have tips to allow me the filtering the fs entries of the stats with the sdk i would be insterested in!

Regards.

Sdk Installed with composer:
"require": {
.....
"elasticsearch/elasticsearch": "~5.0"
}

Version:
"version" : {
"number" : "5.1.1",
"build_hash" : "5395e21",
"build_date" : "2016-12-06T12:36:15.409Z",
"build_snapshot" : false,
"lucene_version" : "6.3.0"
},

metric is the parameter name you're looking for:

$client = ClientBuilder::create()->setHosts(self::ElkClustIp)->build();
$params= [
  'metric' => 'fs'
];
$chk = $client->nodes()->stats($params);

Hello

It works, thanks a lot.

Regards.

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