influxdata / influxdata/kapacitor

smtp error!

Open
#2,568 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

I have a task that does not define Email event handler. but in the kapacitor log find out error:
ts=2021-06-07T03:20:32.804+08:00 lvl=error msg="failed to send email" service=smtp task=website-check err="service is not enabled"
ts=2021-06-07T03:20:32.804+08:00 lvl=error msg="failed to send email" service=smtp task=website-check err="service is not enabled"
ts=2021-06-07T03:20:32.805+08:00 lvl=error msg="failed to send email" service=smtp task=website-check err="service is not enabled"

task content as follow:
ID: website-check
Error:
Template:
Type: stream
Status: enabled
Executing: true
Created: 24 May 21 08:31 CST
Modified: 24 May 21 08:31 CST
LastEnabled: 24 May 21 08:31 CST
Databases Retention Policies: ["idrac2985"."autogen"]
TICKscript:
dbrp "idrac2985"."autogen"

stream
|from()
.measurement('http_response')
|alert()
.crit(lambda: int("http_response_code") >= 400)
.details('''ServiceFailure: Website access exception
SiteName:{{ index .Fields "sitenamefield" }}
SiteURL: {{ index .Tags "urltag" }}
ResponseCode: {{ index .Fields "http_response_code" }}
''')
.exec('/usr/bin/python3', '/root/sendToWX.py')

DOT:
digraph website-check {
graph [throughput="0.00 points/s"];

stream0 [avg_exec_time_ns="0s" errors="0" working_cardinality="0" ];
stream0 -> from1 [processed="407020"];

from1 [avg_exec_time_ns="9.589µs" errors="0" working_cardinality="0" ];
from1 -> alert2 [processed="407020"];

alert2 [alerts_inhibited="0" alerts_triggered="1674" avg_exec_time_ns="90.378µs" crits_triggered="1536" errors="0" infos_triggered="0" oks_triggered="138" warns_triggered="0" working_cardinality="1" ];
}

![image](https://user-images.githubusercontent.com/65700504/120962723-e2d9a880-c792-11eb-8dd3-099bd9639547.png)
I have set smtp is false in the kapacitor.conf. help me solve this issues,THK!

Contributor guide

Open the contributing guide

Research direction

Start with the website-check TICKscript and the SMTP setting in kapacitor.conf, then compare the configured alert actions with the task's .exec('/usr/bin/python3', '/root/sendToWX.py') handler. Reproduce the logged "service is not enabled" error and determine why SMTP is being invoked; done means the task no longer emits the unexpected SMTP error or the configuration requirement is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, python
Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.