influxdata / influxdata/kapacitor

Issue with outliers

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

Description

Hi Team,

Facing issues while importing the outliners py file in to the tick scripts. Trying to find out the standard deviation in a series.
Clone the repository "https://github.com/influxdata/kapacitor/tree/master/udf/agent/examples/outliers" and got the outliers.py file.
With that, have made the modifications in kapacitor.conf file.

[udf.functions.outliers]
prog = "/usr/bin/python"
args = ["-u", "/tmp/kapacitor_udf/kapacitor/udf/agent/examples/outliers/outliers.py"]
timeout = "10s"

Wrote a tick script to use that outliner scripts and perform some tasks.

batch
|query('''
SELECT value
FROM "testdata"."autogen"."drive_info"
''')
.period(1m)
.every(10s)
@outliers()
.field('value')
|alert()
.crit(lambda: "value" > 0.0 )
.StateChangesOnly()
.log('/var/tmp/kapacitor/outline.log')

The kapacitor definition and enabling went fine without any issues.

when the query is executed and getting the error in the logs and not alerting in the log files.

[task_master:main] 2016/11/29 13:48:38 I! closed
[run] 2016/11/29 13:48:38 E! open server: open service *udf.Service: failed to load process info for "outliers": write error: write |1: broken pipe
[run] 2016/11/29 13:48:39 I! Kapacitor starting, version 1.0.2, branch master, commit 1011dba109bf3d83366c87873ec285c7f9140d34
[run] 2016/11/29 13:48:39 I! Go version go1.6.3
[srv] 2016/11/29 13:48:39 I! Kapacitor hostname: 10.0.0.22
[srv] 2016/11/29 13:48:39 I! ClusterID: 4516c272-fd1e-4244-a2fc-ce95b8383e39 ServerID: be981e65-35a6-42c5-8fd7-80ac94c02c3d
[task_master:main] 2016/11/29 13:48:39 I! opened
[srv] 2016/11/29 13:48:39 D! opening service: *udf.Service
[udf] 2016/11/29 13:48:39 I!P Traceback (most recent call last):
[udf] 2016/11/29 13:48:39 I!P File "/tmp/kapacitor_udf/kapacitor/udf/agent/examples/outliers/outliers.py", line 3, in
[udf] 2016/11/29 13:48:39 I!P from kapacitor.udf.agent import Agent, Handler
[udf] 2016/11/29 13:48:39 I!P File "build/bdist.linux-x86_64/egg/kapacitor/udf/agent.py", line 7, in
[udf] 2016/11/29 13:48:39 I!P File "build/bdist.linux-x86_64/egg/kapacitor/udf/udf_pb2.py", line 6, in
[udf] 2016/11/29 13:48:39 I!P ImportError: cannot import name enum_type_wrapper

not sure how to resolve this issues. Please do suggest me with an solution. Thanks.

Contributor guide

Open the contributing guide

Research direction

Start with udf/agent/examples/outliers/outliers.py and the kapacitor.conf UDF configuration shown in the report. Reproduce the import failure and inspect the traceback at kapacitor.udf.agent and udf_pb2.py, especially the missing enum_type_wrapper import. Done means the outliers UDF starts successfully and the demonstrated task can write its alert log.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.