# Logstash Plugin

**URL:** https://discuss.elastic.co/t/logstash-plugin/323120
**Category:** Logstash
**Created:** [January 13, 2023, 10:59am UTC](https://discuss.elastic.co/t/logstash-plugin/323120 "2023-01-13T10:59:15Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![anik-27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anik-27/32/110233_2.png) [@anik-27](https://discuss.elastic.co/u/anik-27)
#### Post date: [January 13, 2023, 10:59am UTC](https://discuss.elastic.co/t/logstash-plugin/323120/1 "2023-01-13T10:59:15Z")

</div>

Hello friends,  
Is this possible to write a Logstash plugin for fetching data in Javascript just as we can do with Java ?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [January 13, 2023, 11:54am UTC](https://discuss.elastic.co/t/logstash-plugin/323120/2 "2023-01-13T11:54:21Z")

</div>

No it is not, you can write a Logstash plugin in [ruby](https://www.elastic.co/guide/en/logstash/current/contributing-to-logstash.html) or [java](https://www.elastic.co/guide/en/logstash/current/contributing-java-plugin.html).

---

<div class="post-metadata">

### Author: ![anik-27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anik-27/32/110233_2.png) [@anik-27](https://discuss.elastic.co/u/anik-27)
#### Post date: [January 13, 2023, 1:46pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/3 "2023-01-13T13:46:45Z")

</div>

Hi @leandrojmp, Thanks for your response  
I want to fetch some metrics data from the Vrops(VMware) api that includes following steps -

1. Make a post request to get the authentication token with login credentials
2. Use that authentication token with a GET request to get the the metrics data of various VMs

Is this possible to achieve with Logstash, and If yes than how can I achieve this ?

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [January 13, 2023, 3:42pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/4 "2023-01-13T15:42:10Z")

</div>

It is not possible, the logstash has a [http\_poller](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html#plugins-inputs-http_poller) plugin, but this plugin needs to be configured with the authentication token, it cannot make a request to get the authentication token.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [January 13, 2023, 3:50pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/5 "2023-01-13T15:50:12Z")

</div>

How about to use Filebeat/EA and ingestion?

---

<div class="post-metadata">

### Author: ![anik-27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anik-27/32/110233_2.png) [@anik-27](https://discuss.elastic.co/u/anik-27)
#### Post date: [January 13, 2023, 3:57pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/6 "2023-01-13T15:57:02Z")

</div>

Okay got it !  
Is there any work around to achieve this with logstash ?

---

<div class="post-metadata">

### Author: ![anik-27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anik-27/32/110233_2.png) [@anik-27](https://discuss.elastic.co/u/anik-27)
#### Post date: [January 13, 2023, 3:57pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/7 "2023-01-13T15:57:47Z")

</div>

Can you please elaborate a little ?

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [January 13, 2023, 4:13pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/8 "2023-01-13T16:13:18Z")

</div>

Check [here](https://www.youtube.com/watch?v=zjw6bCxG_j4) and [here](https://www.youtube.com/watch?v=-wOvyubrHIM).

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [January 13, 2023, 5:25pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/9 "2023-01-13T17:25:38Z")

</div>

Also, there is a [workaround](https://discuss.elastic.co/t/http-poller-rest-api-authentication-token/246870/5). Might be useful.

---

<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: [February 10, 2023, 5:25pm UTC](https://discuss.elastic.co/t/logstash-plugin/323120/10 "2023-02-10T17:25:57Z")

</div>

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