# Create hyperlinks in logstash

**URL:** <https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010>\
**Category:** Logstash\
**Created:** [October 5, 2020, 2:32pm UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010 "2020-10-05T14:32:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [October 5, 2020, 2:32pm UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010/1 "2020-10-05T14:32:36Z")

</div>

In my logstash output, I have set up an email output that looks like this (put it for reference, doesn't really matter):

```
# If our honeypot (called cowrie) gets someone, send me an email

if [log][file][path] =~ "cowrie.json" {
    if [message] =~ "^New connection" {
    email {
      from => 'honeypot-entries@companyname-elk.net'
      to => 'john@companyname.net'
      subject => 'Honeypot Alert'
      body => "Someone interacted with the honeypot!\nDetails: %{message}\nClick here to view the dashboard."
      domain => 'mail.company.net'
      port => 25
    }
  }
}

```

I want to set up a hyperlink so that the word `Click here` would be clickable and directed to a link (the dashboard). much like this sentence is clickable.

Is it possible to do?

Thanks ahead!

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 5, 2020, 2:34pm UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010/2 "2020-10-05T14:34:23Z")

</div>

Use the htmlbody option instead of body.

---

<div class="post-metadata">

**Author:** ![headtea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/headtea/32/24271_2.png) [@headtea](https://discuss.elastic.co/u/headtea)\
**Post date:** [October 5, 2020, 2:35pm UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010/3 "2020-10-05T14:35:22Z")

</div>

Thanks for the response!

May I ask how the syntax for a link would look? Also, would a new line remain `\n`?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 5, 2020, 2:38pm UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010/4 "2020-10-05T14:38:10Z")

</div>

I have never used it, so I cannot say.

---

<div class="post-metadata">

**Author:** ![gamedevtuts9](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@gamedevtuts9](https://discuss.elastic.co/u/gamedevtuts9)\
**Post date:** [October 6, 2020, 5:05am UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010/5 "2020-10-06T05:05:21Z")

</div>

thanks for that , using hyperlinks is a client requirement for me and my emails are getting queued and i wonder [what is queued meaning in gmail](https://techanswered.com/question/what-does-queued-mean-in-gmail-outbox/)

---

<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:** [November 3, 2020, 5:05am UTC](https://discuss.elastic.co/t/create-hyperlinks-in-logstash/251010/6 "2020-11-03T05:05:29Z")

</div>

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