influxdata / influxdata/kapacitor

kapacitor missing/null value problems

Open
#1,604 8 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

In the following kapacitor receives a stream from InfluxDB that contains the fields used_space_fileStoreSummary and timeUntilEndOfLicence with their values.

I am facing problems in Tickscript with missing values/fields, although it seems that kapacitor receives successfully the values for this fields from InfluxDB (I checked this in a log file). So the fields shouldn't be missing.

When using the following short code example kapacitor.log shows that the value used_space_fileStoreSummary is missing/null (although the data seems to be there). However the Tickscript seems to have received the value for used_space_fileStoreSummary and checks successfully whether "used_space_fileStoreSummary" > 1000. The result is stored in the field 'test' and succesfully uploaded to InfluxDB with the node influxDBOut(). Thus, this code works, although kapacitor.log reports that used_space_fileStoreSummary is missing value.

Example 1:
```
stream
|from()
.database('artifactory_internal')
.retentionPolicy('autogen')
.measurement('Artifactory')
|eval(lambda: int("used_space_fileStoreSummary" > 1000)).as('test')
|influxDBOut()
.database('bitbucket_kapacitor')
.retentionPolicy('autogen')
.measurement('Bitbucket')
```

Using |eval() with several lambda expressions like in example 2 led to the error: left reference used_space_fileStoreSummary is missing value.

Example 2:
```
var artifactory = stream
| from()
.database('artifactory_internal')
.retentionPolicy('autogen')
.measurement('Artifactory')

var joining = artifactory
| eval(
lambda: int("timeUntilEndOfLicence" > 60.0)
,
lambda: int("timeUntilEndOfLicence" <= 60.0 AND "timeUntilEndOfLicence" > 30.0)
,
lambda: int("timeUntilEndOfLicence" < 30.0)
,
lambda: int( "used_space_fileStoreSummary" < 100000)
,
lambda: int( "used_space_fileStoreSummary" >= 100000 AND
"used_space_fileStoreSummary" < 300000)
,
lambda: int( "used_space_fileStoreSummary" >= 300000)
).as('LicenceArtifactoryGreen', 'LicenceArtifactoryOrange', 'LicenceArtifactoryRed' , 'usedSpaceGreen', 'usedSpaceOrange', 'usedSpaceRed')
| influxDBOut()
.database('bitbucket_kapacitor')
.retentionPolicy('autogen')
.measurement('Bitbucket')
```

My questions are:
1. Why kapacitor.log reports that the values are missing, although they seem to be received successfully from Kapacitor. Could this be associated to the time interval kapacitor receives/checks the data?

2. Why kapacitor.log shows that the values are missing and the Tickscript still works in some cases( example1)

3. Why it doesnt work anymore using eval nodes with more lambda expressions.

Thanks for your support.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two Tickscript examples using the eval nodes, the used_space_fileStoreSummary and timeUntilEndOfLicence fields, and the kapacitor.log output. Compare the received stream fields with the expressions that report missing values, especially when several lambda expressions are used. Done means explaining the missing-value messages and why the first example works while the second fails.

Written by the indexing model from the issue text.

Assessment

Domain
backend, data
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.