# Solved: Dell EMC REST API calls with Logstash plugin http\_poller

**URL:** <https://discuss.elastic.co/t/solved-dell-emc-rest-api-calls-with-logstash-plugin-http-poller/245283>\
**Category:** Logstash\
**Created:** [August 17, 2020, 4:38pm UTC](https://discuss.elastic.co/t/solved-dell-emc-rest-api-calls-with-logstash-plugin-http-poller/245283 "2020-08-17T16:38:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Downey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ryan_downey/32/35987_2.png) [@Ryan\_Downey](https://discuss.elastic.co/u/Ryan_Downey)\
**Post date:** [August 17, 2020, 4:38pm UTC](https://discuss.elastic.co/t/solved-dell-emc-rest-api-calls-with-logstash-plugin-http-poller/245283/1 "2020-08-17T16:38:56Z")

</div>

If anyone is looking to pull performance metrics from the Dell EMC Unity Unisphere servers that they're running I hope that this saves you some time.

Useful References:

> **[REST API with DellEMC Storage](https://vexpose.blog/portfolio/rest-api-with-dellemc-storage/)**
>
> This post lists all the posts which are published under the “REST API and DellEMC Storage” series. REST API and DellEMC Storage Part 1 – XtremIOREST API and DellEMC Storage Part 2 – PowerMaxR…

  

> **[REST API and DellEMC Storage Part 3 – Unity](https://vexpose.blog/2020/02/25/rest-api-and-dellemc-storage-part-3-unity/)**
>
> This blog post is 3rd part of REST API with DellEMC Storage blog series. In the first part of this blog series, we discussed what is REST API and different usage options Second part was about manag…

  
Dell Unisphere® Management REST API Programmer's Guide  

> **[docu69331.pdf](https://www.dellemc.com/en-me/collaterals/unauth/technical-guides-support-information/products/storage/docu69331.pdf)**
>
> 428.40 KB

  
Unisphere® Management REST API Reference Guide  

> **[docu91031.pdf](https://www.dellemc.com/en-us/collaterals/unauth/quick-reference-guides/products/storage/docu91031.pdf)**
>
> 4.32 MB

  
Dell EMC Unity Performance Metrics  

> **[h15161-dell\_emc\_unity-performance\_metrics.pdf](https://www.dellemc.com/resources/en-us/asset/white-papers/products/storage/h15161-dell_emc_unity-performance_metrics.pdf)**
>
> 1630.38 KB

Errors that I was running into:

- **"Unable to verify first certifciate"** This may be being bypassed in Postman due to the settings but the Dell cert was needed by Logstash in order for this to work.
- "error" =\> "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

Testing in Postman and following the directions from the vexpose.blog links. This is what I ended up with in the headers section. Auth section was, Basic and then the Dell Unisphere un/pass.

 ![headers_code](https://us1.discourse-cdn.com/elastic/original/3X/1/6/16485a85ef67af9f5bcad09ee315a2b0c917b6db.jpeg)

If you click on the "Code" button in the upper right hand corner of that section you get the headers and the link that you'll have to use in with the http\_poller plugin.

```auto
curl --location --request GET 'https://xx.xx.xx.xx/api/types/metricValue/instances?filter=path%20eq%20%22sp.*.cpu.summary.utilization%22' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-EMC-REST-CLIENT: true' \
--header 'Authorization: Basic TW9uaXRvcmluZ1VzZXI6U3VtbWVyMjAyMCQk' \
--header 'Cookie: MOD_AUTH_CAS_S=d62275a517efc66cc448f0a2aa46006e0df23e59; mod_sec_emc=value2&a619ae23d32a7c58d12182558a3557493b481271e8597cc4085b7ac8c0e46ebb&value1&5b9HL1RpzotPB%2FWjMI4XiWFaKRxgC%2FFc4dCFdne8lqQ%3D%0A&value3&1'

```

Logstash config:

```auto
input {
  http_poller {
    urls => {
      test1 => {
        # Supports all options supported by ruby's Manticore HTTP client
        method => get
        user => "<dell_emc_username>"
        password => "<password>"
        url => "https://xx.xx.xx.xx/api/types/metricValue/instances?filter=path%20eq%20%22sp.*.cpu.summary.utilization%22"
        headers => {
          Accept => "application/json"
          "Content-Type" => "application/json"
          "X-EMC-REST-CLIENT" => true
        }
     }
    }
    request_timeout => 60
    # Supports "cron", "every", "at" and "in" schedules by rufus scheduler
    schedule => { cron => "* * * * * UTC"}
    codec => "json"
    cacert => "<path_to_website_cert>"
  }
}

output {
  elasticsearch {
    hosts => ["https://abc.com:9243"]
    manage_template => false
    user => <username>
    password => <password>
    ssl => true
    cacert => "<path_to_elastic_cert"
    index => "dell-emc"
  }
}

```

---

<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:** [September 14, 2020, 4:39pm UTC](https://discuss.elastic.co/t/solved-dell-emc-rest-api-calls-with-logstash-plugin-http-poller/245283/2 "2020-09-14T16:39:10Z")

</div>

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