# Sending Alerts to TheHive

**URL:** <https://forum.opensearch.org/t/sending-alerts-to-thehive/2823>\
**Category:** Alerting\
**Created:** [May 17, 2020, 8:48am UTC](https://forum.opensearch.org/t/sending-alerts-to-thehive/2823 "2020-05-17T08:48:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hilo21](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@hilo21](https://forum.opensearch.org/u/hilo21)\
**Post date:** [May 17, 2020, 8:48am UTC](https://forum.opensearch.org/t/sending-alerts-to-thehive/2823/1 "2020-05-17T08:48:21Z")

</div>

Hello,

I was wondering if i can send alerts to TheHive with the alerting plugin  
Example of request to create an alert :

```auto
curl -XPOST -H 'Authorization: Bearer ***API*KEY***' -H 'Content-Type: application/json' http://127.0.0.1:9000/api/alert -d '{
  "title": "New Alert",
  "description": "N/A",
  "type": "external",
  "source": "instance1",
  "sourceRef": "alert-ref"
}

```

Thank you

---

<div class="post-metadata">

**Author:** ![dbbaughe](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dbbaughe](https://forum.opensearch.org/u/dbbaughe)\
**Post date:** [May 21, 2020, 6:16pm UTC](https://forum.opensearch.org/t/sending-alerts-to-thehive/2823/2 "2020-05-21T18:16:23Z")

</div>

Hi @hilo21,

I believe you should be able to, are you running into any specific issues?

---

<div class="post-metadata">

**Author:** ![hilo21](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@hilo21](https://forum.opensearch.org/u/hilo21)\
**Post date:** [May 21, 2020, 9:54pm UTC](https://forum.opensearch.org/t/sending-alerts-to-thehive/2823/3 "2020-05-21T21:54:59Z")

</div>

Hello @dbbaughe.  
I am able to using curl but the destinations url doesn’t support ip for custom webhooks and even though i defined my hostname in the hosts file it did not work i don’t know how can i bypass this limitation  
Thank you

---

<div class="post-metadata">

**Author:** ![xenomuta](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/xenomuta/32/890_2.png) [@xenomuta](https://forum.opensearch.org/u/xenomuta)\
**Post date:** [November 6, 2020, 2:49am UTC](https://forum.opensearch.org/t/sending-alerts-to-thehive/2823/4 "2020-11-06T02:49:28Z")

</div>

I went through this issue, and solved it by setting a dummy URL, then directly altering the alert config document:

```
PUT .opendistro-alerting-config/_doc/<alert-config-id>
  {
  "destination" : {
    "type" : "custom_webhook",
      "name" : "My Custom Web Hook",
      "schema_version" : 1,
      "custom_webhook" : {
        "header_params" : {
          "enabled": true,
          "Content-Type" : "application/json"
        },
        "url" : "http:// **X.X.X.X** :8080/alert-me"
      }
    }
  }

```

---

<div class="post-metadata">

**Author:** ![skkosuri-amzn](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/skkosuri-amzn/32/935_2.png) [@skkosuri-amzn](https://forum.opensearch.org/u/skkosuri-amzn)\
**Post date:** [March 7, 2021, 4:14pm UTC](https://forum.opensearch.org/t/sending-alerts-to-thehive/2823/5 "2021-03-07T16:14:20Z")

</div>


