Hi all,
I am new to TICK stack and Go in general so I am trying to see how well morgoth can detect anomalies in industrial use. But for some reason I can’t get it to work. I’m pumping data to Influxdb and trying to write a TICK script that would detect anomalies in gas turbine speed, but I am getting the following error: task run: morgoth3: write error: write |1: broken pipe
Below is my show task output
ID: ngp_alert
Error: morgoth3: write error: write |1: broken pipe
Template:
Type: stream
Status: disabled
Executing: false
Created: 04 Apr 18 10:22 +06
Modified: 04 Apr 18 17:58 +06
LastEnabled: 04 Apr 18 17:05 +06
Databases Retention Policies: [“test”.“autogen”]
TICKscript:
stream
|from()
.database(‘test’)
.retentionPolicy(‘autogen’)
.measurement(‘test’)
.groupBy(*)
|window()
.period(1m)
.every(1m)
@morgoth()
// track the ‘NGP’ field
.field(‘NGP’)
// label output data as anomalous using the ‘anomalous’ boolean field.
.anomalousField(‘anomalous’)
.errorTolerance(0.01)
// The window is anomalous if it occurs less the 5% of the time.
.minSupport(0.05)
// Use the sigma fingerprinter
.sigma(3.0)
// Multiple fingerprinters can be defined…
|alert()
// Trigger a critical alert when the window is marked as anomalous.
.id(‘Kapacitor alert’)
.message(‘Anomaly in NGP detected, NGP={{index .Fields “NGP”}}’)
.warn(lambda: “anomalous”)
.crit(lambda: “anomalous”)
.log(’/etc/kapacitor/alert.log’)
.idField(‘id’)
.levelTag(‘level’)
|where(lambda: “id” != ‘’)
|influxDBOut()
.database(‘kapacitor_alerts’)
.retentionPolicy(‘autogen’)
.measurement(‘NGP_alerts’)
DOT:
digraph ngp_alert {
stream0 -> from1;
from1 -> window2;
window2 -> morgoth3;
morgoth3 -> alert4;
alert4 -> where5;
where5 -> influxdb_out6;
}