# Cannot export logs to logstash

**URL:** <https://community.auth0.com/t/cannot-export-logs-to-logstash/43794>\
**Category:** Get Help\
**Tags:** extensions, logstash\
**Created:** [May 29, 2020, 9:27am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794 "2020-05-29T09:27:50Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![KostyaZgara](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kostyazgara/32/21589_2.png) [@KostyaZgara](https://community.auth0.com/u/KostyaZgara)\
**Post date:** [May 29, 2020, 9:27am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/1 "2020-05-29T09:27:50Z")

</div>

Hi all! I have trouble with sending logs from auth0 to my logstash. I have checked the documentation, also have checked the community, but didn’t find any answers on my questions. Here my issue.

1. I have created pipeline with “HTTP” input  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/4/a48252271cf215d7fb302f97e4ef4b7d45629feb.png)
2. Set filter mutate  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/8/2878431f4e538ddc9904dd610faaacdd35fd7889.png)
3. And for the testing purpose set the output to “stdout”
4. Set all credentials and my logstash URL on the settings page of the extension.  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/d/6d7ad768c4464e1bb667b4c77438b325f7fe9b53.png)

In my dashboard, I see success exports [Screenshot by Lightshot](https://prnt.sc/s99spq) But don’t see any data in my stdout (also I have tried to set the output to elasticsearch, but situation the same, any logs doesn’t appear in my index). I have tried to send HTTP requests from the postman, but in this case all working great [Screenshot by Lightshot](https://prnt.sc/s99y4a)

Could you help me? Seems my logstash pipeline works, but extension might be has wrong configuration.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![karen1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karen1/32/18279_2.png) [@karen1](https://community.auth0.com/u/karen1)\
**Post date:** [May 29, 2020, 6:44pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/2 "2020-05-29T18:44:54Z")

</div>

Good afternoon,

Are you able to open the extension and check for failed logs?

Thanks!

---

<div class="post-metadata">

**Author:** ![KostyaZgara](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kostyazgara/32/21589_2.png) [@KostyaZgara](https://community.auth0.com/u/KostyaZgara)\
**Post date:** [May 29, 2020, 7:04pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/3 "2020-05-29T19:04:58Z")

</div>

Thank you for your answer!

If you mean the first error export it’s my first try where I did forget to specify username and password for logstash, but here failed logs

```auto
checkpoint: null
start: 2020-04-30T13:21:38.769Z
end: 2020-04-30T13:21:40.185Z
logsProcessed: 0
error: {"error":{"code":"ETIMEDOUT"},"status":500}

```

Also I can provide logs from success job

```auto
checkpoint: 90020200504111156297000427220690989121255641378705113186
start: 2020-05-04T11:14:43.177Z
end: 2020-05-04T11:14:44.060Z
logsProcessed: 15

```

Do I understand what logs you need?

---

<div class="post-metadata">

**Author:** ![karen1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karen1/32/18279_2.png) [@karen1](https://community.auth0.com/u/karen1)\
**Post date:** [June 1, 2020, 1:29pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/4 "2020-06-01T13:29:38Z")

</div>

Good morning,

Extensions use our webtask platform and since they’re limited to running 30 seconds at a time, this can cause timeouts. We realize this can be an issue and it’s part of the reason we developed the new log streaming functionality ([Log Streams](https://auth0.com/docs/logs/streams)).

If the uploads take too long the job will be killed and I think that would cause those socket hangups/timeouts.

A possible workaround might be to reduce the batch size and increase the run frequency in the extension’s configuration.

---

<div class="post-metadata">

**Author:** ![KostyaZgara](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kostyazgara/32/21589_2.png) [@KostyaZgara](https://community.auth0.com/u/KostyaZgara)\
**Post date:** [June 4, 2020, 9:08am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/5 "2020-06-04T09:08:29Z")

</div>

Thank you so much, seems it will work, but I don’t see how can I specify basic authentication for custom webhook, logstash doesn’t support bearer authentication

---

<div class="post-metadata">

**Author:** ![KostyaZgara](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kostyazgara/32/21589_2.png) [@KostyaZgara](https://community.auth0.com/u/KostyaZgara)\
**Post date:** [June 8, 2020, 11:02am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/6 "2020-06-08T11:02:31Z")

</div>

Resolved by specifying username and password in format `https://<username>:<password>@url_to_logstash`

Thank you again!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 8, 2020, 11:14am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/7 "2020-06-08T11:14:36Z")

</div>

No worries! We’re here for you! Glad you have figured it out!

---

<div class="post-metadata">

**Author:** ![shuki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shuki/32/13591_2.png) [@shuki](https://community.auth0.com/u/shuki)\
**Post date:** [June 15, 2020, 12:56pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/8 "2020-06-15T12:56:57Z")

</div>

Hey Konrad, Karen,

I am facing with the same issue. Cannot export logs to myu logstash with the logstash auth0 extension unfortunately. I understand I need to use the logstash http input plugin in my config file: [Http input plugin | Logstash Reference [8.6] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html#plugins-inputs-http)

But what properties do I add there? Or do I put it empty, like this: ?  
input {  
http {  
}  
}

Also, I couldn’t find any documentation if any authentication is required? In a form of an API token that you might include in the http input plugin under some property. I did noticed the Auth0 Authorization extension and even generated one, but It seems to me that they have no concerned with each other.

Please advise.

Thanks in advanced 🙂

---

<div class="post-metadata">

**Author:** ![KostyaZgara](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kostyazgara/32/21589_2.png) [@KostyaZgara](https://community.auth0.com/u/KostyaZgara)\
**Post date:** [June 15, 2020, 2:32pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/9 "2020-06-15T14:32:13Z")

</div>

Don’t use Auth0 extension. Based on answer above, you need to use feature “Log streams”. Unfortunately this feature available only on Developer plan, but it works.

For configuring logstash http plugin here no requirements. You can add basic authentication to your http listener but you can test without it. My advice, start your http listener, confirm that you have access to your listener (just send any request with curl to your logstash endpoint) and if logstash works and save your test request, you can set settings in auth0 using log streams. All examples I did provide above

---

<div class="post-metadata">

**Author:** ![shuki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shuki/32/13591_2.png) [@shuki](https://community.auth0.com/u/shuki)\
**Post date:** [June 15, 2020, 3:43pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/10 "2020-06-15T15:43:36Z")

</div>

Thanks Kostya 🙂

I am interested to see if I can make it with the Logstash extension. I know it can be done via Log streams but it requires development on my side that I’d rather to avoid. I am waiting to see what will be the answers of the Auth0 team.

Guys, Is the Auth0 Logstash extension cannot work for me? If so, there are any plans from your side to develop a dedicated Auth0 input plugin for Logstash?

---

<div class="post-metadata">

**Author:** ![KostyaZgara](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kostyazgara/32/21589_2.png) [@KostyaZgara](https://community.auth0.com/u/KostyaZgara)\
**Post date:** [June 15, 2020, 3:52pm UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/11 "2020-06-15T15:52:23Z")

</div>

No necessary additional development from your side doesn’t need. Just set your http plugin in logstash (as you did set up for auth0 extension) and enter information in log streams how can auth0 can make a call to your logstash (if any authentication not require need populate only URL to you listener) and that’s it, auth0 will start send logs to logstash.

---

<div class="post-metadata">

**Author:** ![shuki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shuki/32/13591_2.png) [@shuki](https://community.auth0.com/u/shuki)\
**Post date:** [June 16, 2020, 6:00am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/12 "2020-06-16T06:00:41Z")

</div>

I’ll try that. Thanks a lot!! 🙂

---

<div class="post-metadata">

**Author:** ![shuki](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shuki/32/13591_2.png) [@shuki](https://community.auth0.com/u/shuki)\
**Post date:** [June 16, 2020, 10:52am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/13 "2020-06-16T10:52:16Z")

</div>

Hi Kostya, I am trying now to use the Log streams with a custom webhook and added my logstash URL in it. Then I have started my logstash, my logstash.conf input is:  
input {  
http {  
}  
}

Still no logs showing up from Auth0. Can you share a screenshot of your logstash.conf and also your Custom webhook configuration?

Thanks in advanced 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 1, 2020, 10:52am UTC](https://community.auth0.com/t/cannot-export-logs-to-logstash/43794/14 "2020-07-01T10:52:19Z")

</div>

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