# Sent alert check deadman to email?(no third party service)

**URL:** <https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492>\
**Category:** Checks & Notifications\
**Tags:** influxdb\
**Created:** [April 1, 2022, 12:14pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492 "2022-04-01T12:14:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [April 1, 2022, 12:14pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/1 "2022-04-01T12:14:09Z")

</div>

Sent alert check deadman to email?(no third party service)

its possible?

thank you

---

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [April 4, 2022, 1:14pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/2 "2022-04-04T13:14:43Z")

</div>

i see this post:

> [@Email Alert Function in Flux?](https://community.influxdata.com/t/email-alert-function-in-flux/8605):
>
> I was just playing around with the TICK stack when 2.0 dropped. I had just done some testing on pushing windows system data via telegraf on version 1.X sending some simple Email alerts when 2.0 dropped. Is there a function in FLUX which allows me to send emails? I haven’t seen anything in the docs. Maybe I need more coffee this morning?

nothing change?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [April 6, 2022, 2:50pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/3 "2022-04-06T14:50:39Z")

</div>

Hello @Mark_influx,  
Have you had a chance to take a look at these docs?

> **[Send alert email | InfluxDB Cloud Documentation](https://docs.influxdata.com/influxdb/cloud/monitor-alert/send-email/)**
>
> Send an alert email.

---

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [April 6, 2022, 3:47pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/4 "2022-04-06T15:47:39Z")

</div>

thank you @Anaisdg is see that page in documentation but is all with third-party i search a metod to sent email or notification into a mail with local smtp

i see this method is possible to personalize with script with local smtp?

> [https://www.youtube.com/watch?v=LfWVZHuCCnE](https://www.youtube.com/watch?v=LfWVZHuCCnE)  
> at minute 54:00 at the moment is the best i see but use rbox(third-party)

better option is use local smtp

thank you

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [April 6, 2022, 4:33pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/5 "2022-04-06T16:33:37Z")

</div>

Hello @Mark_influx,  
That example uses Flux in the background.  
All checks, notifications, and alerts use Flux.  
Specifically that example takes advantage of

> **[http.post() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/http/post/)**
>
> http.post() sends an HTTP POST request to the specified URL with headers and data and returns the HTTP status code.

---

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [April 22, 2022, 9:32am UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/6 "2022-04-22T09:32:19Z")

</div>

thank you i try whit notification with webhook by google but doesn’t work…with rbox works fine…

i have 2 question:

- have example of http notification in flux language?
- when i have scrip in flux i must insert in tasks?

thank you

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [April 25, 2022, 5:30pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/7 "2022-04-25T17:30:09Z")

</div>

Hello @Mark_influx,  
Do the examples in the docs not help? What type of http.post() example are you looking for?

> **[http.post() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/http/post/)**
>
> http.post() sends an HTTP POST request to the specified URL with headers and data and returns the HTTP status code.

You can run http.post function just as a query (as you would do in the data explorer in the InfluxDB UI for example) and send a single notification. You don’t have to include it in a task, but people usually do.

---

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [April 26, 2022, 9:29am UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/8 "2022-04-26T09:29:45Z")

</div>

this is my configuration:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/e/e4ec115382aa4c9bbd1f9486bb90c471297d0519.png)  
 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/d/d656a774d16189381b61cf63d667a9ab55557f4d.png)  
 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/7/7122af523ba9ac1ff438e7c56dee98bfc000f77b.png)

but i cant sent notification to google webhook…

i see the example in http but data never sent…  
i try whit rbox and work fine

thank you best regards

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [April 26, 2022, 6:57pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/9 "2022-04-26T18:57:23Z")

</div>

Hello @Mark_influx,  
Can you successfully send a message in the data explorer?

```auto
//replace with your parameters
import "http"

http.post(
    url: "https://us-west-2-1.aws.cloud2.influxdata.com/",
    headers: {"Content-type": "application/json"},
    data: json.encode(v: "foo"),
)

```

---

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [April 27, 2022, 8:21am UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/10 "2022-04-27T08:21:25Z")

</div>

thank you @Anaisdg i try but nothing sent…

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/f/fab7c13d10c72d8f6c5eac8c6941af5dea73f930.png)

i made a mistake?  
this is the code:

> //replace with your parameters
> 
> import “http”
> 
> import “json”
> 
> from(bucket: “rasp-pi”)
> 
> |\> range(start: v.timeRangeStart, stop: v.timeRangeStop)
> 
> |\> filter(fn: (r) =\> r[“\_measurement”] == “Ora-esatta”)
> 
> |\> filter(fn: (r) =\> r[“\_field”] == “valore”)
> 
> |\> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
> 
> |\> yield(name: “mean”)
> 
> http.post(
> 
> ```
> url: "https://chat.googleapis.com/v1/spaces/AAAAn_JQKSY/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=RTqCM7iiSE0cjpc0LNnfjW3sEyEkmeARSOWIb6_3jDM%3D",
> 
> headers: {"Content-type": "application/json"},
> 
> data: json.encode(v: "mean"),
> 
> ```
> 
> )

---

<div class="post-metadata">

**Author:** ![Mark\_influx](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mark\_influx](https://community.influxdata.com/u/Mark_influx)\
**Post date:** [May 2, 2022, 1:40pm UTC](https://community.influxdata.com/t/sent-alert-check-deadman-to-email-no-third-party-service/24492/11 "2022-05-02T13:40:08Z")

</div>

no anyone send notification via mail or google webhook ?
