influxdata / influxdata/influxdb

Influxdb 2.7.7 - Cannot add new Task via GUI

Open
#25,197 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

New to Flux and V2.0 but hitting a weird issue with creating new Tasks via the GUI

I have an existing working task. I want to create an identical one but with a different agent host IP. If I copy and paste the working task config it gives me an error "Failed to create new task: Invalid flux script. Please check your query text." when I try and save it
If I use the clone button on the working one and change the IP, give a different name and save it - it works!!!!

I have changed the Task name and tried with and without adding the "option task = {name: "Test2", every: 15m, offset: 0m}" as the first line. I have also tried copy / pasting the working config to another Influx 2.7 node and it also gives the same error

I've tried copy and pasting it into Notepad++, directly. IS there an known issue with doing tasks this way?

Below is the working Task config - If i paste this into a new task and change the IP to a different IP that is also in the bucket with the same fields etc it will not save. ANy help appreciated

option task = {name: "Test2", every: 15m, offset: 0m}

from(bucket: "telegraf")
|> range(start: -task.every)
|> filter(fn: (r) => r["_field"] == "cvCallVolPeerOutgoingCalls")
|> filter(fn: (r) => r["agent_host"] == "10.10.1.10")
|> filter(fn: (r) => r["host"] == "homer")
|> filter(fn: (r) => r["index"] == "1")
|> aggregateWindow(every: task.every, fn: mean)
|> to(bucket: "longterm", org: "TEST", fieldFn: (r) => ({"mean": r._value}))

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the GUI task-creation failure using the supplied Flux task configuration, then compare it with cloning the existing task and changing the agent_host IP. Determine whether the pasted script is rejected while the cloned task succeeds, and document a verified cause and fix or workaround.

Written by the indexing model from the issue text.

Assessment

Domain
databases
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.