influxdata / influxdata/kapacitor

tickscript using morgoth algo

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

Description

I'm trying to check on the value on a field every 5 minutes using morgoth algo but the alert is not triggering. I am not getting any result. Any advice is appreciated. Thankyou

var yesterday = batch
|query('''Select (usage_idle) From "telegraf"."autogen"."cpu" ''')
.offset(1d)
.period(5m)
.every(1m)

var today = batch
|query('''Select (usage_idle) From "telegraf"."autogen"."cpu" ''')
.period(5m)
.every(1m)

yesterday
|join(today)
.as('yesterday', 'today')
.tolerance(1s)
@morgoth()
.field('today')
.scoreField('Anomalyscore')
.sigma(3.0)
|alert()
.crit(lambda: "Anomalyscore" > 0.9)
.message('CPU usage alert')
.log('/tmp/abd.log')

DOT:
digraph abd {
graph [throughput="0.00 batches/s"];

query2 [avg_exec_time_ns="11.808391ms" batches_queried="121" errors="0" points_queried="7260" working_cardinality="0" ];
query2 -> join4 [processed="121"];

query1 [avg_exec_time_ns="13.226706ms" batches_queried="121" errors="0" points_queried="7260" working_cardinality="0" ];
query1 -> join4 [processed="121"];

join4 [avg_exec_time_ns="66.386µs" errors="0" working_cardinality="1" ];
join4 -> morgoth5 [processed="120"];

morgoth5 [avg_exec_time_ns="1.407µs" errors="0" working_cardinality="0" ];
morgoth5 -> alert6 [processed="120"];

alert6 [alerts_inhibited="0" alerts_triggered="0" avg_exec_time_ns="27.402µs" crits_triggered="0" errors="0" infos_triggered="0" oks_triggered="0" warns_triggered="0" working_cardinality="1" ];

Contributor guide

Open the contributing guide

Research direction

Start with the Tickscript batch queries, the join, and the @morgoth() pipeline shown in the issue, then compare them with the DOT execution statistics. Reproduce the reported CPU query and determine why no anomaly score or alert is produced; the issue provides no file or test to target.

Written by the indexing model from the issue text.

Assessment

Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.