# Php Sdk Query Stats FS

**URL:** <https://discuss.elastic.co/t/php-sdk-query-stats-fs/79046>\
**Category:** Elasticsearch\
**Created:** [March 17, 2017, 2:59pm UTC](https://discuss.elastic.co/t/php-sdk-query-stats-fs/79046 "2017-03-17T14:59:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregs](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@Gregs](https://discuss.elastic.co/u/Gregs)\
**Post date:** [March 17, 2017, 2:59pm UTC](https://discuss.elastic.co/t/php-sdk-query-stats-fs/79046/1 "2017-03-17T14:59:50Z")

</div>

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"  
},

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [March 21, 2017, 2:54pm UTC](https://discuss.elastic.co/t/php-sdk-query-stats-fs/79046/2 "2017-03-21T14:54:57Z")

</div>

`metric` is the parameter name you're looking for:

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

```

---

<div class="post-metadata">

**Author:** ![Gregs](https://avatars.discourse-cdn.com/v4/letter/g/bc79bd/32.png) [@Gregs](https://discuss.elastic.co/u/Gregs)\
**Post date:** [March 23, 2017, 9:17am UTC](https://discuss.elastic.co/t/php-sdk-query-stats-fs/79046/3 "2017-03-23T09:17:32Z")

</div>

Hello

It works, thanks a lot.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 20, 2017, 9:17am UTC](https://discuss.elastic.co/t/php-sdk-query-stats-fs/79046/4 "2017-04-20T09:17:35Z")

</div>

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