tickscript

package
v0.112.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 4 Imported by: 1

README

Tickscript package

The tickscript package can be used to convert TICKscripts to InfluxDB 2.x tasks.

Most TICKscript functions have the same or similar counterparts in Flux. This package only provides a set of convenience functions for easier conversion and creation of custom checks executed as tasks and triggering alerts in InfluxDB 2.x.

To learn more about monitoring and alerting in InfluxDB 2.x and Flux, please see

Available functions

  • select
  • selectWindow
  • groupBy
  • compute
  • join
  • alert
  • deadman
  • defineCheck

Conversion guidelines

  • Variable conversions
    var realm = 'qa' becomes realm = "qa" in Flux
    var warnLevel = lambda: "device_count" > 2000 is a function warnLevel = (r) => r["device_count"] > 2000 in Flux

  • Both batch and stream translates to from(bucket: ...) in Flux.

  • Every batch, stream and deadman must be separate task.

  • every(duration) and offset(duration) property maps to every and offset fields in task's option record. For better control or aligned scheduling, use cron option instead.

  • period(duration) property maps to range(start: -duration) in Flux pipeline.

  • deadman()'s interval maps to task's every scheduling value.

  • groupBy(columns) maps to group(columns).
    Columns must include internal _measurement column. For convenience, function groupBy is provided in this package.
    Flux results are grouped by all tags by default. To ungroup, call group() without argument.

    query('''
        SELECT mean("counter") AS "total_mean" WHERE ...
        ''')
        .groupBy('host')
        .period(1m)

can be rewritten to Flux as

    import ts "contrib/bonitoo-io/tickscript"
    import "influxdata/influxdb/schema"

    from(bucket: ...)
       |> range(start: -1m)
       |> filter(fn: (r) => ... )
       |> schema.fieldsAsCols()
       |> ts.groupBy(columns: ["host"])
       |> ts.select(column: "counter", fn: mean, as: "total_mean")
  • groupBy(time(t), columns) maps to group(columns) and aggregateWindow(..., every: t, ...)
    The package provides convenience functions groupBy(columns) and selectWindow(..., every(t), ...) to achieve the same.
    query('''
        SELECT sum("counter") AS "total_sum" WHERE ...
        ''')
        .groupBy(time(10s), 'host')
        .period(1m)
        .fill(0)

can be rewritten to Flux as

    import ts "contrib/bonitoo-io/tickscript"
    import "influxdata/influxdb/schema"

    from(bucket: ...)
       |> range(start: -1m)
       |> filter(fn: (r) => ... )
       |> schema.fieldsAsCols()
       |> ts.groupBy(columns: ["host"])
       |> ts.selectWindow(column: "counter", fn: sum, as: "total_sum", every: 10s, defaultValue: 0)
  • eval(expression) corresponds to map(fn: (r) = > ({ r with ...})) in Flux

  • TICKscript alert provides property methods to send alerts to event handlers or a topic. In Flux, use topic parameter in alert() to route the alert to topic.

  • stateChangesOnly is a filter available in InfluxDB notification rule.

  • TICKscript pipeline with multiple alerts translates to multiple Flux pipelines, ie.

var data = batch
    | query(...)
data
    | alert(...)
        .topic('A')
    | alert(...)
        .topic('B')

becomes

data = from(bucket: ...)
    |> range(start: -duration)
    ...
data
    |> alert(..., topic: "A")
data
    |> alert(..., topic: "B")

Functions

tickscript.select

tickscript.select() is a convenience function for selecting a column with optional aggregation. Intended to work like "SELECT x AS y" or SELECT f(x) AS y query (without time grouping).

Parameters:

  • column - Existing column. Default value is _value.
  • fn - Optional aggregation function. Default is none.
  • as - Desired column name.

Examples:

import ts "contrib/bonitoo-io/tickscript"

from(bucket: "test")
    ...
    |> ts.select(column: "message_rate", as: "MsgRate") // query('''SELECT "message_rate" AS "MsgRate"''')
import ts "contrib/bonitoo-io/tickscript"

from(bucket: "test")
    ...
    |> ts.select(column: "counter", fn: mean, as: "count") // query('''SELECT mean("counter") AS "count"''')
tickscript.selectWindow

tickscript.selectWindow() is a convenience function for selecting a column with time grouping and aggregation. Intended to work like "SELECT f(x) AS y" query with .groupBy(time(t), ...).

Parameters:

  • column - Existing column. Default value is _value.
  • fn - Aggregation function.
  • as - Desired column name.
  • every - Duration of windows.
  • defaultValue - Value to fill windows with null aggregate value.

Examples:

import ts "contrib/bonitoo-io/tickscript"

from(bucket: "test")
    ...
    |> ts.selectWindow(column: "counter", fn: mean, as: "rate", every: 1m, defaultValue: 0.0) // query('''"SELECT mean("counter") AS "rate"''').groupBy(time(1m))
tickscript.groupBy

tickscript.groupBy() is a convenience function for result grouping.

Parameters:

  • columns - Set of columns to group by. The implementation adds _measurement column required by underlying monitor package.

See "Examples" paragraph.

tickscript.compute

tickscript.compute() is a convenience function for computing an aggregation on the data. Intended to be used like TICKscript |f(x).as(y) where f is an aggregation function.

Parameters:

  • column - Existing column. Default value is _value.
  • fn - Aggregation function.
  • as - Desired column name.

Examples:

import ts "contrib/bonitoo-io/tickscript"

from(bucket: "test")
    ...
    |> ts.compute(column: "message_rate", fn: median, as: "median_message_rate") // query|median('message_rate').as('median_message_rate)
tickscript.join

tickscript.join() is a convenience function for joining two streams. It ensures the result has _measurement column and it is in the group key.

Parameters:

  • tables - Record with two streams. See Flux join documentation for details.
  • on - Optional list of columns to join on. Default is ["_time"].
  • measurement - Measurement name.

Examples:

import ts "contrib/bonitoo-io/tickscript"

requests = from(bucket: "test")
    ...
    |> ts.select(column: "counter", fn: sum, as: "total_sum")

failures = from(bucket: "test")
    ...
    |> ts.select(column: "counter", fn: sum, as: "failure_sum")

ts.join(tables: { requests: requests, failures: failures }, measurement: "xte")
    |> map(fn: (r) => ({ r with error_percent: float(v: failures.failure_sum) / float(v: requests.total_sum) }))
tickscript.alert

tickscript.alert() checks input data and create alerts.

It requires pivoted data (call schema.fieldsAsCols() before tickscript.alert()).

Parameters:

  • check - Check data. It is a record required by the underlying monitor.check(). Use defineCheck() or create manually.
  • id - Function that constructs alert ID. Default is (r) => "${r._check_id}".
  • message - Function that constructs alert message. Default is Threshold Check: ${r._check_name} is: ${r._level}".
  • details - Function that constructs detailed alert message. Default is (r) => "".
  • crit - Predicate function that determines crit status. Default is (r) => false.
  • warn - Predicate function that determines warn status. Default is (r) => false.
  • info - Predicate function that determines info status. Default is (r) => false.
  • ok - Predicate function that determines info status. Default is (r) => true.
  • topic - Topic name.

See Examples.

tickscript.deadman

tickscript.deadman() creates an alert on low throughput. Triggers critical alert if thoughput drops bellow threshold value.

It requires pivoted data (call schema.fieldsAsCols() before tickscript.deadman()).

Parameters:

  • check - Check data. It is a record required by the underlying monitor package. Use defineCheck() or create manually.
  • measurement - measurement name
  • threshold - threshold value (integer)
  • id - Function that constructs alert ID. Default is (r) => "${r._check_id}".
  • message - Function that constructs alert message. Default is Deadman Check: ${r._check_name} is: ${r._level}".
  • topic - Topic name.

See Examples.

tickscript.defineCheck

tickscript.defineCheck() creates check record that is required by alert() and deadman().

Parameters:

  • name - name of the check
  • id - unique identifier of the check
  • type - check type. Default value: "custom".

It returns a record with the following structure:

{
   _check_id :id,
   _check_name: name,
   _type: "custom",
   tags: {}
}

Examples

Batch node
Original TICKscript
duration = 5m
every = 1m
db = 'gw'
tier = 'qa'
metric_type = 'kafka_message_in_rate'
h_threshold = 5000

batch
    |query('SELECT mean(' + metric_type + ') AS "KafkaMsgRate" FROM ' +  db  + ' WHERE realm = \'' + tier + '\' AND "host" =~ /^kafka.+.m02/')
      .period(duration)
      .every(frequency)
      .groupBy('host','realm')
   |alert()
      .id('Realm: {{index .Tags "realm"}} - Hostname: {{index .Tags "host"}} / Metric: ' + metric_type + ' threshold alert' )
      .message('{{.ID }}: {{ .Level }} - {{ index .Fields "KafkaMsgRate" | printf "%0.2f"}}')
      .crit(lambda: "KafkaMsgRate" > h_threshold)
      .stateChangesOnly()
      .topic('TESTING')
InfluxDB task
import ts "contrib/bonitoo-io/tickscript"
import "influxdata/influxdb/schema"

// required task option
option task = {
  name: "Kafka Message Rate",
  every: 1m
}

// create custom check info
check = ts.defineCheck(id: "${task.name}-check", name: "${task.name} Check")

// converted TICKscript

duration = 5m
every = 1m
db = "gw"
tier = "qa"
metric_type = "kafka_message_in_rate"
h_threshold = 5000

from(bucket: db)
    |> range(start: -duration)
    |> filter(fn: (r) => r.measurement == db)
    |> filter(fn: (r) => r.realm == tier and r.host =~ /^kafka.+.m02/)
    |> filter(fn: (r) => r._field == metric_type)
    |> schema.fieldsAsCols()
    |> ts.groupBy(columns: ["host", "realm"])
    |> ts.select(column: metric_type, fn: mean, as: "KafkaMsgRate")
    |> ts.alert(
        check: check,
        id: (r) => "Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert",
        message: (r) => "${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}",
        crit: (r) => r.KafkaMsgRate > h_threshold,
        topic: "TESTING"
    )
Topic handler

Use notification rule as topic handler with additional filter for _topic tag value "TESTING".

Batch node
Original TICKscript
stream
  |from()
    .measurement('cpu')
    .groupBy('host')
    .where(lambda: "realm" != 'build')
  |deadman(10, 10m)
    .id('Deadman for system metrics')
    .message('{{ .ID }} is {{ .Level }} on {{ index .Tags "host" }}')
    .stateChangesOnly()
    .topic('DEADMEN')
InfluxDB task
import ts "contrib/bonitoo-io/tickscript"
import "influxdata/influxdb/schema"

// required task option
option task = {
  name: "System Metrics Deadman",
  every: 10m
}

// custom check info
check = ts.defineCheck(id: "${task.name}-check", name: "${task.name} Check")

// converted TICKscript

from(bucket: db)
    |> range(start: -task.every)
    |> filter(fn: (r) => r.measurement == "cpu")
    |> filter(fn: (r) => r.realm == "build")
    |> schema.fieldsAsCols()
    |> ts.groupBy(columns: ["host"])
    |> ts.deadman(
        check: check,
        measurement: "cpu",
        threshold: 10,
        id: (r) => "Deadman for system metrics",
        message: (r) => "${r.id} is ${r._level} on ${if exists r.host then r.host else "uknown"}",
        topic: "DEADMEN"
    )
Topic handler

Use notification rule as topic handler with additional filter for _topic tag value "DEADMEN".

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FluxTestPackages = []*ast.Package{&ast.Package{
	BaseNode: ast.BaseNode{
		Errors: nil,
		Loc:    nil,
	},
	Files: []*ast.File{&ast.File{
		BaseNode: ast.BaseNode{
			Errors: nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
					Column: 3,
					Line:   74,
				},
				File:   "alert_test.flux",
				Source: "package tickscript_test\n\nimport \"testing\"\nimport \"csv\"\nimport \"contrib/bonitoo-io/tickscript\"\nimport \"influxdata/influxdb/monitor\"\nimport \"influxdata/influxdb/schema\"\n\noption now = () => (2020-11-25T14:05:30Z)\n\n// overwrite as buckets are not avail in Flux tests\noption monitor.write = (tables=<-) => tables\noption monitor.log = (tables=<-) => tables\n\ninData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"\n\noutData = \"\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n\"\n\ncheck = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"custom\", // tickscript?\n  tags: {},\n}\n\nmetric_type = \"kafka_message_in_rate\"\ntier = \"ft\"\nh_threshold = 10\nw_threshold = 5\nl_threshold = .002\n\ntickscript_alert = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold\n    )\n    |> drop(columns: [\"_time\"])\n\ntest _tickscript_alert = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
				Start: ast.Position{
					Column: 1,
					Line:   1,
				},
			},
		},
		Body: []ast.Statement{&ast.OptionStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 42,
							Line:   9,
						},
						File:   "alert_test.flux",
						Source: "now = () => (2020-11-25T14:05:30Z)",
						Start: ast.Position{
							Column: 8,
							Line:   9,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   9,
							},
							File:   "alert_test.flux",
							Source: "now",
							Start: ast.Position{
								Column: 8,
								Line:   9,
							},
						},
					},
					Name: "now",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 42,
								Line:   9,
							},
							File:   "alert_test.flux",
							Source: "() => (2020-11-25T14:05:30Z)",
							Start: ast.Position{
								Column: 14,
								Line:   9,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 42,
									Line:   9,
								},
								File:   "alert_test.flux",
								Source: "(2020-11-25T14:05:30Z)",
								Start: ast.Position{
									Column: 20,
									Line:   9,
								},
							},
						},
						Expression: &ast.DateTimeLiteral{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 41,
										Line:   9,
									},
									File:   "alert_test.flux",
									Source: "2020-11-25T14:05:30Z",
									Start: ast.Position{
										Column: 21,
										Line:   9,
									},
								},
							},
							Value: parser.MustParseTime("2020-11-25T14:05:30Z"),
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 42,
						Line:   9,
					},
					File:   "alert_test.flux",
					Source: "option now = () => (2020-11-25T14:05:30Z)",
					Start: ast.Position{
						Column: 1,
						Line:   9,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 45,
							Line:   12,
						},
						File:   "alert_test.flux",
						Source: "monitor.write = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   12,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 45,
								Line:   12,
							},
							File:   "alert_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 24,
								Line:   12,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 45,
									Line:   12,
								},
								File:   "alert_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 39,
									Line:   12,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "alert_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 25,
									Line:   12,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   12,
									},
									File:   "alert_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 25,
										Line:   12,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "alert_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 32,
									Line:   12,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 21,
								Line:   12,
							},
							File:   "alert_test.flux",
							Source: "monitor.write",
							Start: ast.Position{
								Column: 8,
								Line:   12,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   12,
								},
								File:   "alert_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   12,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 21,
									Line:   12,
								},
								File:   "alert_test.flux",
								Source: "write",
								Start: ast.Position{
									Column: 16,
									Line:   12,
								},
							},
						},
						Name: "write",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 45,
						Line:   12,
					},
					File:   "alert_test.flux",
					Source: "option monitor.write = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   12,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 43,
							Line:   13,
						},
						File:   "alert_test.flux",
						Source: "monitor.log = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   13,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 43,
								Line:   13,
							},
							File:   "alert_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 22,
								Line:   13,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 43,
									Line:   13,
								},
								File:   "alert_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 37,
									Line:   13,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "alert_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 23,
									Line:   13,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 29,
										Line:   13,
									},
									File:   "alert_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 23,
										Line:   13,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "alert_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 30,
									Line:   13,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 19,
								Line:   13,
							},
							File:   "alert_test.flux",
							Source: "monitor.log",
							Start: ast.Position{
								Column: 8,
								Line:   13,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   13,
								},
								File:   "alert_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   13,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 19,
									Line:   13,
								},
								File:   "alert_test.flux",
								Source: "log",
								Start: ast.Position{
									Column: 16,
									Line:   13,
								},
							},
						},
						Name: "log",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 43,
						Line:   13,
					},
					File:   "alert_test.flux",
					Source: "option monitor.log = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   13,
					},
				},
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   26,
					},
					File:   "alert_test.flux",
					Source: "inData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   15,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 7,
							Line:   15,
						},
						File:   "alert_test.flux",
						Source: "inData",
						Start: ast.Position{
							Column: 1,
							Line:   15,
						},
					},
				},
				Name: "inData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   26,
						},
						File:   "alert_test.flux",
						Source: "\"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   15,
						},
					},
				},
				Value: "\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   39,
					},
					File:   "alert_test.flux",
					Source: "outData = \"\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   28,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   28,
						},
						File:   "alert_test.flux",
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   28,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   39,
						},
						File:   "alert_test.flux",
						Source: "\"\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   28,
						},
					},
				},
				Value: "\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   46,
					},
					File:   "alert_test.flux",
					Source: "check = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"custom\", // tickscript?\n  tags: {},\n}",
					Start: ast.Position{
						Column: 1,
						Line:   41,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 6,
							Line:   41,
						},
						File:   "alert_test.flux",
						Source: "check",
						Start: ast.Position{
							Column: 1,
							Line:   41,
						},
					},
				},
				Name: "check",
			},
			Init: &ast.ObjectExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   46,
						},
						File:   "alert_test.flux",
						Source: "{\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"custom\", // tickscript?\n  tags: {},\n}",
						Start: ast.Position{
							Column: 9,
							Line:   41,
						},
					},
				},
				Properties: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 26,
								Line:   42,
							},
							File:   "alert_test.flux",
							Source: "_check_id: \"rate-check\"",
							Start: ast.Position{
								Column: 3,
								Line:   42,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 12,
									Line:   42,
								},
								File:   "alert_test.flux",
								Source: "_check_id",
								Start: ast.Position{
									Column: 3,
									Line:   42,
								},
							},
						},
						Name: "_check_id",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   42,
								},
								File:   "alert_test.flux",
								Source: "\"rate-check\"",
								Start: ast.Position{
									Column: 14,
									Line:   42,
								},
							},
						},
						Value: "rate-check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 28,
								Line:   43,
							},
							File:   "alert_test.flux",
							Source: "_check_name: \"Rate Check\"",
							Start: ast.Position{
								Column: 3,
								Line:   43,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 14,
									Line:   43,
								},
								File:   "alert_test.flux",
								Source: "_check_name",
								Start: ast.Position{
									Column: 3,
									Line:   43,
								},
							},
						},
						Name: "_check_name",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 28,
									Line:   43,
								},
								File:   "alert_test.flux",
								Source: "\"Rate Check\"",
								Start: ast.Position{
									Column: 16,
									Line:   43,
								},
							},
						},
						Value: "Rate Check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 18,
								Line:   44,
							},
							File:   "alert_test.flux",
							Source: "_type: \"custom\"",
							Start: ast.Position{
								Column: 3,
								Line:   44,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 8,
									Line:   44,
								},
								File:   "alert_test.flux",
								Source: "_type",
								Start: ast.Position{
									Column: 3,
									Line:   44,
								},
							},
						},
						Name: "_type",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 18,
									Line:   44,
								},
								File:   "alert_test.flux",
								Source: "\"custom\"",
								Start: ast.Position{
									Column: 10,
									Line:   44,
								},
							},
						},
						Value: "custom",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   45,
							},
							File:   "alert_test.flux",
							Source: "tags: {}",
							Start: ast.Position{
								Column: 3,
								Line:   45,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 7,
									Line:   45,
								},
								File:   "alert_test.flux",
								Source: "tags",
								Start: ast.Position{
									Column: 3,
									Line:   45,
								},
							},
						},
						Name: "tags",
					},
					Value: &ast.ObjectExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 11,
									Line:   45,
								},
								File:   "alert_test.flux",
								Source: "{}",
								Start: ast.Position{
									Column: 9,
									Line:   45,
								},
							},
						},
						Properties: []*ast.Property{},
						With:       nil,
					},
				}},
				With: nil,
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 38,
						Line:   48,
					},
					File:   "alert_test.flux",
					Source: "metric_type = \"kafka_message_in_rate\"",
					Start: ast.Position{
						Column: 1,
						Line:   48,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   48,
						},
						File:   "alert_test.flux",
						Source: "metric_type",
						Start: ast.Position{
							Column: 1,
							Line:   48,
						},
					},
				},
				Name: "metric_type",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 38,
							Line:   48,
						},
						File:   "alert_test.flux",
						Source: "\"kafka_message_in_rate\"",
						Start: ast.Position{
							Column: 15,
							Line:   48,
						},
					},
				},
				Value: "kafka_message_in_rate",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 12,
						Line:   49,
					},
					File:   "alert_test.flux",
					Source: "tier = \"ft\"",
					Start: ast.Position{
						Column: 1,
						Line:   49,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 5,
							Line:   49,
						},
						File:   "alert_test.flux",
						Source: "tier",
						Start: ast.Position{
							Column: 1,
							Line:   49,
						},
					},
				},
				Name: "tier",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   49,
						},
						File:   "alert_test.flux",
						Source: "\"ft\"",
						Start: ast.Position{
							Column: 8,
							Line:   49,
						},
					},
				},
				Value: "ft",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   50,
					},
					File:   "alert_test.flux",
					Source: "h_threshold = 10",
					Start: ast.Position{
						Column: 1,
						Line:   50,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   50,
						},
						File:   "alert_test.flux",
						Source: "h_threshold",
						Start: ast.Position{
							Column: 1,
							Line:   50,
						},
					},
				},
				Name: "h_threshold",
			},
			Init: &ast.IntegerLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   50,
						},
						File:   "alert_test.flux",
						Source: "10",
						Start: ast.Position{
							Column: 15,
							Line:   50,
						},
					},
				},
				Value: int64(10),
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 16,
						Line:   51,
					},
					File:   "alert_test.flux",
					Source: "w_threshold = 5",
					Start: ast.Position{
						Column: 1,
						Line:   51,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   51,
						},
						File:   "alert_test.flux",
						Source: "w_threshold",
						Start: ast.Position{
							Column: 1,
							Line:   51,
						},
					},
				},
				Name: "w_threshold",
			},
			Init: &ast.IntegerLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 16,
							Line:   51,
						},
						File:   "alert_test.flux",
						Source: "5",
						Start: ast.Position{
							Column: 15,
							Line:   51,
						},
					},
				},
				Value: int64(5),
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 19,
						Line:   52,
					},
					File:   "alert_test.flux",
					Source: "l_threshold = .002",
					Start: ast.Position{
						Column: 1,
						Line:   52,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   52,
						},
						File:   "alert_test.flux",
						Source: "l_threshold",
						Start: ast.Position{
							Column: 1,
							Line:   52,
						},
					},
				},
				Name: "l_threshold",
			},
			Init: &ast.FloatLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 19,
							Line:   52,
						},
						File:   "alert_test.flux",
						Source: ".002",
						Start: ast.Position{
							Column: 15,
							Line:   52,
						},
					},
				},
				Value: 0.002,
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 32,
						Line:   68,
					},
					File:   "alert_test.flux",
					Source: "tickscript_alert = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold\n    )\n    |> drop(columns: [\"_time\"])",
					Start: ast.Position{
						Column: 1,
						Line:   54,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   54,
						},
						File:   "alert_test.flux",
						Source: "tickscript_alert",
						Start: ast.Position{
							Column: 1,
							Line:   54,
						},
					},
				},
				Name: "tickscript_alert",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 32,
							Line:   68,
						},
						File:   "alert_test.flux",
						Source: "(table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold\n    )\n    |> drop(columns: [\"_time\"])",
						Start: ast.Position{
							Column: 20,
							Line:   54,
						},
					},
				},
				Body: &ast.PipeExpression{
					Argument: &ast.PipeExpression{
						Argument: &ast.PipeExpression{
							Argument: &ast.PipeExpression{
								Argument: &ast.PipeExpression{
									Argument: &ast.PipeExpression{
										Argument: &ast.PipeExpression{
											Argument: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 39,
															Line:   54,
														},
														File:   "alert_test.flux",
														Source: "table",
														Start: ast.Position{
															Column: 34,
															Line:   54,
														},
													},
												},
												Name: "table",
											},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 39,
														Line:   55,
													},
													File:   "alert_test.flux",
													Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)",
													Start: ast.Position{
														Column: 34,
														Line:   54,
													},
												},
											},
											Call: &ast.CallExpression{
												Arguments: []ast.Expression{&ast.ObjectExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 38,
																Line:   55,
															},
															File:   "alert_test.flux",
															Source: "start: 2020-11-25T14:05:00Z",
															Start: ast.Position{
																Column: 11,
																Line:   55,
															},
														},
													},
													Properties: []*ast.Property{&ast.Property{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 38,
																	Line:   55,
																},
																File:   "alert_test.flux",
																Source: "start: 2020-11-25T14:05:00Z",
																Start: ast.Position{
																	Column: 11,
																	Line:   55,
																},
															},
														},
														Key: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 16,
																		Line:   55,
																	},
																	File:   "alert_test.flux",
																	Source: "start",
																	Start: ast.Position{
																		Column: 11,
																		Line:   55,
																	},
																},
															},
															Name: "start",
														},
														Value: &ast.DateTimeLiteral{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 38,
																		Line:   55,
																	},
																	File:   "alert_test.flux",
																	Source: "2020-11-25T14:05:00Z",
																	Start: ast.Position{
																		Column: 18,
																		Line:   55,
																	},
																},
															},
															Value: parser.MustParseTime("2020-11-25T14:05:00Z"),
														},
													}},
													With: nil,
												}},
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 39,
															Line:   55,
														},
														File:   "alert_test.flux",
														Source: "range(start: 2020-11-25T14:05:00Z)",
														Start: ast.Position{
															Column: 5,
															Line:   55,
														},
													},
												},
												Callee: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 10,
																Line:   55,
															},
															File:   "alert_test.flux",
															Source: "range",
															Start: ast.Position{
																Column: 5,
																Line:   55,
															},
														},
													},
													Name: "range",
												},
											},
										},
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 70,
													Line:   56,
												},
												File:   "alert_test.flux",
												Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)",
												Start: ast.Position{
													Column: 34,
													Line:   54,
												},
											},
										},
										Call: &ast.CallExpression{
											Arguments: []ast.Expression{&ast.ObjectExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 69,
															Line:   56,
														},
														File:   "alert_test.flux",
														Source: "fn: (r) => r._field == metric_type and r.realm == tier",
														Start: ast.Position{
															Column: 15,
															Line:   56,
														},
													},
												},
												Properties: []*ast.Property{&ast.Property{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 69,
																Line:   56,
															},
															File:   "alert_test.flux",
															Source: "fn: (r) => r._field == metric_type and r.realm == tier",
															Start: ast.Position{
																Column: 15,
																Line:   56,
															},
														},
													},
													Key: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 17,
																	Line:   56,
																},
																File:   "alert_test.flux",
																Source: "fn",
																Start: ast.Position{
																	Column: 15,
																	Line:   56,
																},
															},
														},
														Name: "fn",
													},
													Value: &ast.FunctionExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 69,
																	Line:   56,
																},
																File:   "alert_test.flux",
																Source: "(r) => r._field == metric_type and r.realm == tier",
																Start: ast.Position{
																	Column: 19,
																	Line:   56,
																},
															},
														},
														Body: &ast.LogicalExpression{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 69,
																		Line:   56,
																	},
																	File:   "alert_test.flux",
																	Source: "r._field == metric_type and r.realm == tier",
																	Start: ast.Position{
																		Column: 26,
																		Line:   56,
																	},
																},
															},
															Left: &ast.BinaryExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 49,
																			Line:   56,
																		},
																		File:   "alert_test.flux",
																		Source: "r._field == metric_type",
																		Start: ast.Position{
																			Column: 26,
																			Line:   56,
																		},
																	},
																},
																Left: &ast.MemberExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 34,
																				Line:   56,
																			},
																			File:   "alert_test.flux",
																			Source: "r._field",
																			Start: ast.Position{
																				Column: 26,
																				Line:   56,
																			},
																		},
																	},
																	Object: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 27,
																					Line:   56,
																				},
																				File:   "alert_test.flux",
																				Source: "r",
																				Start: ast.Position{
																					Column: 26,
																					Line:   56,
																				},
																			},
																		},
																		Name: "r",
																	},
																	Property: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 34,
																					Line:   56,
																				},
																				File:   "alert_test.flux",
																				Source: "_field",
																				Start: ast.Position{
																					Column: 28,
																					Line:   56,
																				},
																			},
																		},
																		Name: "_field",
																	},
																},
																Operator: 17,
																Right: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 49,
																				Line:   56,
																			},
																			File:   "alert_test.flux",
																			Source: "metric_type",
																			Start: ast.Position{
																				Column: 38,
																				Line:   56,
																			},
																		},
																	},
																	Name: "metric_type",
																},
															},
															Operator: 1,
															Right: &ast.BinaryExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 69,
																			Line:   56,
																		},
																		File:   "alert_test.flux",
																		Source: "r.realm == tier",
																		Start: ast.Position{
																			Column: 54,
																			Line:   56,
																		},
																	},
																},
																Left: &ast.MemberExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 61,
																				Line:   56,
																			},
																			File:   "alert_test.flux",
																			Source: "r.realm",
																			Start: ast.Position{
																				Column: 54,
																				Line:   56,
																			},
																		},
																	},
																	Object: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 55,
																					Line:   56,
																				},
																				File:   "alert_test.flux",
																				Source: "r",
																				Start: ast.Position{
																					Column: 54,
																					Line:   56,
																				},
																			},
																		},
																		Name: "r",
																	},
																	Property: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 61,
																					Line:   56,
																				},
																				File:   "alert_test.flux",
																				Source: "realm",
																				Start: ast.Position{
																					Column: 56,
																					Line:   56,
																				},
																			},
																		},
																		Name: "realm",
																	},
																},
																Operator: 17,
																Right: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 69,
																				Line:   56,
																			},
																			File:   "alert_test.flux",
																			Source: "tier",
																			Start: ast.Position{
																				Column: 65,
																				Line:   56,
																			},
																		},
																	},
																	Name: "tier",
																},
															},
														},
														Params: []*ast.Property{&ast.Property{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 21,
																		Line:   56,
																	},
																	File:   "alert_test.flux",
																	Source: "r",
																	Start: ast.Position{
																		Column: 20,
																		Line:   56,
																	},
																},
															},
															Key: &ast.Identifier{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 21,
																			Line:   56,
																		},
																		File:   "alert_test.flux",
																		Source: "r",
																		Start: ast.Position{
																			Column: 20,
																			Line:   56,
																		},
																	},
																},
																Name: "r",
															},
															Value: nil,
														}},
													},
												}},
												With: nil,
											}},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 70,
														Line:   56,
													},
													File:   "alert_test.flux",
													Source: "filter(fn: (r) => r._field == metric_type and r.realm == tier)",
													Start: ast.Position{
														Column: 8,
														Line:   56,
													},
												},
											},
											Callee: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   56,
														},
														File:   "alert_test.flux",
														Source: "filter",
														Start: ast.Position{
															Column: 8,
															Line:   56,
														},
													},
												},
												Name: "filter",
											},
										},
									},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 29,
												Line:   57,
											},
											File:   "alert_test.flux",
											Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()",
											Start: ast.Position{
												Column: 34,
												Line:   54,
											},
										},
									},
									Call: &ast.CallExpression{
										Arguments: nil,
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 29,
													Line:   57,
												},
												File:   "alert_test.flux",
												Source: "schema.fieldsAsCols()",
												Start: ast.Position{
													Column: 8,
													Line:   57,
												},
											},
										},
										Callee: &ast.MemberExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 27,
														Line:   57,
													},
													File:   "alert_test.flux",
													Source: "schema.fieldsAsCols",
													Start: ast.Position{
														Column: 8,
														Line:   57,
													},
												},
											},
											Object: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   57,
														},
														File:   "alert_test.flux",
														Source: "schema",
														Start: ast.Position{
															Column: 8,
															Line:   57,
														},
													},
												},
												Name: "schema",
											},
											Property: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   57,
														},
														File:   "alert_test.flux",
														Source: "fieldsAsCols",
														Start: ast.Position{
															Column: 15,
															Line:   57,
														},
													},
												},
												Name: "fieldsAsCols",
											},
										},
									},
								},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 66,
											Line:   58,
										},
										File:   "alert_test.flux",
										Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")",
										Start: ast.Position{
											Column: 34,
											Line:   54,
										},
									},
								},
								Call: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 65,
													Line:   58,
												},
												File:   "alert_test.flux",
												Source: "column: metric_type, as: \"KafkaMsgRate\"",
												Start: ast.Position{
													Column: 26,
													Line:   58,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 45,
														Line:   58,
													},
													File:   "alert_test.flux",
													Source: "column: metric_type",
													Start: ast.Position{
														Column: 26,
														Line:   58,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   58,
														},
														File:   "alert_test.flux",
														Source: "column",
														Start: ast.Position{
															Column: 26,
															Line:   58,
														},
													},
												},
												Name: "column",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 45,
															Line:   58,
														},
														File:   "alert_test.flux",
														Source: "metric_type",
														Start: ast.Position{
															Column: 34,
															Line:   58,
														},
													},
												},
												Name: "metric_type",
											},
										}, &ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 65,
														Line:   58,
													},
													File:   "alert_test.flux",
													Source: "as: \"KafkaMsgRate\"",
													Start: ast.Position{
														Column: 47,
														Line:   58,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 49,
															Line:   58,
														},
														File:   "alert_test.flux",
														Source: "as",
														Start: ast.Position{
															Column: 47,
															Line:   58,
														},
													},
												},
												Name: "as",
											},
											Value: &ast.StringLiteral{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 65,
															Line:   58,
														},
														File:   "alert_test.flux",
														Source: "\"KafkaMsgRate\"",
														Start: ast.Position{
															Column: 51,
															Line:   58,
														},
													},
												},
												Value: "KafkaMsgRate",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 66,
												Line:   58,
											},
											File:   "alert_test.flux",
											Source: "tickscript.select(column: metric_type, as: \"KafkaMsgRate\")",
											Start: ast.Position{
												Column: 8,
												Line:   58,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 25,
													Line:   58,
												},
												File:   "alert_test.flux",
												Source: "tickscript.select",
												Start: ast.Position{
													Column: 8,
													Line:   58,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
														Line:   58,
													},
													File:   "alert_test.flux",
													Source: "tickscript",
													Start: ast.Position{
														Column: 8,
														Line:   58,
													},
												},
											},
											Name: "tickscript",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 25,
														Line:   58,
													},
													File:   "alert_test.flux",
													Source: "select",
													Start: ast.Position{
														Column: 19,
														Line:   58,
													},
												},
											},
											Name: "select",
										},
									},
								},
							},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 54,
										Line:   59,
									},
									File:   "alert_test.flux",
									Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])",
									Start: ast.Position{
										Column: 34,
										Line:   54,
									},
								},
							},
							Call: &ast.CallExpression{
								Arguments: []ast.Expression{&ast.ObjectExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 53,
												Line:   59,
											},
											File:   "alert_test.flux",
											Source: "columns: [\"host\", \"realm\"]",
											Start: ast.Position{
												Column: 27,
												Line:   59,
											},
										},
									},
									Properties: []*ast.Property{&ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 53,
													Line:   59,
												},
												File:   "alert_test.flux",
												Source: "columns: [\"host\", \"realm\"]",
												Start: ast.Position{
													Column: 27,
													Line:   59,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 34,
														Line:   59,
													},
													File:   "alert_test.flux",
													Source: "columns",
													Start: ast.Position{
														Column: 27,
														Line:   59,
													},
												},
											},
											Name: "columns",
										},
										Value: &ast.ArrayExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 53,
														Line:   59,
													},
													File:   "alert_test.flux",
													Source: "[\"host\", \"realm\"]",
													Start: ast.Position{
														Column: 36,
														Line:   59,
													},
												},
											},
											Elements: []ast.Expression{&ast.StringLiteral{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 43,
															Line:   59,
														},
														File:   "alert_test.flux",
														Source: "\"host\"",
														Start: ast.Position{
															Column: 37,
															Line:   59,
														},
													},
												},
												Value: "host",
											}, &ast.StringLiteral{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 52,
															Line:   59,
														},
														File:   "alert_test.flux",
														Source: "\"realm\"",
														Start: ast.Position{
															Column: 45,
															Line:   59,
														},
													},
												},
												Value: "realm",
											}},
										},
									}},
									With: nil,
								}},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 54,
											Line:   59,
										},
										File:   "alert_test.flux",
										Source: "tickscript.groupBy(columns: [\"host\", \"realm\"])",
										Start: ast.Position{
											Column: 8,
											Line:   59,
										},
									},
								},
								Callee: &ast.MemberExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 26,
												Line:   59,
											},
											File:   "alert_test.flux",
											Source: "tickscript.groupBy",
											Start: ast.Position{
												Column: 8,
												Line:   59,
											},
										},
									},
									Object: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 18,
													Line:   59,
												},
												File:   "alert_test.flux",
												Source: "tickscript",
												Start: ast.Position{
													Column: 8,
													Line:   59,
												},
											},
										},
										Name: "tickscript",
									},
									Property: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 26,
													Line:   59,
												},
												File:   "alert_test.flux",
												Source: "groupBy",
												Start: ast.Position{
													Column: 19,
													Line:   59,
												},
											},
										},
										Name: "groupBy",
									},
								},
							},
						},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 6,
									Line:   67,
								},
								File:   "alert_test.flux",
								Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold\n    )",
								Start: ast.Position{
									Column: 34,
									Line:   54,
								},
							},
						},
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 82,
											Line:   66,
										},
										File:   "alert_test.flux",
										Source: "check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
										Start: ast.Position{
											Column: 9,
											Line:   61,
										},
									},
								},
								Properties: []*ast.Property{&ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 21,
												Line:   61,
											},
											File:   "alert_test.flux",
											Source: "check: check",
											Start: ast.Position{
												Column: 9,
												Line:   61,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 14,
													Line:   61,
												},
												File:   "alert_test.flux",
												Source: "check",
												Start: ast.Position{
													Column: 9,
													Line:   61,
												},
											},
										},
										Name: "check",
									},
									Value: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 21,
													Line:   61,
												},
												File:   "alert_test.flux",
												Source: "check",
												Start: ast.Position{
													Column: 16,
													Line:   61,
												},
											},
										},
										Name: "check",
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 102,
												Line:   62,
											},
											File:   "alert_test.flux",
											Source: "id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\"",
											Start: ast.Position{
												Column: 9,
												Line:   62,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 11,
													Line:   62,
												},
												File:   "alert_test.flux",
												Source: "id",
												Start: ast.Position{
													Column: 9,
													Line:   62,
												},
											},
										},
										Name: "id",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 102,
													Line:   62,
												},
												File:   "alert_test.flux",
												Source: "(r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\"",
												Start: ast.Position{
													Column: 13,
													Line:   62,
												},
											},
										},
										Body: &ast.StringExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 102,
														Line:   62,
													},
													File:   "alert_test.flux",
													Source: "\"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\"",
													Start: ast.Position{
														Column: 20,
														Line:   62,
													},
												},
											},
											Parts: []ast.StringExpressionPart{&ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 28,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: "Realm: ",
														Start: ast.Position{
															Column: 21,
															Line:   62,
														},
													},
												},
												Value: "Realm: ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 38,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: "${r.realm}",
														Start: ast.Position{
															Column: 28,
															Line:   62,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 37,
																Line:   62,
															},
															File:   "alert_test.flux",
															Source: "r.realm",
															Start: ast.Position{
																Column: 30,
																Line:   62,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 31,
																	Line:   62,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 30,
																	Line:   62,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 37,
																	Line:   62,
																},
																File:   "alert_test.flux",
																Source: "realm",
																Start: ast.Position{
																	Column: 32,
																	Line:   62,
																},
															},
														},
														Name: "realm",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 51,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: " - Hostname: ",
														Start: ast.Position{
															Column: 38,
															Line:   62,
														},
													},
												},
												Value: " - Hostname: ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 60,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: "${r.host}",
														Start: ast.Position{
															Column: 51,
															Line:   62,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 59,
																Line:   62,
															},
															File:   "alert_test.flux",
															Source: "r.host",
															Start: ast.Position{
																Column: 53,
																Line:   62,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 54,
																	Line:   62,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 53,
																	Line:   62,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 59,
																	Line:   62,
																},
																File:   "alert_test.flux",
																Source: "host",
																Start: ast.Position{
																	Column: 55,
																	Line:   62,
																},
															},
														},
														Name: "host",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 71,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: " / Metric: ",
														Start: ast.Position{
															Column: 60,
															Line:   62,
														},
													},
												},
												Value: " / Metric: ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 85,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: "${metric_type}",
														Start: ast.Position{
															Column: 71,
															Line:   62,
														},
													},
												},
												Expression: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 84,
																Line:   62,
															},
															File:   "alert_test.flux",
															Source: "metric_type",
															Start: ast.Position{
																Column: 73,
																Line:   62,
															},
														},
													},
													Name: "metric_type",
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 101,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: " threshold alert",
														Start: ast.Position{
															Column: 85,
															Line:   62,
														},
													},
												},
												Value: " threshold alert",
											}},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   62,
													},
													File:   "alert_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 14,
														Line:   62,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 15,
															Line:   62,
														},
														File:   "alert_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 14,
															Line:   62,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 77,
												Line:   63,
											},
											File:   "alert_test.flux",
											Source: "message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\"",
											Start: ast.Position{
												Column: 9,
												Line:   63,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 16,
													Line:   63,
												},
												File:   "alert_test.flux",
												Source: "message",
												Start: ast.Position{
													Column: 9,
													Line:   63,
												},
											},
										},
										Name: "message",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 77,
													Line:   63,
												},
												File:   "alert_test.flux",
												Source: "(r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\"",
												Start: ast.Position{
													Column: 18,
													Line:   63,
												},
											},
										},
										Body: &ast.StringExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 77,
														Line:   63,
													},
													File:   "alert_test.flux",
													Source: "\"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\"",
													Start: ast.Position{
														Column: 25,
														Line:   63,
													},
												},
											},
											Parts: []ast.StringExpressionPart{&ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 33,
															Line:   63,
														},
														File:   "alert_test.flux",
														Source: "${r.id}",
														Start: ast.Position{
															Column: 26,
															Line:   63,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 32,
																Line:   63,
															},
															File:   "alert_test.flux",
															Source: "r.id",
															Start: ast.Position{
																Column: 28,
																Line:   63,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 29,
																	Line:   63,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 28,
																	Line:   63,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 32,
																	Line:   63,
																},
																File:   "alert_test.flux",
																Source: "id",
																Start: ast.Position{
																	Column: 30,
																	Line:   63,
																},
															},
														},
														Name: "id",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 35,
															Line:   63,
														},
														File:   "alert_test.flux",
														Source: ": ",
														Start: ast.Position{
															Column: 33,
															Line:   63,
														},
													},
												},
												Value: ": ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 46,
															Line:   63,
														},
														File:   "alert_test.flux",
														Source: "${r._level}",
														Start: ast.Position{
															Column: 35,
															Line:   63,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 45,
																Line:   63,
															},
															File:   "alert_test.flux",
															Source: "r._level",
															Start: ast.Position{
																Column: 37,
																Line:   63,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 38,
																	Line:   63,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 37,
																	Line:   63,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 45,
																	Line:   63,
																},
																File:   "alert_test.flux",
																Source: "_level",
																Start: ast.Position{
																	Column: 39,
																	Line:   63,
																},
															},
														},
														Name: "_level",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 49,
															Line:   63,
														},
														File:   "alert_test.flux",
														Source: " - ",
														Start: ast.Position{
															Column: 46,
															Line:   63,
														},
													},
												},
												Value: " - ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 76,
															Line:   63,
														},
														File:   "alert_test.flux",
														Source: "${string(v:r.KafkaMsgRate)}",
														Start: ast.Position{
															Column: 49,
															Line:   63,
														},
													},
												},
												Expression: &ast.CallExpression{
													Arguments: []ast.Expression{&ast.ObjectExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 74,
																	Line:   63,
																},
																File:   "alert_test.flux",
																Source: "v:r.KafkaMsgRate",
																Start: ast.Position{
																	Column: 58,
																	Line:   63,
																},
															},
														},
														Properties: []*ast.Property{&ast.Property{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 74,
																		Line:   63,
																	},
																	File:   "alert_test.flux",
																	Source: "v:r.KafkaMsgRate",
																	Start: ast.Position{
																		Column: 58,
																		Line:   63,
																	},
																},
															},
															Key: &ast.Identifier{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 59,
																			Line:   63,
																		},
																		File:   "alert_test.flux",
																		Source: "v",
																		Start: ast.Position{
																			Column: 58,
																			Line:   63,
																		},
																	},
																},
																Name: "v",
															},
															Value: &ast.MemberExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 74,
																			Line:   63,
																		},
																		File:   "alert_test.flux",
																		Source: "r.KafkaMsgRate",
																		Start: ast.Position{
																			Column: 60,
																			Line:   63,
																		},
																	},
																},
																Object: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 61,
																				Line:   63,
																			},
																			File:   "alert_test.flux",
																			Source: "r",
																			Start: ast.Position{
																				Column: 60,
																				Line:   63,
																			},
																		},
																	},
																	Name: "r",
																},
																Property: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 74,
																				Line:   63,
																			},
																			File:   "alert_test.flux",
																			Source: "KafkaMsgRate",
																			Start: ast.Position{
																				Column: 62,
																				Line:   63,
																			},
																		},
																	},
																	Name: "KafkaMsgRate",
																},
															},
														}},
														With: nil,
													}},
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 75,
																Line:   63,
															},
															File:   "alert_test.flux",
															Source: "string(v:r.KafkaMsgRate)",
															Start: ast.Position{
																Column: 51,
																Line:   63,
															},
														},
													},
													Callee: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 57,
																	Line:   63,
																},
																File:   "alert_test.flux",
																Source: "string",
																Start: ast.Position{
																	Column: 51,
																	Line:   63,
																},
															},
														},
														Name: "string",
													},
												},
											}},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 20,
														Line:   63,
													},
													File:   "alert_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 19,
														Line:   63,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 20,
															Line:   63,
														},
														File:   "alert_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 19,
															Line:   63,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 58,
												Line:   64,
											},
											File:   "alert_test.flux",
											Source: "details: (r) => \"some detail: myrealm=${r.realm}\"",
											Start: ast.Position{
												Column: 9,
												Line:   64,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 16,
													Line:   64,
												},
												File:   "alert_test.flux",
												Source: "details",
												Start: ast.Position{
													Column: 9,
													Line:   64,
												},
											},
										},
										Name: "details",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 58,
													Line:   64,
												},
												File:   "alert_test.flux",
												Source: "(r) => \"some detail: myrealm=${r.realm}\"",
												Start: ast.Position{
													Column: 18,
													Line:   64,
												},
											},
										},
										Body: &ast.StringExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 58,
														Line:   64,
													},
													File:   "alert_test.flux",
													Source: "\"some detail: myrealm=${r.realm}\"",
													Start: ast.Position{
														Column: 25,
														Line:   64,
													},
												},
											},
											Parts: []ast.StringExpressionPart{&ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 47,
															Line:   64,
														},
														File:   "alert_test.flux",
														Source: "some detail: myrealm=",
														Start: ast.Position{
															Column: 26,
															Line:   64,
														},
													},
												},
												Value: "some detail: myrealm=",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 57,
															Line:   64,
														},
														File:   "alert_test.flux",
														Source: "${r.realm}",
														Start: ast.Position{
															Column: 47,
															Line:   64,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 56,
																Line:   64,
															},
															File:   "alert_test.flux",
															Source: "r.realm",
															Start: ast.Position{
																Column: 49,
																Line:   64,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 50,
																	Line:   64,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 49,
																	Line:   64,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 56,
																	Line:   64,
																},
																File:   "alert_test.flux",
																Source: "realm",
																Start: ast.Position{
																	Column: 51,
																	Line:   64,
																},
															},
														},
														Name: "realm",
													},
												},
											}},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 20,
														Line:   64,
													},
													File:   "alert_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 19,
														Line:   64,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 20,
															Line:   64,
														},
														File:   "alert_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 19,
															Line:   64,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 82,
												Line:   65,
											},
											File:   "alert_test.flux",
											Source: "crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold",
											Start: ast.Position{
												Column: 9,
												Line:   65,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 13,
													Line:   65,
												},
												File:   "alert_test.flux",
												Source: "crit",
												Start: ast.Position{
													Column: 9,
													Line:   65,
												},
											},
										},
										Name: "crit",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 82,
													Line:   65,
												},
												File:   "alert_test.flux",
												Source: "(r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold",
												Start: ast.Position{
													Column: 15,
													Line:   65,
												},
											},
										},
										Body: &ast.LogicalExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 82,
														Line:   65,
													},
													File:   "alert_test.flux",
													Source: "r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold",
													Start: ast.Position{
														Column: 22,
														Line:   65,
													},
												},
											},
											Left: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 50,
															Line:   65,
														},
														File:   "alert_test.flux",
														Source: "r.KafkaMsgRate > h_threshold",
														Start: ast.Position{
															Column: 22,
															Line:   65,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 36,
																Line:   65,
															},
															File:   "alert_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 22,
																Line:   65,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 23,
																	Line:   65,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 22,
																	Line:   65,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 36,
																	Line:   65,
																},
																File:   "alert_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 24,
																	Line:   65,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 10,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 50,
																Line:   65,
															},
															File:   "alert_test.flux",
															Source: "h_threshold",
															Start: ast.Position{
																Column: 39,
																Line:   65,
															},
														},
													},
													Name: "h_threshold",
												},
											},
											Operator: 2,
											Right: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 82,
															Line:   65,
														},
														File:   "alert_test.flux",
														Source: "r.KafkaMsgRate < l_threshold",
														Start: ast.Position{
															Column: 54,
															Line:   65,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 68,
																Line:   65,
															},
															File:   "alert_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 54,
																Line:   65,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 55,
																	Line:   65,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 54,
																	Line:   65,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 68,
																	Line:   65,
																},
																File:   "alert_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 56,
																	Line:   65,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 8,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 82,
																Line:   65,
															},
															File:   "alert_test.flux",
															Source: "l_threshold",
															Start: ast.Position{
																Column: 71,
																Line:   65,
															},
														},
													},
													Name: "l_threshold",
												},
											},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 17,
														Line:   65,
													},
													File:   "alert_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 16,
														Line:   65,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 17,
															Line:   65,
														},
														File:   "alert_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 16,
															Line:   65,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 82,
												Line:   66,
											},
											File:   "alert_test.flux",
											Source: "warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
											Start: ast.Position{
												Column: 9,
												Line:   66,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 13,
													Line:   66,
												},
												File:   "alert_test.flux",
												Source: "warn",
												Start: ast.Position{
													Column: 9,
													Line:   66,
												},
											},
										},
										Name: "warn",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 82,
													Line:   66,
												},
												File:   "alert_test.flux",
												Source: "(r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
												Start: ast.Position{
													Column: 15,
													Line:   66,
												},
											},
										},
										Body: &ast.LogicalExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 82,
														Line:   66,
													},
													File:   "alert_test.flux",
													Source: "r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
													Start: ast.Position{
														Column: 22,
														Line:   66,
													},
												},
											},
											Left: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 50,
															Line:   66,
														},
														File:   "alert_test.flux",
														Source: "r.KafkaMsgRate > w_threshold",
														Start: ast.Position{
															Column: 22,
															Line:   66,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 36,
																Line:   66,
															},
															File:   "alert_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 22,
																Line:   66,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 23,
																	Line:   66,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 22,
																	Line:   66,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 36,
																	Line:   66,
																},
																File:   "alert_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 24,
																	Line:   66,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 10,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 50,
																Line:   66,
															},
															File:   "alert_test.flux",
															Source: "w_threshold",
															Start: ast.Position{
																Column: 39,
																Line:   66,
															},
														},
													},
													Name: "w_threshold",
												},
											},
											Operator: 2,
											Right: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 82,
															Line:   66,
														},
														File:   "alert_test.flux",
														Source: "r.KafkaMsgRate < l_threshold",
														Start: ast.Position{
															Column: 54,
															Line:   66,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 68,
																Line:   66,
															},
															File:   "alert_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 54,
																Line:   66,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 55,
																	Line:   66,
																},
																File:   "alert_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 54,
																	Line:   66,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 68,
																	Line:   66,
																},
																File:   "alert_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 56,
																	Line:   66,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 8,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 82,
																Line:   66,
															},
															File:   "alert_test.flux",
															Source: "l_threshold",
															Start: ast.Position{
																Column: 71,
																Line:   66,
															},
														},
													},
													Name: "l_threshold",
												},
											},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 17,
														Line:   66,
													},
													File:   "alert_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 16,
														Line:   66,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 17,
															Line:   66,
														},
														File:   "alert_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 16,
															Line:   66,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 6,
										Line:   67,
									},
									File:   "alert_test.flux",
									Source: "tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold\n    )",
									Start: ast.Position{
										Column: 8,
										Line:   60,
									},
								},
							},
							Callee: &ast.MemberExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   60,
										},
										File:   "alert_test.flux",
										Source: "tickscript.alert",
										Start: ast.Position{
											Column: 8,
											Line:   60,
										},
									},
								},
								Object: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 18,
												Line:   60,
											},
											File:   "alert_test.flux",
											Source: "tickscript",
											Start: ast.Position{
												Column: 8,
												Line:   60,
											},
										},
									},
									Name: "tickscript",
								},
								Property: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 24,
												Line:   60,
											},
											File:   "alert_test.flux",
											Source: "alert",
											Start: ast.Position{
												Column: 19,
												Line:   60,
											},
										},
									},
									Name: "alert",
								},
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 32,
								Line:   68,
							},
							File:   "alert_test.flux",
							Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold\n    )\n    |> drop(columns: [\"_time\"])",
							Start: ast.Position{
								Column: 34,
								Line:   54,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   68,
									},
									File:   "alert_test.flux",
									Source: "columns: [\"_time\"]",
									Start: ast.Position{
										Column: 13,
										Line:   68,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 31,
											Line:   68,
										},
										File:   "alert_test.flux",
										Source: "columns: [\"_time\"]",
										Start: ast.Position{
											Column: 13,
											Line:   68,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 20,
												Line:   68,
											},
											File:   "alert_test.flux",
											Source: "columns",
											Start: ast.Position{
												Column: 13,
												Line:   68,
											},
										},
									},
									Name: "columns",
								},
								Value: &ast.ArrayExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 31,
												Line:   68,
											},
											File:   "alert_test.flux",
											Source: "[\"_time\"]",
											Start: ast.Position{
												Column: 22,
												Line:   68,
											},
										},
									},
									Elements: []ast.Expression{&ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 30,
													Line:   68,
												},
												File:   "alert_test.flux",
												Source: "\"_time\"",
												Start: ast.Position{
													Column: 23,
													Line:   68,
												},
											},
										},
										Value: "_time",
									}},
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   68,
								},
								File:   "alert_test.flux",
								Source: "drop(columns: [\"_time\"])",
								Start: ast.Position{
									Column: 8,
									Line:   68,
								},
							},
						},
						Callee: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 12,
										Line:   68,
									},
									File:   "alert_test.flux",
									Source: "drop",
									Start: ast.Position{
										Column: 8,
										Line:   68,
									},
								},
							},
							Name: "drop",
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 29,
								Line:   54,
							},
							File:   "alert_test.flux",
							Source: "table=<-",
							Start: ast.Position{
								Column: 21,
								Line:   54,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   54,
								},
								File:   "alert_test.flux",
								Source: "table",
								Start: ast.Position{
									Column: 21,
									Line:   54,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 29,
								Line:   54,
							},
							File:   "alert_test.flux",
							Source: "<-",
							Start: ast.Position{
								Column: 27,
								Line:   54,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 3,
							Line:   74,
						},
						File:   "alert_test.flux",
						Source: "_tickscript_alert = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
						Start: ast.Position{
							Column: 6,
							Line:   70,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 23,
								Line:   70,
							},
							File:   "alert_test.flux",
							Source: "_tickscript_alert",
							Start: ast.Position{
								Column: 6,
								Line:   70,
							},
						},
					},
					Name: "_tickscript_alert",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 3,
								Line:   74,
							},
							File:   "alert_test.flux",
							Source: "() => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
							Start: ast.Position{
								Column: 26,
								Line:   70,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 3,
									Line:   74,
								},
								File:   "alert_test.flux",
								Source: "({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
								Start: ast.Position{
									Column: 32,
									Line:   70,
								},
							},
						},
						Expression: &ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 2,
										Line:   74,
									},
									File:   "alert_test.flux",
									Source: "{\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n}",
									Start: ast.Position{
										Column: 33,
										Line:   70,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   71,
										},
										File:   "alert_test.flux",
										Source: "input: testing.loadStorage(csv: inData)",
										Start: ast.Position{
											Column: 2,
											Line:   71,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 7,
												Line:   71,
											},
											File:   "alert_test.flux",
											Source: "input",
											Start: ast.Position{
												Column: 2,
												Line:   71,
											},
										},
									},
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   71,
												},
												File:   "alert_test.flux",
												Source: "csv: inData",
												Start: ast.Position{
													Column: 29,
													Line:   71,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 40,
														Line:   71,
													},
													File:   "alert_test.flux",
													Source: "csv: inData",
													Start: ast.Position{
														Column: 29,
														Line:   71,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   71,
														},
														File:   "alert_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 29,
															Line:   71,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 40,
															Line:   71,
														},
														File:   "alert_test.flux",
														Source: "inData",
														Start: ast.Position{
															Column: 34,
															Line:   71,
														},
													},
												},
												Name: "inData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   71,
											},
											File:   "alert_test.flux",
											Source: "testing.loadStorage(csv: inData)",
											Start: ast.Position{
												Column: 9,
												Line:   71,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 28,
													Line:   71,
												},
												File:   "alert_test.flux",
												Source: "testing.loadStorage",
												Start: ast.Position{
													Column: 9,
													Line:   71,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 16,
														Line:   71,
													},
													File:   "alert_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 9,
														Line:   71,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 28,
														Line:   71,
													},
													File:   "alert_test.flux",
													Source: "loadStorage",
													Start: ast.Position{
														Column: 17,
														Line:   71,
													},
												},
											},
											Name: "loadStorage",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 37,
											Line:   72,
										},
										File:   "alert_test.flux",
										Source: "want: testing.loadMem(csv: outData)",
										Start: ast.Position{
											Column: 2,
											Line:   72,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 6,
												Line:   72,
											},
											File:   "alert_test.flux",
											Source: "want",
											Start: ast.Position{
												Column: 2,
												Line:   72,
											},
										},
									},
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 36,
													Line:   72,
												},
												File:   "alert_test.flux",
												Source: "csv: outData",
												Start: ast.Position{
													Column: 24,
													Line:   72,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 36,
														Line:   72,
													},
													File:   "alert_test.flux",
													Source: "csv: outData",
													Start: ast.Position{
														Column: 24,
														Line:   72,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   72,
														},
														File:   "alert_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 24,
															Line:   72,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 36,
															Line:   72,
														},
														File:   "alert_test.flux",
														Source: "outData",
														Start: ast.Position{
															Column: 29,
															Line:   72,
														},
													},
												},
												Name: "outData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 37,
												Line:   72,
											},
											File:   "alert_test.flux",
											Source: "testing.loadMem(csv: outData)",
											Start: ast.Position{
												Column: 8,
												Line:   72,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   72,
												},
												File:   "alert_test.flux",
												Source: "testing.loadMem",
												Start: ast.Position{
													Column: 8,
													Line:   72,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   72,
													},
													File:   "alert_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 8,
														Line:   72,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   72,
													},
													File:   "alert_test.flux",
													Source: "loadMem",
													Start: ast.Position{
														Column: 16,
														Line:   72,
													},
												},
											},
											Name: "loadMem",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 22,
											Line:   73,
										},
										File:   "alert_test.flux",
										Source: "fn: tickscript_alert",
										Start: ast.Position{
											Column: 2,
											Line:   73,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 4,
												Line:   73,
											},
											File:   "alert_test.flux",
											Source: "fn",
											Start: ast.Position{
												Column: 2,
												Line:   73,
											},
										},
									},
									Name: "fn",
								},
								Value: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 22,
												Line:   73,
											},
											File:   "alert_test.flux",
											Source: "tickscript_alert",
											Start: ast.Position{
												Column: 6,
												Line:   73,
											},
										},
									},
									Name: "tickscript_alert",
								},
							}},
							With: nil,
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 3,
						Line:   74,
					},
					File:   "alert_test.flux",
					Source: "test _tickscript_alert = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
					Start: ast.Position{
						Column: 1,
						Line:   70,
					},
				},
			},
		}},
		Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   3,
					},
					File:   "alert_test.flux",
					Source: "import \"testing\"",
					Start: ast.Position{
						Column: 1,
						Line:   3,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   3,
						},
						File:   "alert_test.flux",
						Source: "\"testing\"",
						Start: ast.Position{
							Column: 8,
							Line:   3,
						},
					},
				},
				Value: "testing",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 13,
						Line:   4,
					},
					File:   "alert_test.flux",
					Source: "import \"csv\"",
					Start: ast.Position{
						Column: 1,
						Line:   4,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 13,
							Line:   4,
						},
						File:   "alert_test.flux",
						Source: "\"csv\"",
						Start: ast.Position{
							Column: 8,
							Line:   4,
						},
					},
				},
				Value: "csv",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 39,
						Line:   5,
					},
					File:   "alert_test.flux",
					Source: "import \"contrib/bonitoo-io/tickscript\"",
					Start: ast.Position{
						Column: 1,
						Line:   5,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 39,
							Line:   5,
						},
						File:   "alert_test.flux",
						Source: "\"contrib/bonitoo-io/tickscript\"",
						Start: ast.Position{
							Column: 8,
							Line:   5,
						},
					},
				},
				Value: "contrib/bonitoo-io/tickscript",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 37,
						Line:   6,
					},
					File:   "alert_test.flux",
					Source: "import \"influxdata/influxdb/monitor\"",
					Start: ast.Position{
						Column: 1,
						Line:   6,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 37,
							Line:   6,
						},
						File:   "alert_test.flux",
						Source: "\"influxdata/influxdb/monitor\"",
						Start: ast.Position{
							Column: 8,
							Line:   6,
						},
					},
				},
				Value: "influxdata/influxdb/monitor",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 36,
						Line:   7,
					},
					File:   "alert_test.flux",
					Source: "import \"influxdata/influxdb/schema\"",
					Start: ast.Position{
						Column: 1,
						Line:   7,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 36,
							Line:   7,
						},
						File:   "alert_test.flux",
						Source: "\"influxdata/influxdb/schema\"",
						Start: ast.Position{
							Column: 8,
							Line:   7,
						},
					},
				},
				Value: "influxdata/influxdb/schema",
			},
		}},
		Metadata: "parser-type=rust",
		Name:     "alert_test.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 24,
						Line:   1,
					},
					File:   "alert_test.flux",
					Source: "package tickscript_test",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 24,
							Line:   1,
						},
						File:   "alert_test.flux",
						Source: "tickscript_test",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "tickscript_test",
			},
		},
	}, &ast.File{
		BaseNode: ast.BaseNode{
			Errors: nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
					Column: 3,
					Line:   75,
				},
				File:   "alert_with_topic_test.flux",
				Source: "package tickscript_test\n\nimport \"testing\"\nimport \"csv\"\nimport \"contrib/bonitoo-io/tickscript\"\nimport \"influxdata/influxdb/monitor\"\nimport \"influxdata/influxdb/schema\"\n\noption now = () => (2020-11-25T14:05:30Z)\n\n// overwrite as buckets are not avail in Flux tests\noption monitor.write = (tables=<-) => tables\noption monitor.log = (tables=<-) => tables\n\ninData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"\n\noutData = \"\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm,_topic\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n\"\n\ncheck = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"custom\", // tickscript?\n  tags: {},\n}\n\nmetric_type = \"kafka_message_in_rate\"\ntier = \"ft\"\nh_threshold = 10\nw_threshold = 5\nl_threshold = .002\n\ntickscript_alert = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"\n    )\n    |> drop(columns: [\"_time\"])\n\ntest _tickscript_alert = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
				Start: ast.Position{
					Column: 1,
					Line:   1,
				},
			},
		},
		Body: []ast.Statement{&ast.OptionStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 42,
							Line:   9,
						},
						File:   "alert_with_topic_test.flux",
						Source: "now = () => (2020-11-25T14:05:30Z)",
						Start: ast.Position{
							Column: 8,
							Line:   9,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   9,
							},
							File:   "alert_with_topic_test.flux",
							Source: "now",
							Start: ast.Position{
								Column: 8,
								Line:   9,
							},
						},
					},
					Name: "now",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 42,
								Line:   9,
							},
							File:   "alert_with_topic_test.flux",
							Source: "() => (2020-11-25T14:05:30Z)",
							Start: ast.Position{
								Column: 14,
								Line:   9,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 42,
									Line:   9,
								},
								File:   "alert_with_topic_test.flux",
								Source: "(2020-11-25T14:05:30Z)",
								Start: ast.Position{
									Column: 20,
									Line:   9,
								},
							},
						},
						Expression: &ast.DateTimeLiteral{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 41,
										Line:   9,
									},
									File:   "alert_with_topic_test.flux",
									Source: "2020-11-25T14:05:30Z",
									Start: ast.Position{
										Column: 21,
										Line:   9,
									},
								},
							},
							Value: parser.MustParseTime("2020-11-25T14:05:30Z"),
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 42,
						Line:   9,
					},
					File:   "alert_with_topic_test.flux",
					Source: "option now = () => (2020-11-25T14:05:30Z)",
					Start: ast.Position{
						Column: 1,
						Line:   9,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 45,
							Line:   12,
						},
						File:   "alert_with_topic_test.flux",
						Source: "monitor.write = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   12,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 45,
								Line:   12,
							},
							File:   "alert_with_topic_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 24,
								Line:   12,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 45,
									Line:   12,
								},
								File:   "alert_with_topic_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 39,
									Line:   12,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "alert_with_topic_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 25,
									Line:   12,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   12,
									},
									File:   "alert_with_topic_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 25,
										Line:   12,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "alert_with_topic_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 32,
									Line:   12,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 21,
								Line:   12,
							},
							File:   "alert_with_topic_test.flux",
							Source: "monitor.write",
							Start: ast.Position{
								Column: 8,
								Line:   12,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   12,
								},
								File:   "alert_with_topic_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   12,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 21,
									Line:   12,
								},
								File:   "alert_with_topic_test.flux",
								Source: "write",
								Start: ast.Position{
									Column: 16,
									Line:   12,
								},
							},
						},
						Name: "write",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 45,
						Line:   12,
					},
					File:   "alert_with_topic_test.flux",
					Source: "option monitor.write = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   12,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 43,
							Line:   13,
						},
						File:   "alert_with_topic_test.flux",
						Source: "monitor.log = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   13,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 43,
								Line:   13,
							},
							File:   "alert_with_topic_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 22,
								Line:   13,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 43,
									Line:   13,
								},
								File:   "alert_with_topic_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 37,
									Line:   13,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "alert_with_topic_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 23,
									Line:   13,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 29,
										Line:   13,
									},
									File:   "alert_with_topic_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 23,
										Line:   13,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "alert_with_topic_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 30,
									Line:   13,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 19,
								Line:   13,
							},
							File:   "alert_with_topic_test.flux",
							Source: "monitor.log",
							Start: ast.Position{
								Column: 8,
								Line:   13,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   13,
								},
								File:   "alert_with_topic_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   13,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 19,
									Line:   13,
								},
								File:   "alert_with_topic_test.flux",
								Source: "log",
								Start: ast.Position{
									Column: 16,
									Line:   13,
								},
							},
						},
						Name: "log",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 43,
						Line:   13,
					},
					File:   "alert_with_topic_test.flux",
					Source: "option monitor.log = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   13,
					},
				},
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   26,
					},
					File:   "alert_with_topic_test.flux",
					Source: "inData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   15,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 7,
							Line:   15,
						},
						File:   "alert_with_topic_test.flux",
						Source: "inData",
						Start: ast.Position{
							Column: 1,
							Line:   15,
						},
					},
				},
				Name: "inData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   26,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   15,
						},
					},
				},
				Value: "\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   39,
					},
					File:   "alert_with_topic_test.flux",
					Source: "outData = \"\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm,_topic\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   28,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   28,
						},
						File:   "alert_with_topic_test.flux",
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   28,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   39,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm,_topic\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   28,
						},
					},
				},
				Value: "\n#group,false,false,false,true,true,true,true,false,true,false,true,false,true,false,true,true\n#datatype,string,long,double,string,string,string,string,string,string,long,string,string,string,string,string,string\n#default,_result,,,,,,,,,,,,,,,\n,result,table,KafkaMsgRate,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,details,host,id,realm,_topic\n,,0,1.819231109049999,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.819231109049999,testm,1606313103477635916,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.635878190200181,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.635878190200181,testm,1606313104541635074,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,0,1.33716449678206,rate-check,Rate Check,ok,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: ok - 1.33716449678206,testm,1606313108868317091,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,39.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 39.33716449678206,testm,1606313105623191313,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,1,26.33716449678206,rate-check,Rate Check,crit,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: crit - 26.33716449678206,testm,1606313106696061106,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n,,2,8.33716449678206,rate-check,Rate Check,warn,statuses,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert: warn - 8.33716449678206,testm,1606313107768317097,custom,some detail: myrealm=ft,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate threshold alert,ft,TESTING\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   46,
					},
					File:   "alert_with_topic_test.flux",
					Source: "check = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"custom\", // tickscript?\n  tags: {},\n}",
					Start: ast.Position{
						Column: 1,
						Line:   41,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 6,
							Line:   41,
						},
						File:   "alert_with_topic_test.flux",
						Source: "check",
						Start: ast.Position{
							Column: 1,
							Line:   41,
						},
					},
				},
				Name: "check",
			},
			Init: &ast.ObjectExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   46,
						},
						File:   "alert_with_topic_test.flux",
						Source: "{\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"custom\", // tickscript?\n  tags: {},\n}",
						Start: ast.Position{
							Column: 9,
							Line:   41,
						},
					},
				},
				Properties: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 26,
								Line:   42,
							},
							File:   "alert_with_topic_test.flux",
							Source: "_check_id: \"rate-check\"",
							Start: ast.Position{
								Column: 3,
								Line:   42,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 12,
									Line:   42,
								},
								File:   "alert_with_topic_test.flux",
								Source: "_check_id",
								Start: ast.Position{
									Column: 3,
									Line:   42,
								},
							},
						},
						Name: "_check_id",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   42,
								},
								File:   "alert_with_topic_test.flux",
								Source: "\"rate-check\"",
								Start: ast.Position{
									Column: 14,
									Line:   42,
								},
							},
						},
						Value: "rate-check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 28,
								Line:   43,
							},
							File:   "alert_with_topic_test.flux",
							Source: "_check_name: \"Rate Check\"",
							Start: ast.Position{
								Column: 3,
								Line:   43,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 14,
									Line:   43,
								},
								File:   "alert_with_topic_test.flux",
								Source: "_check_name",
								Start: ast.Position{
									Column: 3,
									Line:   43,
								},
							},
						},
						Name: "_check_name",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 28,
									Line:   43,
								},
								File:   "alert_with_topic_test.flux",
								Source: "\"Rate Check\"",
								Start: ast.Position{
									Column: 16,
									Line:   43,
								},
							},
						},
						Value: "Rate Check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 18,
								Line:   44,
							},
							File:   "alert_with_topic_test.flux",
							Source: "_type: \"custom\"",
							Start: ast.Position{
								Column: 3,
								Line:   44,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 8,
									Line:   44,
								},
								File:   "alert_with_topic_test.flux",
								Source: "_type",
								Start: ast.Position{
									Column: 3,
									Line:   44,
								},
							},
						},
						Name: "_type",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 18,
									Line:   44,
								},
								File:   "alert_with_topic_test.flux",
								Source: "\"custom\"",
								Start: ast.Position{
									Column: 10,
									Line:   44,
								},
							},
						},
						Value: "custom",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   45,
							},
							File:   "alert_with_topic_test.flux",
							Source: "tags: {}",
							Start: ast.Position{
								Column: 3,
								Line:   45,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 7,
									Line:   45,
								},
								File:   "alert_with_topic_test.flux",
								Source: "tags",
								Start: ast.Position{
									Column: 3,
									Line:   45,
								},
							},
						},
						Name: "tags",
					},
					Value: &ast.ObjectExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 11,
									Line:   45,
								},
								File:   "alert_with_topic_test.flux",
								Source: "{}",
								Start: ast.Position{
									Column: 9,
									Line:   45,
								},
							},
						},
						Properties: []*ast.Property{},
						With:       nil,
					},
				}},
				With: nil,
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 38,
						Line:   48,
					},
					File:   "alert_with_topic_test.flux",
					Source: "metric_type = \"kafka_message_in_rate\"",
					Start: ast.Position{
						Column: 1,
						Line:   48,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   48,
						},
						File:   "alert_with_topic_test.flux",
						Source: "metric_type",
						Start: ast.Position{
							Column: 1,
							Line:   48,
						},
					},
				},
				Name: "metric_type",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 38,
							Line:   48,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"kafka_message_in_rate\"",
						Start: ast.Position{
							Column: 15,
							Line:   48,
						},
					},
				},
				Value: "kafka_message_in_rate",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 12,
						Line:   49,
					},
					File:   "alert_with_topic_test.flux",
					Source: "tier = \"ft\"",
					Start: ast.Position{
						Column: 1,
						Line:   49,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 5,
							Line:   49,
						},
						File:   "alert_with_topic_test.flux",
						Source: "tier",
						Start: ast.Position{
							Column: 1,
							Line:   49,
						},
					},
				},
				Name: "tier",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   49,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"ft\"",
						Start: ast.Position{
							Column: 8,
							Line:   49,
						},
					},
				},
				Value: "ft",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   50,
					},
					File:   "alert_with_topic_test.flux",
					Source: "h_threshold = 10",
					Start: ast.Position{
						Column: 1,
						Line:   50,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   50,
						},
						File:   "alert_with_topic_test.flux",
						Source: "h_threshold",
						Start: ast.Position{
							Column: 1,
							Line:   50,
						},
					},
				},
				Name: "h_threshold",
			},
			Init: &ast.IntegerLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   50,
						},
						File:   "alert_with_topic_test.flux",
						Source: "10",
						Start: ast.Position{
							Column: 15,
							Line:   50,
						},
					},
				},
				Value: int64(10),
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 16,
						Line:   51,
					},
					File:   "alert_with_topic_test.flux",
					Source: "w_threshold = 5",
					Start: ast.Position{
						Column: 1,
						Line:   51,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   51,
						},
						File:   "alert_with_topic_test.flux",
						Source: "w_threshold",
						Start: ast.Position{
							Column: 1,
							Line:   51,
						},
					},
				},
				Name: "w_threshold",
			},
			Init: &ast.IntegerLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 16,
							Line:   51,
						},
						File:   "alert_with_topic_test.flux",
						Source: "5",
						Start: ast.Position{
							Column: 15,
							Line:   51,
						},
					},
				},
				Value: int64(5),
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 19,
						Line:   52,
					},
					File:   "alert_with_topic_test.flux",
					Source: "l_threshold = .002",
					Start: ast.Position{
						Column: 1,
						Line:   52,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   52,
						},
						File:   "alert_with_topic_test.flux",
						Source: "l_threshold",
						Start: ast.Position{
							Column: 1,
							Line:   52,
						},
					},
				},
				Name: "l_threshold",
			},
			Init: &ast.FloatLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 19,
							Line:   52,
						},
						File:   "alert_with_topic_test.flux",
						Source: ".002",
						Start: ast.Position{
							Column: 15,
							Line:   52,
						},
					},
				},
				Value: 0.002,
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 32,
						Line:   69,
					},
					File:   "alert_with_topic_test.flux",
					Source: "tickscript_alert = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"\n    )\n    |> drop(columns: [\"_time\"])",
					Start: ast.Position{
						Column: 1,
						Line:   54,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   54,
						},
						File:   "alert_with_topic_test.flux",
						Source: "tickscript_alert",
						Start: ast.Position{
							Column: 1,
							Line:   54,
						},
					},
				},
				Name: "tickscript_alert",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 32,
							Line:   69,
						},
						File:   "alert_with_topic_test.flux",
						Source: "(table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"\n    )\n    |> drop(columns: [\"_time\"])",
						Start: ast.Position{
							Column: 20,
							Line:   54,
						},
					},
				},
				Body: &ast.PipeExpression{
					Argument: &ast.PipeExpression{
						Argument: &ast.PipeExpression{
							Argument: &ast.PipeExpression{
								Argument: &ast.PipeExpression{
									Argument: &ast.PipeExpression{
										Argument: &ast.PipeExpression{
											Argument: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 39,
															Line:   54,
														},
														File:   "alert_with_topic_test.flux",
														Source: "table",
														Start: ast.Position{
															Column: 34,
															Line:   54,
														},
													},
												},
												Name: "table",
											},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 39,
														Line:   55,
													},
													File:   "alert_with_topic_test.flux",
													Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)",
													Start: ast.Position{
														Column: 34,
														Line:   54,
													},
												},
											},
											Call: &ast.CallExpression{
												Arguments: []ast.Expression{&ast.ObjectExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 38,
																Line:   55,
															},
															File:   "alert_with_topic_test.flux",
															Source: "start: 2020-11-25T14:05:00Z",
															Start: ast.Position{
																Column: 11,
																Line:   55,
															},
														},
													},
													Properties: []*ast.Property{&ast.Property{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 38,
																	Line:   55,
																},
																File:   "alert_with_topic_test.flux",
																Source: "start: 2020-11-25T14:05:00Z",
																Start: ast.Position{
																	Column: 11,
																	Line:   55,
																},
															},
														},
														Key: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 16,
																		Line:   55,
																	},
																	File:   "alert_with_topic_test.flux",
																	Source: "start",
																	Start: ast.Position{
																		Column: 11,
																		Line:   55,
																	},
																},
															},
															Name: "start",
														},
														Value: &ast.DateTimeLiteral{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 38,
																		Line:   55,
																	},
																	File:   "alert_with_topic_test.flux",
																	Source: "2020-11-25T14:05:00Z",
																	Start: ast.Position{
																		Column: 18,
																		Line:   55,
																	},
																},
															},
															Value: parser.MustParseTime("2020-11-25T14:05:00Z"),
														},
													}},
													With: nil,
												}},
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 39,
															Line:   55,
														},
														File:   "alert_with_topic_test.flux",
														Source: "range(start: 2020-11-25T14:05:00Z)",
														Start: ast.Position{
															Column: 5,
															Line:   55,
														},
													},
												},
												Callee: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 10,
																Line:   55,
															},
															File:   "alert_with_topic_test.flux",
															Source: "range",
															Start: ast.Position{
																Column: 5,
																Line:   55,
															},
														},
													},
													Name: "range",
												},
											},
										},
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 70,
													Line:   56,
												},
												File:   "alert_with_topic_test.flux",
												Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)",
												Start: ast.Position{
													Column: 34,
													Line:   54,
												},
											},
										},
										Call: &ast.CallExpression{
											Arguments: []ast.Expression{&ast.ObjectExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 69,
															Line:   56,
														},
														File:   "alert_with_topic_test.flux",
														Source: "fn: (r) => r._field == metric_type and r.realm == tier",
														Start: ast.Position{
															Column: 15,
															Line:   56,
														},
													},
												},
												Properties: []*ast.Property{&ast.Property{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 69,
																Line:   56,
															},
															File:   "alert_with_topic_test.flux",
															Source: "fn: (r) => r._field == metric_type and r.realm == tier",
															Start: ast.Position{
																Column: 15,
																Line:   56,
															},
														},
													},
													Key: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 17,
																	Line:   56,
																},
																File:   "alert_with_topic_test.flux",
																Source: "fn",
																Start: ast.Position{
																	Column: 15,
																	Line:   56,
																},
															},
														},
														Name: "fn",
													},
													Value: &ast.FunctionExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 69,
																	Line:   56,
																},
																File:   "alert_with_topic_test.flux",
																Source: "(r) => r._field == metric_type and r.realm == tier",
																Start: ast.Position{
																	Column: 19,
																	Line:   56,
																},
															},
														},
														Body: &ast.LogicalExpression{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 69,
																		Line:   56,
																	},
																	File:   "alert_with_topic_test.flux",
																	Source: "r._field == metric_type and r.realm == tier",
																	Start: ast.Position{
																		Column: 26,
																		Line:   56,
																	},
																},
															},
															Left: &ast.BinaryExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 49,
																			Line:   56,
																		},
																		File:   "alert_with_topic_test.flux",
																		Source: "r._field == metric_type",
																		Start: ast.Position{
																			Column: 26,
																			Line:   56,
																		},
																	},
																},
																Left: &ast.MemberExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 34,
																				Line:   56,
																			},
																			File:   "alert_with_topic_test.flux",
																			Source: "r._field",
																			Start: ast.Position{
																				Column: 26,
																				Line:   56,
																			},
																		},
																	},
																	Object: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 27,
																					Line:   56,
																				},
																				File:   "alert_with_topic_test.flux",
																				Source: "r",
																				Start: ast.Position{
																					Column: 26,
																					Line:   56,
																				},
																			},
																		},
																		Name: "r",
																	},
																	Property: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 34,
																					Line:   56,
																				},
																				File:   "alert_with_topic_test.flux",
																				Source: "_field",
																				Start: ast.Position{
																					Column: 28,
																					Line:   56,
																				},
																			},
																		},
																		Name: "_field",
																	},
																},
																Operator: 17,
																Right: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 49,
																				Line:   56,
																			},
																			File:   "alert_with_topic_test.flux",
																			Source: "metric_type",
																			Start: ast.Position{
																				Column: 38,
																				Line:   56,
																			},
																		},
																	},
																	Name: "metric_type",
																},
															},
															Operator: 1,
															Right: &ast.BinaryExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 69,
																			Line:   56,
																		},
																		File:   "alert_with_topic_test.flux",
																		Source: "r.realm == tier",
																		Start: ast.Position{
																			Column: 54,
																			Line:   56,
																		},
																	},
																},
																Left: &ast.MemberExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 61,
																				Line:   56,
																			},
																			File:   "alert_with_topic_test.flux",
																			Source: "r.realm",
																			Start: ast.Position{
																				Column: 54,
																				Line:   56,
																			},
																		},
																	},
																	Object: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 55,
																					Line:   56,
																				},
																				File:   "alert_with_topic_test.flux",
																				Source: "r",
																				Start: ast.Position{
																					Column: 54,
																					Line:   56,
																				},
																			},
																		},
																		Name: "r",
																	},
																	Property: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 61,
																					Line:   56,
																				},
																				File:   "alert_with_topic_test.flux",
																				Source: "realm",
																				Start: ast.Position{
																					Column: 56,
																					Line:   56,
																				},
																			},
																		},
																		Name: "realm",
																	},
																},
																Operator: 17,
																Right: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 69,
																				Line:   56,
																			},
																			File:   "alert_with_topic_test.flux",
																			Source: "tier",
																			Start: ast.Position{
																				Column: 65,
																				Line:   56,
																			},
																		},
																	},
																	Name: "tier",
																},
															},
														},
														Params: []*ast.Property{&ast.Property{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 21,
																		Line:   56,
																	},
																	File:   "alert_with_topic_test.flux",
																	Source: "r",
																	Start: ast.Position{
																		Column: 20,
																		Line:   56,
																	},
																},
															},
															Key: &ast.Identifier{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 21,
																			Line:   56,
																		},
																		File:   "alert_with_topic_test.flux",
																		Source: "r",
																		Start: ast.Position{
																			Column: 20,
																			Line:   56,
																		},
																	},
																},
																Name: "r",
															},
															Value: nil,
														}},
													},
												}},
												With: nil,
											}},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 70,
														Line:   56,
													},
													File:   "alert_with_topic_test.flux",
													Source: "filter(fn: (r) => r._field == metric_type and r.realm == tier)",
													Start: ast.Position{
														Column: 8,
														Line:   56,
													},
												},
											},
											Callee: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   56,
														},
														File:   "alert_with_topic_test.flux",
														Source: "filter",
														Start: ast.Position{
															Column: 8,
															Line:   56,
														},
													},
												},
												Name: "filter",
											},
										},
									},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 29,
												Line:   57,
											},
											File:   "alert_with_topic_test.flux",
											Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()",
											Start: ast.Position{
												Column: 34,
												Line:   54,
											},
										},
									},
									Call: &ast.CallExpression{
										Arguments: nil,
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 29,
													Line:   57,
												},
												File:   "alert_with_topic_test.flux",
												Source: "schema.fieldsAsCols()",
												Start: ast.Position{
													Column: 8,
													Line:   57,
												},
											},
										},
										Callee: &ast.MemberExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 27,
														Line:   57,
													},
													File:   "alert_with_topic_test.flux",
													Source: "schema.fieldsAsCols",
													Start: ast.Position{
														Column: 8,
														Line:   57,
													},
												},
											},
											Object: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   57,
														},
														File:   "alert_with_topic_test.flux",
														Source: "schema",
														Start: ast.Position{
															Column: 8,
															Line:   57,
														},
													},
												},
												Name: "schema",
											},
											Property: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   57,
														},
														File:   "alert_with_topic_test.flux",
														Source: "fieldsAsCols",
														Start: ast.Position{
															Column: 15,
															Line:   57,
														},
													},
												},
												Name: "fieldsAsCols",
											},
										},
									},
								},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 66,
											Line:   58,
										},
										File:   "alert_with_topic_test.flux",
										Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")",
										Start: ast.Position{
											Column: 34,
											Line:   54,
										},
									},
								},
								Call: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 65,
													Line:   58,
												},
												File:   "alert_with_topic_test.flux",
												Source: "column: metric_type, as: \"KafkaMsgRate\"",
												Start: ast.Position{
													Column: 26,
													Line:   58,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 45,
														Line:   58,
													},
													File:   "alert_with_topic_test.flux",
													Source: "column: metric_type",
													Start: ast.Position{
														Column: 26,
														Line:   58,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   58,
														},
														File:   "alert_with_topic_test.flux",
														Source: "column",
														Start: ast.Position{
															Column: 26,
															Line:   58,
														},
													},
												},
												Name: "column",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 45,
															Line:   58,
														},
														File:   "alert_with_topic_test.flux",
														Source: "metric_type",
														Start: ast.Position{
															Column: 34,
															Line:   58,
														},
													},
												},
												Name: "metric_type",
											},
										}, &ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 65,
														Line:   58,
													},
													File:   "alert_with_topic_test.flux",
													Source: "as: \"KafkaMsgRate\"",
													Start: ast.Position{
														Column: 47,
														Line:   58,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 49,
															Line:   58,
														},
														File:   "alert_with_topic_test.flux",
														Source: "as",
														Start: ast.Position{
															Column: 47,
															Line:   58,
														},
													},
												},
												Name: "as",
											},
											Value: &ast.StringLiteral{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 65,
															Line:   58,
														},
														File:   "alert_with_topic_test.flux",
														Source: "\"KafkaMsgRate\"",
														Start: ast.Position{
															Column: 51,
															Line:   58,
														},
													},
												},
												Value: "KafkaMsgRate",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 66,
												Line:   58,
											},
											File:   "alert_with_topic_test.flux",
											Source: "tickscript.select(column: metric_type, as: \"KafkaMsgRate\")",
											Start: ast.Position{
												Column: 8,
												Line:   58,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 25,
													Line:   58,
												},
												File:   "alert_with_topic_test.flux",
												Source: "tickscript.select",
												Start: ast.Position{
													Column: 8,
													Line:   58,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
														Line:   58,
													},
													File:   "alert_with_topic_test.flux",
													Source: "tickscript",
													Start: ast.Position{
														Column: 8,
														Line:   58,
													},
												},
											},
											Name: "tickscript",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 25,
														Line:   58,
													},
													File:   "alert_with_topic_test.flux",
													Source: "select",
													Start: ast.Position{
														Column: 19,
														Line:   58,
													},
												},
											},
											Name: "select",
										},
									},
								},
							},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 54,
										Line:   59,
									},
									File:   "alert_with_topic_test.flux",
									Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])",
									Start: ast.Position{
										Column: 34,
										Line:   54,
									},
								},
							},
							Call: &ast.CallExpression{
								Arguments: []ast.Expression{&ast.ObjectExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 53,
												Line:   59,
											},
											File:   "alert_with_topic_test.flux",
											Source: "columns: [\"host\", \"realm\"]",
											Start: ast.Position{
												Column: 27,
												Line:   59,
											},
										},
									},
									Properties: []*ast.Property{&ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 53,
													Line:   59,
												},
												File:   "alert_with_topic_test.flux",
												Source: "columns: [\"host\", \"realm\"]",
												Start: ast.Position{
													Column: 27,
													Line:   59,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 34,
														Line:   59,
													},
													File:   "alert_with_topic_test.flux",
													Source: "columns",
													Start: ast.Position{
														Column: 27,
														Line:   59,
													},
												},
											},
											Name: "columns",
										},
										Value: &ast.ArrayExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 53,
														Line:   59,
													},
													File:   "alert_with_topic_test.flux",
													Source: "[\"host\", \"realm\"]",
													Start: ast.Position{
														Column: 36,
														Line:   59,
													},
												},
											},
											Elements: []ast.Expression{&ast.StringLiteral{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 43,
															Line:   59,
														},
														File:   "alert_with_topic_test.flux",
														Source: "\"host\"",
														Start: ast.Position{
															Column: 37,
															Line:   59,
														},
													},
												},
												Value: "host",
											}, &ast.StringLiteral{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 52,
															Line:   59,
														},
														File:   "alert_with_topic_test.flux",
														Source: "\"realm\"",
														Start: ast.Position{
															Column: 45,
															Line:   59,
														},
													},
												},
												Value: "realm",
											}},
										},
									}},
									With: nil,
								}},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 54,
											Line:   59,
										},
										File:   "alert_with_topic_test.flux",
										Source: "tickscript.groupBy(columns: [\"host\", \"realm\"])",
										Start: ast.Position{
											Column: 8,
											Line:   59,
										},
									},
								},
								Callee: &ast.MemberExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 26,
												Line:   59,
											},
											File:   "alert_with_topic_test.flux",
											Source: "tickscript.groupBy",
											Start: ast.Position{
												Column: 8,
												Line:   59,
											},
										},
									},
									Object: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 18,
													Line:   59,
												},
												File:   "alert_with_topic_test.flux",
												Source: "tickscript",
												Start: ast.Position{
													Column: 8,
													Line:   59,
												},
											},
										},
										Name: "tickscript",
									},
									Property: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 26,
													Line:   59,
												},
												File:   "alert_with_topic_test.flux",
												Source: "groupBy",
												Start: ast.Position{
													Column: 19,
													Line:   59,
												},
											},
										},
										Name: "groupBy",
									},
								},
							},
						},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 6,
									Line:   68,
								},
								File:   "alert_with_topic_test.flux",
								Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"\n    )",
								Start: ast.Position{
									Column: 34,
									Line:   54,
								},
							},
						},
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 25,
											Line:   67,
										},
										File:   "alert_with_topic_test.flux",
										Source: "check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"",
										Start: ast.Position{
											Column: 9,
											Line:   61,
										},
									},
								},
								Properties: []*ast.Property{&ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 21,
												Line:   61,
											},
											File:   "alert_with_topic_test.flux",
											Source: "check: check",
											Start: ast.Position{
												Column: 9,
												Line:   61,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 14,
													Line:   61,
												},
												File:   "alert_with_topic_test.flux",
												Source: "check",
												Start: ast.Position{
													Column: 9,
													Line:   61,
												},
											},
										},
										Name: "check",
									},
									Value: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 21,
													Line:   61,
												},
												File:   "alert_with_topic_test.flux",
												Source: "check",
												Start: ast.Position{
													Column: 16,
													Line:   61,
												},
											},
										},
										Name: "check",
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 102,
												Line:   62,
											},
											File:   "alert_with_topic_test.flux",
											Source: "id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\"",
											Start: ast.Position{
												Column: 9,
												Line:   62,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 11,
													Line:   62,
												},
												File:   "alert_with_topic_test.flux",
												Source: "id",
												Start: ast.Position{
													Column: 9,
													Line:   62,
												},
											},
										},
										Name: "id",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 102,
													Line:   62,
												},
												File:   "alert_with_topic_test.flux",
												Source: "(r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\"",
												Start: ast.Position{
													Column: 13,
													Line:   62,
												},
											},
										},
										Body: &ast.StringExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 102,
														Line:   62,
													},
													File:   "alert_with_topic_test.flux",
													Source: "\"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\"",
													Start: ast.Position{
														Column: 20,
														Line:   62,
													},
												},
											},
											Parts: []ast.StringExpressionPart{&ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 28,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: "Realm: ",
														Start: ast.Position{
															Column: 21,
															Line:   62,
														},
													},
												},
												Value: "Realm: ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 38,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${r.realm}",
														Start: ast.Position{
															Column: 28,
															Line:   62,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 37,
																Line:   62,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.realm",
															Start: ast.Position{
																Column: 30,
																Line:   62,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 31,
																	Line:   62,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 30,
																	Line:   62,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 37,
																	Line:   62,
																},
																File:   "alert_with_topic_test.flux",
																Source: "realm",
																Start: ast.Position{
																	Column: 32,
																	Line:   62,
																},
															},
														},
														Name: "realm",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 51,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: " - Hostname: ",
														Start: ast.Position{
															Column: 38,
															Line:   62,
														},
													},
												},
												Value: " - Hostname: ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 60,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${r.host}",
														Start: ast.Position{
															Column: 51,
															Line:   62,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 59,
																Line:   62,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.host",
															Start: ast.Position{
																Column: 53,
																Line:   62,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 54,
																	Line:   62,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 53,
																	Line:   62,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 59,
																	Line:   62,
																},
																File:   "alert_with_topic_test.flux",
																Source: "host",
																Start: ast.Position{
																	Column: 55,
																	Line:   62,
																},
															},
														},
														Name: "host",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 71,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: " / Metric: ",
														Start: ast.Position{
															Column: 60,
															Line:   62,
														},
													},
												},
												Value: " / Metric: ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 85,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${metric_type}",
														Start: ast.Position{
															Column: 71,
															Line:   62,
														},
													},
												},
												Expression: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 84,
																Line:   62,
															},
															File:   "alert_with_topic_test.flux",
															Source: "metric_type",
															Start: ast.Position{
																Column: 73,
																Line:   62,
															},
														},
													},
													Name: "metric_type",
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 101,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: " threshold alert",
														Start: ast.Position{
															Column: 85,
															Line:   62,
														},
													},
												},
												Value: " threshold alert",
											}},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   62,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 14,
														Line:   62,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 15,
															Line:   62,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 14,
															Line:   62,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 77,
												Line:   63,
											},
											File:   "alert_with_topic_test.flux",
											Source: "message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\"",
											Start: ast.Position{
												Column: 9,
												Line:   63,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 16,
													Line:   63,
												},
												File:   "alert_with_topic_test.flux",
												Source: "message",
												Start: ast.Position{
													Column: 9,
													Line:   63,
												},
											},
										},
										Name: "message",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 77,
													Line:   63,
												},
												File:   "alert_with_topic_test.flux",
												Source: "(r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\"",
												Start: ast.Position{
													Column: 18,
													Line:   63,
												},
											},
										},
										Body: &ast.StringExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 77,
														Line:   63,
													},
													File:   "alert_with_topic_test.flux",
													Source: "\"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\"",
													Start: ast.Position{
														Column: 25,
														Line:   63,
													},
												},
											},
											Parts: []ast.StringExpressionPart{&ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 33,
															Line:   63,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${r.id}",
														Start: ast.Position{
															Column: 26,
															Line:   63,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 32,
																Line:   63,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.id",
															Start: ast.Position{
																Column: 28,
																Line:   63,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 29,
																	Line:   63,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 28,
																	Line:   63,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 32,
																	Line:   63,
																},
																File:   "alert_with_topic_test.flux",
																Source: "id",
																Start: ast.Position{
																	Column: 30,
																	Line:   63,
																},
															},
														},
														Name: "id",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 35,
															Line:   63,
														},
														File:   "alert_with_topic_test.flux",
														Source: ": ",
														Start: ast.Position{
															Column: 33,
															Line:   63,
														},
													},
												},
												Value: ": ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 46,
															Line:   63,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${r._level}",
														Start: ast.Position{
															Column: 35,
															Line:   63,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 45,
																Line:   63,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r._level",
															Start: ast.Position{
																Column: 37,
																Line:   63,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 38,
																	Line:   63,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 37,
																	Line:   63,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 45,
																	Line:   63,
																},
																File:   "alert_with_topic_test.flux",
																Source: "_level",
																Start: ast.Position{
																	Column: 39,
																	Line:   63,
																},
															},
														},
														Name: "_level",
													},
												},
											}, &ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 49,
															Line:   63,
														},
														File:   "alert_with_topic_test.flux",
														Source: " - ",
														Start: ast.Position{
															Column: 46,
															Line:   63,
														},
													},
												},
												Value: " - ",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 76,
															Line:   63,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${string(v:r.KafkaMsgRate)}",
														Start: ast.Position{
															Column: 49,
															Line:   63,
														},
													},
												},
												Expression: &ast.CallExpression{
													Arguments: []ast.Expression{&ast.ObjectExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 74,
																	Line:   63,
																},
																File:   "alert_with_topic_test.flux",
																Source: "v:r.KafkaMsgRate",
																Start: ast.Position{
																	Column: 58,
																	Line:   63,
																},
															},
														},
														Properties: []*ast.Property{&ast.Property{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 74,
																		Line:   63,
																	},
																	File:   "alert_with_topic_test.flux",
																	Source: "v:r.KafkaMsgRate",
																	Start: ast.Position{
																		Column: 58,
																		Line:   63,
																	},
																},
															},
															Key: &ast.Identifier{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 59,
																			Line:   63,
																		},
																		File:   "alert_with_topic_test.flux",
																		Source: "v",
																		Start: ast.Position{
																			Column: 58,
																			Line:   63,
																		},
																	},
																},
																Name: "v",
															},
															Value: &ast.MemberExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 74,
																			Line:   63,
																		},
																		File:   "alert_with_topic_test.flux",
																		Source: "r.KafkaMsgRate",
																		Start: ast.Position{
																			Column: 60,
																			Line:   63,
																		},
																	},
																},
																Object: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 61,
																				Line:   63,
																			},
																			File:   "alert_with_topic_test.flux",
																			Source: "r",
																			Start: ast.Position{
																				Column: 60,
																				Line:   63,
																			},
																		},
																	},
																	Name: "r",
																},
																Property: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 74,
																				Line:   63,
																			},
																			File:   "alert_with_topic_test.flux",
																			Source: "KafkaMsgRate",
																			Start: ast.Position{
																				Column: 62,
																				Line:   63,
																			},
																		},
																	},
																	Name: "KafkaMsgRate",
																},
															},
														}},
														With: nil,
													}},
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 75,
																Line:   63,
															},
															File:   "alert_with_topic_test.flux",
															Source: "string(v:r.KafkaMsgRate)",
															Start: ast.Position{
																Column: 51,
																Line:   63,
															},
														},
													},
													Callee: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 57,
																	Line:   63,
																},
																File:   "alert_with_topic_test.flux",
																Source: "string",
																Start: ast.Position{
																	Column: 51,
																	Line:   63,
																},
															},
														},
														Name: "string",
													},
												},
											}},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 20,
														Line:   63,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 19,
														Line:   63,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 20,
															Line:   63,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 19,
															Line:   63,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 58,
												Line:   64,
											},
											File:   "alert_with_topic_test.flux",
											Source: "details: (r) => \"some detail: myrealm=${r.realm}\"",
											Start: ast.Position{
												Column: 9,
												Line:   64,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 16,
													Line:   64,
												},
												File:   "alert_with_topic_test.flux",
												Source: "details",
												Start: ast.Position{
													Column: 9,
													Line:   64,
												},
											},
										},
										Name: "details",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 58,
													Line:   64,
												},
												File:   "alert_with_topic_test.flux",
												Source: "(r) => \"some detail: myrealm=${r.realm}\"",
												Start: ast.Position{
													Column: 18,
													Line:   64,
												},
											},
										},
										Body: &ast.StringExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 58,
														Line:   64,
													},
													File:   "alert_with_topic_test.flux",
													Source: "\"some detail: myrealm=${r.realm}\"",
													Start: ast.Position{
														Column: 25,
														Line:   64,
													},
												},
											},
											Parts: []ast.StringExpressionPart{&ast.TextPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 47,
															Line:   64,
														},
														File:   "alert_with_topic_test.flux",
														Source: "some detail: myrealm=",
														Start: ast.Position{
															Column: 26,
															Line:   64,
														},
													},
												},
												Value: "some detail: myrealm=",
											}, &ast.InterpolatedPart{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 57,
															Line:   64,
														},
														File:   "alert_with_topic_test.flux",
														Source: "${r.realm}",
														Start: ast.Position{
															Column: 47,
															Line:   64,
														},
													},
												},
												Expression: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 56,
																Line:   64,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.realm",
															Start: ast.Position{
																Column: 49,
																Line:   64,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 50,
																	Line:   64,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 49,
																	Line:   64,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 56,
																	Line:   64,
																},
																File:   "alert_with_topic_test.flux",
																Source: "realm",
																Start: ast.Position{
																	Column: 51,
																	Line:   64,
																},
															},
														},
														Name: "realm",
													},
												},
											}},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 20,
														Line:   64,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 19,
														Line:   64,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 20,
															Line:   64,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 19,
															Line:   64,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 82,
												Line:   65,
											},
											File:   "alert_with_topic_test.flux",
											Source: "crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold",
											Start: ast.Position{
												Column: 9,
												Line:   65,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 13,
													Line:   65,
												},
												File:   "alert_with_topic_test.flux",
												Source: "crit",
												Start: ast.Position{
													Column: 9,
													Line:   65,
												},
											},
										},
										Name: "crit",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 82,
													Line:   65,
												},
												File:   "alert_with_topic_test.flux",
												Source: "(r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold",
												Start: ast.Position{
													Column: 15,
													Line:   65,
												},
											},
										},
										Body: &ast.LogicalExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 82,
														Line:   65,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold",
													Start: ast.Position{
														Column: 22,
														Line:   65,
													},
												},
											},
											Left: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 50,
															Line:   65,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r.KafkaMsgRate > h_threshold",
														Start: ast.Position{
															Column: 22,
															Line:   65,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 36,
																Line:   65,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 22,
																Line:   65,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 23,
																	Line:   65,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 22,
																	Line:   65,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 36,
																	Line:   65,
																},
																File:   "alert_with_topic_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 24,
																	Line:   65,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 10,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 50,
																Line:   65,
															},
															File:   "alert_with_topic_test.flux",
															Source: "h_threshold",
															Start: ast.Position{
																Column: 39,
																Line:   65,
															},
														},
													},
													Name: "h_threshold",
												},
											},
											Operator: 2,
											Right: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 82,
															Line:   65,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r.KafkaMsgRate < l_threshold",
														Start: ast.Position{
															Column: 54,
															Line:   65,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 68,
																Line:   65,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 54,
																Line:   65,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 55,
																	Line:   65,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 54,
																	Line:   65,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 68,
																	Line:   65,
																},
																File:   "alert_with_topic_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 56,
																	Line:   65,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 8,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 82,
																Line:   65,
															},
															File:   "alert_with_topic_test.flux",
															Source: "l_threshold",
															Start: ast.Position{
																Column: 71,
																Line:   65,
															},
														},
													},
													Name: "l_threshold",
												},
											},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 17,
														Line:   65,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 16,
														Line:   65,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 17,
															Line:   65,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 16,
															Line:   65,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 82,
												Line:   66,
											},
											File:   "alert_with_topic_test.flux",
											Source: "warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
											Start: ast.Position{
												Column: 9,
												Line:   66,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 13,
													Line:   66,
												},
												File:   "alert_with_topic_test.flux",
												Source: "warn",
												Start: ast.Position{
													Column: 9,
													Line:   66,
												},
											},
										},
										Name: "warn",
									},
									Value: &ast.FunctionExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 82,
													Line:   66,
												},
												File:   "alert_with_topic_test.flux",
												Source: "(r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
												Start: ast.Position{
													Column: 15,
													Line:   66,
												},
											},
										},
										Body: &ast.LogicalExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 82,
														Line:   66,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold",
													Start: ast.Position{
														Column: 22,
														Line:   66,
													},
												},
											},
											Left: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 50,
															Line:   66,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r.KafkaMsgRate > w_threshold",
														Start: ast.Position{
															Column: 22,
															Line:   66,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 36,
																Line:   66,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 22,
																Line:   66,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 23,
																	Line:   66,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 22,
																	Line:   66,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 36,
																	Line:   66,
																},
																File:   "alert_with_topic_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 24,
																	Line:   66,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 10,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 50,
																Line:   66,
															},
															File:   "alert_with_topic_test.flux",
															Source: "w_threshold",
															Start: ast.Position{
																Column: 39,
																Line:   66,
															},
														},
													},
													Name: "w_threshold",
												},
											},
											Operator: 2,
											Right: &ast.BinaryExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 82,
															Line:   66,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r.KafkaMsgRate < l_threshold",
														Start: ast.Position{
															Column: 54,
															Line:   66,
														},
													},
												},
												Left: &ast.MemberExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 68,
																Line:   66,
															},
															File:   "alert_with_topic_test.flux",
															Source: "r.KafkaMsgRate",
															Start: ast.Position{
																Column: 54,
																Line:   66,
															},
														},
													},
													Object: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 55,
																	Line:   66,
																},
																File:   "alert_with_topic_test.flux",
																Source: "r",
																Start: ast.Position{
																	Column: 54,
																	Line:   66,
																},
															},
														},
														Name: "r",
													},
													Property: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 68,
																	Line:   66,
																},
																File:   "alert_with_topic_test.flux",
																Source: "KafkaMsgRate",
																Start: ast.Position{
																	Column: 56,
																	Line:   66,
																},
															},
														},
														Name: "KafkaMsgRate",
													},
												},
												Operator: 8,
												Right: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 82,
																Line:   66,
															},
															File:   "alert_with_topic_test.flux",
															Source: "l_threshold",
															Start: ast.Position{
																Column: 71,
																Line:   66,
															},
														},
													},
													Name: "l_threshold",
												},
											},
										},
										Params: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 17,
														Line:   66,
													},
													File:   "alert_with_topic_test.flux",
													Source: "r",
													Start: ast.Position{
														Column: 16,
														Line:   66,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 17,
															Line:   66,
														},
														File:   "alert_with_topic_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 16,
															Line:   66,
														},
													},
												},
												Name: "r",
											},
											Value: nil,
										}},
									},
								}, &ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 25,
												Line:   67,
											},
											File:   "alert_with_topic_test.flux",
											Source: "topic: \"TESTING\"",
											Start: ast.Position{
												Column: 9,
												Line:   67,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 14,
													Line:   67,
												},
												File:   "alert_with_topic_test.flux",
												Source: "topic",
												Start: ast.Position{
													Column: 9,
													Line:   67,
												},
											},
										},
										Name: "topic",
									},
									Value: &ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 25,
													Line:   67,
												},
												File:   "alert_with_topic_test.flux",
												Source: "\"TESTING\"",
												Start: ast.Position{
													Column: 16,
													Line:   67,
												},
											},
										},
										Value: "TESTING",
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 6,
										Line:   68,
									},
									File:   "alert_with_topic_test.flux",
									Source: "tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"\n    )",
									Start: ast.Position{
										Column: 8,
										Line:   60,
									},
								},
							},
							Callee: &ast.MemberExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   60,
										},
										File:   "alert_with_topic_test.flux",
										Source: "tickscript.alert",
										Start: ast.Position{
											Column: 8,
											Line:   60,
										},
									},
								},
								Object: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 18,
												Line:   60,
											},
											File:   "alert_with_topic_test.flux",
											Source: "tickscript",
											Start: ast.Position{
												Column: 8,
												Line:   60,
											},
										},
									},
									Name: "tickscript",
								},
								Property: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 24,
												Line:   60,
											},
											File:   "alert_with_topic_test.flux",
											Source: "alert",
											Start: ast.Position{
												Column: 19,
												Line:   60,
											},
										},
									},
									Name: "alert",
								},
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 32,
								Line:   69,
							},
							File:   "alert_with_topic_test.flux",
							Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.select(column: metric_type, as: \"KafkaMsgRate\")\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.alert(\n        check: check,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} threshold alert\",\n        message: (r) => \"${r.id}: ${r._level} - ${string(v:r.KafkaMsgRate)}\",\n        details: (r) => \"some detail: myrealm=${r.realm}\",\n        crit: (r) => r.KafkaMsgRate > h_threshold or r.KafkaMsgRate < l_threshold,\n        warn: (r) => r.KafkaMsgRate > w_threshold or r.KafkaMsgRate < l_threshold,\n        topic: \"TESTING\"\n    )\n    |> drop(columns: [\"_time\"])",
							Start: ast.Position{
								Column: 34,
								Line:   54,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   69,
									},
									File:   "alert_with_topic_test.flux",
									Source: "columns: [\"_time\"]",
									Start: ast.Position{
										Column: 13,
										Line:   69,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 31,
											Line:   69,
										},
										File:   "alert_with_topic_test.flux",
										Source: "columns: [\"_time\"]",
										Start: ast.Position{
											Column: 13,
											Line:   69,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 20,
												Line:   69,
											},
											File:   "alert_with_topic_test.flux",
											Source: "columns",
											Start: ast.Position{
												Column: 13,
												Line:   69,
											},
										},
									},
									Name: "columns",
								},
								Value: &ast.ArrayExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 31,
												Line:   69,
											},
											File:   "alert_with_topic_test.flux",
											Source: "[\"_time\"]",
											Start: ast.Position{
												Column: 22,
												Line:   69,
											},
										},
									},
									Elements: []ast.Expression{&ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 30,
													Line:   69,
												},
												File:   "alert_with_topic_test.flux",
												Source: "\"_time\"",
												Start: ast.Position{
													Column: 23,
													Line:   69,
												},
											},
										},
										Value: "_time",
									}},
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   69,
								},
								File:   "alert_with_topic_test.flux",
								Source: "drop(columns: [\"_time\"])",
								Start: ast.Position{
									Column: 8,
									Line:   69,
								},
							},
						},
						Callee: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 12,
										Line:   69,
									},
									File:   "alert_with_topic_test.flux",
									Source: "drop",
									Start: ast.Position{
										Column: 8,
										Line:   69,
									},
								},
							},
							Name: "drop",
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 29,
								Line:   54,
							},
							File:   "alert_with_topic_test.flux",
							Source: "table=<-",
							Start: ast.Position{
								Column: 21,
								Line:   54,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   54,
								},
								File:   "alert_with_topic_test.flux",
								Source: "table",
								Start: ast.Position{
									Column: 21,
									Line:   54,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 29,
								Line:   54,
							},
							File:   "alert_with_topic_test.flux",
							Source: "<-",
							Start: ast.Position{
								Column: 27,
								Line:   54,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 3,
							Line:   75,
						},
						File:   "alert_with_topic_test.flux",
						Source: "_tickscript_alert = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
						Start: ast.Position{
							Column: 6,
							Line:   71,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 23,
								Line:   71,
							},
							File:   "alert_with_topic_test.flux",
							Source: "_tickscript_alert",
							Start: ast.Position{
								Column: 6,
								Line:   71,
							},
						},
					},
					Name: "_tickscript_alert",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 3,
								Line:   75,
							},
							File:   "alert_with_topic_test.flux",
							Source: "() => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
							Start: ast.Position{
								Column: 26,
								Line:   71,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 3,
									Line:   75,
								},
								File:   "alert_with_topic_test.flux",
								Source: "({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
								Start: ast.Position{
									Column: 32,
									Line:   71,
								},
							},
						},
						Expression: &ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 2,
										Line:   75,
									},
									File:   "alert_with_topic_test.flux",
									Source: "{\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n}",
									Start: ast.Position{
										Column: 33,
										Line:   71,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   72,
										},
										File:   "alert_with_topic_test.flux",
										Source: "input: testing.loadStorage(csv: inData)",
										Start: ast.Position{
											Column: 2,
											Line:   72,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 7,
												Line:   72,
											},
											File:   "alert_with_topic_test.flux",
											Source: "input",
											Start: ast.Position{
												Column: 2,
												Line:   72,
											},
										},
									},
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   72,
												},
												File:   "alert_with_topic_test.flux",
												Source: "csv: inData",
												Start: ast.Position{
													Column: 29,
													Line:   72,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 40,
														Line:   72,
													},
													File:   "alert_with_topic_test.flux",
													Source: "csv: inData",
													Start: ast.Position{
														Column: 29,
														Line:   72,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   72,
														},
														File:   "alert_with_topic_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 29,
															Line:   72,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 40,
															Line:   72,
														},
														File:   "alert_with_topic_test.flux",
														Source: "inData",
														Start: ast.Position{
															Column: 34,
															Line:   72,
														},
													},
												},
												Name: "inData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   72,
											},
											File:   "alert_with_topic_test.flux",
											Source: "testing.loadStorage(csv: inData)",
											Start: ast.Position{
												Column: 9,
												Line:   72,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 28,
													Line:   72,
												},
												File:   "alert_with_topic_test.flux",
												Source: "testing.loadStorage",
												Start: ast.Position{
													Column: 9,
													Line:   72,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 16,
														Line:   72,
													},
													File:   "alert_with_topic_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 9,
														Line:   72,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 28,
														Line:   72,
													},
													File:   "alert_with_topic_test.flux",
													Source: "loadStorage",
													Start: ast.Position{
														Column: 17,
														Line:   72,
													},
												},
											},
											Name: "loadStorage",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 37,
											Line:   73,
										},
										File:   "alert_with_topic_test.flux",
										Source: "want: testing.loadMem(csv: outData)",
										Start: ast.Position{
											Column: 2,
											Line:   73,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 6,
												Line:   73,
											},
											File:   "alert_with_topic_test.flux",
											Source: "want",
											Start: ast.Position{
												Column: 2,
												Line:   73,
											},
										},
									},
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 36,
													Line:   73,
												},
												File:   "alert_with_topic_test.flux",
												Source: "csv: outData",
												Start: ast.Position{
													Column: 24,
													Line:   73,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 36,
														Line:   73,
													},
													File:   "alert_with_topic_test.flux",
													Source: "csv: outData",
													Start: ast.Position{
														Column: 24,
														Line:   73,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   73,
														},
														File:   "alert_with_topic_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 24,
															Line:   73,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 36,
															Line:   73,
														},
														File:   "alert_with_topic_test.flux",
														Source: "outData",
														Start: ast.Position{
															Column: 29,
															Line:   73,
														},
													},
												},
												Name: "outData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 37,
												Line:   73,
											},
											File:   "alert_with_topic_test.flux",
											Source: "testing.loadMem(csv: outData)",
											Start: ast.Position{
												Column: 8,
												Line:   73,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   73,
												},
												File:   "alert_with_topic_test.flux",
												Source: "testing.loadMem",
												Start: ast.Position{
													Column: 8,
													Line:   73,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   73,
													},
													File:   "alert_with_topic_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 8,
														Line:   73,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   73,
													},
													File:   "alert_with_topic_test.flux",
													Source: "loadMem",
													Start: ast.Position{
														Column: 16,
														Line:   73,
													},
												},
											},
											Name: "loadMem",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 22,
											Line:   74,
										},
										File:   "alert_with_topic_test.flux",
										Source: "fn: tickscript_alert",
										Start: ast.Position{
											Column: 2,
											Line:   74,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 4,
												Line:   74,
											},
											File:   "alert_with_topic_test.flux",
											Source: "fn",
											Start: ast.Position{
												Column: 2,
												Line:   74,
											},
										},
									},
									Name: "fn",
								},
								Value: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 22,
												Line:   74,
											},
											File:   "alert_with_topic_test.flux",
											Source: "tickscript_alert",
											Start: ast.Position{
												Column: 6,
												Line:   74,
											},
										},
									},
									Name: "tickscript_alert",
								},
							}},
							With: nil,
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 3,
						Line:   75,
					},
					File:   "alert_with_topic_test.flux",
					Source: "test _tickscript_alert = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_alert,\n})",
					Start: ast.Position{
						Column: 1,
						Line:   71,
					},
				},
			},
		}},
		Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   3,
					},
					File:   "alert_with_topic_test.flux",
					Source: "import \"testing\"",
					Start: ast.Position{
						Column: 1,
						Line:   3,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   3,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"testing\"",
						Start: ast.Position{
							Column: 8,
							Line:   3,
						},
					},
				},
				Value: "testing",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 13,
						Line:   4,
					},
					File:   "alert_with_topic_test.flux",
					Source: "import \"csv\"",
					Start: ast.Position{
						Column: 1,
						Line:   4,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 13,
							Line:   4,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"csv\"",
						Start: ast.Position{
							Column: 8,
							Line:   4,
						},
					},
				},
				Value: "csv",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 39,
						Line:   5,
					},
					File:   "alert_with_topic_test.flux",
					Source: "import \"contrib/bonitoo-io/tickscript\"",
					Start: ast.Position{
						Column: 1,
						Line:   5,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 39,
							Line:   5,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"contrib/bonitoo-io/tickscript\"",
						Start: ast.Position{
							Column: 8,
							Line:   5,
						},
					},
				},
				Value: "contrib/bonitoo-io/tickscript",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 37,
						Line:   6,
					},
					File:   "alert_with_topic_test.flux",
					Source: "import \"influxdata/influxdb/monitor\"",
					Start: ast.Position{
						Column: 1,
						Line:   6,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 37,
							Line:   6,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"influxdata/influxdb/monitor\"",
						Start: ast.Position{
							Column: 8,
							Line:   6,
						},
					},
				},
				Value: "influxdata/influxdb/monitor",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 36,
						Line:   7,
					},
					File:   "alert_with_topic_test.flux",
					Source: "import \"influxdata/influxdb/schema\"",
					Start: ast.Position{
						Column: 1,
						Line:   7,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 36,
							Line:   7,
						},
						File:   "alert_with_topic_test.flux",
						Source: "\"influxdata/influxdb/schema\"",
						Start: ast.Position{
							Column: 8,
							Line:   7,
						},
					},
				},
				Value: "influxdata/influxdb/schema",
			},
		}},
		Metadata: "parser-type=rust",
		Name:     "alert_with_topic_test.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 24,
						Line:   1,
					},
					File:   "alert_with_topic_test.flux",
					Source: "package tickscript_test",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 24,
							Line:   1,
						},
						File:   "alert_with_topic_test.flux",
						Source: "tickscript_test",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "tickscript_test",
			},
		},
	}, &ast.File{
		BaseNode: ast.BaseNode{
			Errors: nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
					Column: 3,
					Line:   64,
				},
				File:   "deadman_empty_test.flux",
				Source: "package tickscript_test\n\nimport \"testing\"\nimport \"csv\"\nimport \"contrib/bonitoo-io/tickscript\"\nimport \"influxdata/influxdb/monitor\"\nimport \"influxdata/influxdb/schema\"\n\noption now = () => (2020-11-25T14:05:30Z)\n\n// overwrite as buckets are not avail in Flux tests\noption monitor.write = (tables=<-) => tables\noption monitor.log = (tables=<-) => tables\n\ninData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"\n\noutData = \"\n#group,false,false,true,true,true,true,false,true,false,true,false,false\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string\n#default,_result,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,id\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,Realm: ft - Hostname: unknown / Metric: kafka_message_in_rate deadman alert\n\"\n\ncheck = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"deadman\", // tickscript?\n  tags: {},\n}\n\nmetric_type = \"kafka_message_in_rate\"\ntier = \"ft\"\n\ntickscript_deadman = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])\n\ntest _tickscript_deadman = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
				Start: ast.Position{
					Column: 1,
					Line:   1,
				},
			},
		},
		Body: []ast.Statement{&ast.OptionStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 42,
							Line:   9,
						},
						File:   "deadman_empty_test.flux",
						Source: "now = () => (2020-11-25T14:05:30Z)",
						Start: ast.Position{
							Column: 8,
							Line:   9,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   9,
							},
							File:   "deadman_empty_test.flux",
							Source: "now",
							Start: ast.Position{
								Column: 8,
								Line:   9,
							},
						},
					},
					Name: "now",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 42,
								Line:   9,
							},
							File:   "deadman_empty_test.flux",
							Source: "() => (2020-11-25T14:05:30Z)",
							Start: ast.Position{
								Column: 14,
								Line:   9,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 42,
									Line:   9,
								},
								File:   "deadman_empty_test.flux",
								Source: "(2020-11-25T14:05:30Z)",
								Start: ast.Position{
									Column: 20,
									Line:   9,
								},
							},
						},
						Expression: &ast.DateTimeLiteral{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 41,
										Line:   9,
									},
									File:   "deadman_empty_test.flux",
									Source: "2020-11-25T14:05:30Z",
									Start: ast.Position{
										Column: 21,
										Line:   9,
									},
								},
							},
							Value: parser.MustParseTime("2020-11-25T14:05:30Z"),
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 42,
						Line:   9,
					},
					File:   "deadman_empty_test.flux",
					Source: "option now = () => (2020-11-25T14:05:30Z)",
					Start: ast.Position{
						Column: 1,
						Line:   9,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 45,
							Line:   12,
						},
						File:   "deadman_empty_test.flux",
						Source: "monitor.write = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   12,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 45,
								Line:   12,
							},
							File:   "deadman_empty_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 24,
								Line:   12,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 45,
									Line:   12,
								},
								File:   "deadman_empty_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 39,
									Line:   12,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "deadman_empty_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 25,
									Line:   12,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   12,
									},
									File:   "deadman_empty_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 25,
										Line:   12,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "deadman_empty_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 32,
									Line:   12,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 21,
								Line:   12,
							},
							File:   "deadman_empty_test.flux",
							Source: "monitor.write",
							Start: ast.Position{
								Column: 8,
								Line:   12,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   12,
								},
								File:   "deadman_empty_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   12,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 21,
									Line:   12,
								},
								File:   "deadman_empty_test.flux",
								Source: "write",
								Start: ast.Position{
									Column: 16,
									Line:   12,
								},
							},
						},
						Name: "write",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 45,
						Line:   12,
					},
					File:   "deadman_empty_test.flux",
					Source: "option monitor.write = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   12,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 43,
							Line:   13,
						},
						File:   "deadman_empty_test.flux",
						Source: "monitor.log = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   13,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 43,
								Line:   13,
							},
							File:   "deadman_empty_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 22,
								Line:   13,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 43,
									Line:   13,
								},
								File:   "deadman_empty_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 37,
									Line:   13,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "deadman_empty_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 23,
									Line:   13,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 29,
										Line:   13,
									},
									File:   "deadman_empty_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 23,
										Line:   13,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "deadman_empty_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 30,
									Line:   13,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 19,
								Line:   13,
							},
							File:   "deadman_empty_test.flux",
							Source: "monitor.log",
							Start: ast.Position{
								Column: 8,
								Line:   13,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   13,
								},
								File:   "deadman_empty_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   13,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 19,
									Line:   13,
								},
								File:   "deadman_empty_test.flux",
								Source: "log",
								Start: ast.Position{
									Column: 16,
									Line:   13,
								},
							},
						},
						Name: "log",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 43,
						Line:   13,
					},
					File:   "deadman_empty_test.flux",
					Source: "option monitor.log = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   13,
					},
				},
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   26,
					},
					File:   "deadman_empty_test.flux",
					Source: "inData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   15,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 7,
							Line:   15,
						},
						File:   "deadman_empty_test.flux",
						Source: "inData",
						Start: ast.Position{
							Column: 1,
							Line:   15,
						},
					},
				},
				Name: "inData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   26,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   15,
						},
					},
				},
				Value: "\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   34,
					},
					File:   "deadman_empty_test.flux",
					Source: "outData = \"\n#group,false,false,true,true,true,true,false,true,false,true,false,false\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string\n#default,_result,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,id\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,Realm: ft - Hostname: unknown / Metric: kafka_message_in_rate deadman alert\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   28,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   28,
						},
						File:   "deadman_empty_test.flux",
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   28,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   34,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"\n#group,false,false,true,true,true,true,false,true,false,true,false,false\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string\n#default,_result,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,id\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,Realm: ft - Hostname: unknown / Metric: kafka_message_in_rate deadman alert\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   28,
						},
					},
				},
				Value: "\n#group,false,false,true,true,true,true,false,true,false,true,false,false\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string\n#default,_result,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,id\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,Realm: ft - Hostname: unknown / Metric: kafka_message_in_rate deadman alert\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   41,
					},
					File:   "deadman_empty_test.flux",
					Source: "check = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"deadman\", // tickscript?\n  tags: {},\n}",
					Start: ast.Position{
						Column: 1,
						Line:   36,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 6,
							Line:   36,
						},
						File:   "deadman_empty_test.flux",
						Source: "check",
						Start: ast.Position{
							Column: 1,
							Line:   36,
						},
					},
				},
				Name: "check",
			},
			Init: &ast.ObjectExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   41,
						},
						File:   "deadman_empty_test.flux",
						Source: "{\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"deadman\", // tickscript?\n  tags: {},\n}",
						Start: ast.Position{
							Column: 9,
							Line:   36,
						},
					},
				},
				Properties: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 26,
								Line:   37,
							},
							File:   "deadman_empty_test.flux",
							Source: "_check_id: \"rate-check\"",
							Start: ast.Position{
								Column: 3,
								Line:   37,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 12,
									Line:   37,
								},
								File:   "deadman_empty_test.flux",
								Source: "_check_id",
								Start: ast.Position{
									Column: 3,
									Line:   37,
								},
							},
						},
						Name: "_check_id",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   37,
								},
								File:   "deadman_empty_test.flux",
								Source: "\"rate-check\"",
								Start: ast.Position{
									Column: 14,
									Line:   37,
								},
							},
						},
						Value: "rate-check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 28,
								Line:   38,
							},
							File:   "deadman_empty_test.flux",
							Source: "_check_name: \"Rate Check\"",
							Start: ast.Position{
								Column: 3,
								Line:   38,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 14,
									Line:   38,
								},
								File:   "deadman_empty_test.flux",
								Source: "_check_name",
								Start: ast.Position{
									Column: 3,
									Line:   38,
								},
							},
						},
						Name: "_check_name",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 28,
									Line:   38,
								},
								File:   "deadman_empty_test.flux",
								Source: "\"Rate Check\"",
								Start: ast.Position{
									Column: 16,
									Line:   38,
								},
							},
						},
						Value: "Rate Check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 19,
								Line:   39,
							},
							File:   "deadman_empty_test.flux",
							Source: "_type: \"deadman\"",
							Start: ast.Position{
								Column: 3,
								Line:   39,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 8,
									Line:   39,
								},
								File:   "deadman_empty_test.flux",
								Source: "_type",
								Start: ast.Position{
									Column: 3,
									Line:   39,
								},
							},
						},
						Name: "_type",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 19,
									Line:   39,
								},
								File:   "deadman_empty_test.flux",
								Source: "\"deadman\"",
								Start: ast.Position{
									Column: 10,
									Line:   39,
								},
							},
						},
						Value: "deadman",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   40,
							},
							File:   "deadman_empty_test.flux",
							Source: "tags: {}",
							Start: ast.Position{
								Column: 3,
								Line:   40,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 7,
									Line:   40,
								},
								File:   "deadman_empty_test.flux",
								Source: "tags",
								Start: ast.Position{
									Column: 3,
									Line:   40,
								},
							},
						},
						Name: "tags",
					},
					Value: &ast.ObjectExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 11,
									Line:   40,
								},
								File:   "deadman_empty_test.flux",
								Source: "{}",
								Start: ast.Position{
									Column: 9,
									Line:   40,
								},
							},
						},
						Properties: []*ast.Property{},
						With:       nil,
					},
				}},
				With: nil,
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 38,
						Line:   43,
					},
					File:   "deadman_empty_test.flux",
					Source: "metric_type = \"kafka_message_in_rate\"",
					Start: ast.Position{
						Column: 1,
						Line:   43,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   43,
						},
						File:   "deadman_empty_test.flux",
						Source: "metric_type",
						Start: ast.Position{
							Column: 1,
							Line:   43,
						},
					},
				},
				Name: "metric_type",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 38,
							Line:   43,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"kafka_message_in_rate\"",
						Start: ast.Position{
							Column: 15,
							Line:   43,
						},
					},
				},
				Value: "kafka_message_in_rate",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 12,
						Line:   44,
					},
					File:   "deadman_empty_test.flux",
					Source: "tier = \"ft\"",
					Start: ast.Position{
						Column: 1,
						Line:   44,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 5,
							Line:   44,
						},
						File:   "deadman_empty_test.flux",
						Source: "tier",
						Start: ast.Position{
							Column: 1,
							Line:   44,
						},
					},
				},
				Name: "tier",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   44,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"ft\"",
						Start: ast.Position{
							Column: 8,
							Line:   44,
						},
					},
				},
				Value: "ft",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 32,
						Line:   58,
					},
					File:   "deadman_empty_test.flux",
					Source: "tickscript_deadman = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])",
					Start: ast.Position{
						Column: 1,
						Line:   46,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 19,
							Line:   46,
						},
						File:   "deadman_empty_test.flux",
						Source: "tickscript_deadman",
						Start: ast.Position{
							Column: 1,
							Line:   46,
						},
					},
				},
				Name: "tickscript_deadman",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 32,
							Line:   58,
						},
						File:   "deadman_empty_test.flux",
						Source: "(table=<-) => table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])",
						Start: ast.Position{
							Column: 22,
							Line:   46,
						},
					},
				},
				Body: &ast.PipeExpression{
					Argument: &ast.PipeExpression{
						Argument: &ast.PipeExpression{
							Argument: &ast.PipeExpression{
								Argument: &ast.PipeExpression{
									Argument: &ast.PipeExpression{
										Argument: &ast.PipeExpression{
											Argument: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 41,
															Line:   46,
														},
														File:   "deadman_empty_test.flux",
														Source: "table",
														Start: ast.Position{
															Column: 36,
															Line:   46,
														},
													},
												},
												Name: "table",
											},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 39,
														Line:   47,
													},
													File:   "deadman_empty_test.flux",
													Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)",
													Start: ast.Position{
														Column: 36,
														Line:   46,
													},
												},
											},
											Call: &ast.CallExpression{
												Arguments: []ast.Expression{&ast.ObjectExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 38,
																Line:   47,
															},
															File:   "deadman_empty_test.flux",
															Source: "start: 2020-11-25T14:05:15Z",
															Start: ast.Position{
																Column: 11,
																Line:   47,
															},
														},
													},
													Properties: []*ast.Property{&ast.Property{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 38,
																	Line:   47,
																},
																File:   "deadman_empty_test.flux",
																Source: "start: 2020-11-25T14:05:15Z",
																Start: ast.Position{
																	Column: 11,
																	Line:   47,
																},
															},
														},
														Key: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 16,
																		Line:   47,
																	},
																	File:   "deadman_empty_test.flux",
																	Source: "start",
																	Start: ast.Position{
																		Column: 11,
																		Line:   47,
																	},
																},
															},
															Name: "start",
														},
														Value: &ast.DateTimeLiteral{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 38,
																		Line:   47,
																	},
																	File:   "deadman_empty_test.flux",
																	Source: "2020-11-25T14:05:15Z",
																	Start: ast.Position{
																		Column: 18,
																		Line:   47,
																	},
																},
															},
															Value: parser.MustParseTime("2020-11-25T14:05:15Z"),
														},
													}},
													With: nil,
												}},
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 39,
															Line:   47,
														},
														File:   "deadman_empty_test.flux",
														Source: "range(start: 2020-11-25T14:05:15Z)",
														Start: ast.Position{
															Column: 5,
															Line:   47,
														},
													},
												},
												Callee: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 10,
																Line:   47,
															},
															File:   "deadman_empty_test.flux",
															Source: "range",
															Start: ast.Position{
																Column: 5,
																Line:   47,
															},
														},
													},
													Name: "range",
												},
											},
										},
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 100,
													Line:   48,
												},
												File:   "deadman_empty_test.flux",
												Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)",
												Start: ast.Position{
													Column: 36,
													Line:   46,
												},
											},
										},
										Call: &ast.CallExpression{
											Arguments: []ast.Expression{&ast.ObjectExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 99,
															Line:   48,
														},
														File:   "deadman_empty_test.flux",
														Source: "fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
														Start: ast.Position{
															Column: 15,
															Line:   48,
														},
													},
												},
												Properties: []*ast.Property{&ast.Property{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 99,
																Line:   48,
															},
															File:   "deadman_empty_test.flux",
															Source: "fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
															Start: ast.Position{
																Column: 15,
																Line:   48,
															},
														},
													},
													Key: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 17,
																	Line:   48,
																},
																File:   "deadman_empty_test.flux",
																Source: "fn",
																Start: ast.Position{
																	Column: 15,
																	Line:   48,
																},
															},
														},
														Name: "fn",
													},
													Value: &ast.FunctionExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 99,
																	Line:   48,
																},
																File:   "deadman_empty_test.flux",
																Source: "(r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
																Start: ast.Position{
																	Column: 19,
																	Line:   48,
																},
															},
														},
														Body: &ast.LogicalExpression{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 99,
																		Line:   48,
																	},
																	File:   "deadman_empty_test.flux",
																	Source: "r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
																	Start: ast.Position{
																		Column: 26,
																		Line:   48,
																	},
																},
															},
															Left: &ast.LogicalExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 79,
																			Line:   48,
																		},
																		File:   "deadman_empty_test.flux",
																		Source: "r._measurement == \"testm\" and r._field == metric_type",
																		Start: ast.Position{
																			Column: 26,
																			Line:   48,
																		},
																	},
																},
																Left: &ast.BinaryExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 51,
																				Line:   48,
																			},
																			File:   "deadman_empty_test.flux",
																			Source: "r._measurement == \"testm\"",
																			Start: ast.Position{
																				Column: 26,
																				Line:   48,
																			},
																		},
																	},
																	Left: &ast.MemberExpression{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 40,
																					Line:   48,
																				},
																				File:   "deadman_empty_test.flux",
																				Source: "r._measurement",
																				Start: ast.Position{
																					Column: 26,
																					Line:   48,
																				},
																			},
																		},
																		Object: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 27,
																						Line:   48,
																					},
																					File:   "deadman_empty_test.flux",
																					Source: "r",
																					Start: ast.Position{
																						Column: 26,
																						Line:   48,
																					},
																				},
																			},
																			Name: "r",
																		},
																		Property: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 40,
																						Line:   48,
																					},
																					File:   "deadman_empty_test.flux",
																					Source: "_measurement",
																					Start: ast.Position{
																						Column: 28,
																						Line:   48,
																					},
																				},
																			},
																			Name: "_measurement",
																		},
																	},
																	Operator: 17,
																	Right: &ast.StringLiteral{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 51,
																					Line:   48,
																				},
																				File:   "deadman_empty_test.flux",
																				Source: "\"testm\"",
																				Start: ast.Position{
																					Column: 44,
																					Line:   48,
																				},
																			},
																		},
																		Value: "testm",
																	},
																},
																Operator: 1,
																Right: &ast.BinaryExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 79,
																				Line:   48,
																			},
																			File:   "deadman_empty_test.flux",
																			Source: "r._field == metric_type",
																			Start: ast.Position{
																				Column: 56,
																				Line:   48,
																			},
																		},
																	},
																	Left: &ast.MemberExpression{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 64,
																					Line:   48,
																				},
																				File:   "deadman_empty_test.flux",
																				Source: "r._field",
																				Start: ast.Position{
																					Column: 56,
																					Line:   48,
																				},
																			},
																		},
																		Object: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 57,
																						Line:   48,
																					},
																					File:   "deadman_empty_test.flux",
																					Source: "r",
																					Start: ast.Position{
																						Column: 56,
																						Line:   48,
																					},
																				},
																			},
																			Name: "r",
																		},
																		Property: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 64,
																						Line:   48,
																					},
																					File:   "deadman_empty_test.flux",
																					Source: "_field",
																					Start: ast.Position{
																						Column: 58,
																						Line:   48,
																					},
																				},
																			},
																			Name: "_field",
																		},
																	},
																	Operator: 17,
																	Right: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 79,
																					Line:   48,
																				},
																				File:   "deadman_empty_test.flux",
																				Source: "metric_type",
																				Start: ast.Position{
																					Column: 68,
																					Line:   48,
																				},
																			},
																		},
																		Name: "metric_type",
																	},
																},
															},
															Operator: 1,
															Right: &ast.BinaryExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 99,
																			Line:   48,
																		},
																		File:   "deadman_empty_test.flux",
																		Source: "r.realm == tier",
																		Start: ast.Position{
																			Column: 84,
																			Line:   48,
																		},
																	},
																},
																Left: &ast.MemberExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 91,
																				Line:   48,
																			},
																			File:   "deadman_empty_test.flux",
																			Source: "r.realm",
																			Start: ast.Position{
																				Column: 84,
																				Line:   48,
																			},
																		},
																	},
																	Object: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 85,
																					Line:   48,
																				},
																				File:   "deadman_empty_test.flux",
																				Source: "r",
																				Start: ast.Position{
																					Column: 84,
																					Line:   48,
																				},
																			},
																		},
																		Name: "r",
																	},
																	Property: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 91,
																					Line:   48,
																				},
																				File:   "deadman_empty_test.flux",
																				Source: "realm",
																				Start: ast.Position{
																					Column: 86,
																					Line:   48,
																				},
																			},
																		},
																		Name: "realm",
																	},
																},
																Operator: 17,
																Right: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 99,
																				Line:   48,
																			},
																			File:   "deadman_empty_test.flux",
																			Source: "tier",
																			Start: ast.Position{
																				Column: 95,
																				Line:   48,
																			},
																		},
																	},
																	Name: "tier",
																},
															},
														},
														Params: []*ast.Property{&ast.Property{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 21,
																		Line:   48,
																	},
																	File:   "deadman_empty_test.flux",
																	Source: "r",
																	Start: ast.Position{
																		Column: 20,
																		Line:   48,
																	},
																},
															},
															Key: &ast.Identifier{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 21,
																			Line:   48,
																		},
																		File:   "deadman_empty_test.flux",
																		Source: "r",
																		Start: ast.Position{
																			Column: 20,
																			Line:   48,
																		},
																	},
																},
																Name: "r",
															},
															Value: nil,
														}},
													},
												}},
												With: nil,
											}},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 100,
														Line:   48,
													},
													File:   "deadman_empty_test.flux",
													Source: "filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)",
													Start: ast.Position{
														Column: 8,
														Line:   48,
													},
												},
											},
											Callee: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   48,
														},
														File:   "deadman_empty_test.flux",
														Source: "filter",
														Start: ast.Position{
															Column: 8,
															Line:   48,
														},
													},
												},
												Name: "filter",
											},
										},
									},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 29,
												Line:   49,
											},
											File:   "deadman_empty_test.flux",
											Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()",
											Start: ast.Position{
												Column: 36,
												Line:   46,
											},
										},
									},
									Call: &ast.CallExpression{
										Arguments: nil,
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 29,
													Line:   49,
												},
												File:   "deadman_empty_test.flux",
												Source: "schema.fieldsAsCols()",
												Start: ast.Position{
													Column: 8,
													Line:   49,
												},
											},
										},
										Callee: &ast.MemberExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 27,
														Line:   49,
													},
													File:   "deadman_empty_test.flux",
													Source: "schema.fieldsAsCols",
													Start: ast.Position{
														Column: 8,
														Line:   49,
													},
												},
											},
											Object: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   49,
														},
														File:   "deadman_empty_test.flux",
														Source: "schema",
														Start: ast.Position{
															Column: 8,
															Line:   49,
														},
													},
												},
												Name: "schema",
											},
											Property: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   49,
														},
														File:   "deadman_empty_test.flux",
														Source: "fieldsAsCols",
														Start: ast.Position{
															Column: 15,
															Line:   49,
														},
													},
												},
												Name: "fieldsAsCols",
											},
										},
									},
								},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 54,
											Line:   50,
										},
										File:   "deadman_empty_test.flux",
										Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])",
										Start: ast.Position{
											Column: 36,
											Line:   46,
										},
									},
								},
								Call: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 53,
													Line:   50,
												},
												File:   "deadman_empty_test.flux",
												Source: "columns: [\"host\", \"realm\"]",
												Start: ast.Position{
													Column: 27,
													Line:   50,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 53,
														Line:   50,
													},
													File:   "deadman_empty_test.flux",
													Source: "columns: [\"host\", \"realm\"]",
													Start: ast.Position{
														Column: 27,
														Line:   50,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 34,
															Line:   50,
														},
														File:   "deadman_empty_test.flux",
														Source: "columns",
														Start: ast.Position{
															Column: 27,
															Line:   50,
														},
													},
												},
												Name: "columns",
											},
											Value: &ast.ArrayExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 53,
															Line:   50,
														},
														File:   "deadman_empty_test.flux",
														Source: "[\"host\", \"realm\"]",
														Start: ast.Position{
															Column: 36,
															Line:   50,
														},
													},
												},
												Elements: []ast.Expression{&ast.StringLiteral{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 43,
																Line:   50,
															},
															File:   "deadman_empty_test.flux",
															Source: "\"host\"",
															Start: ast.Position{
																Column: 37,
																Line:   50,
															},
														},
													},
													Value: "host",
												}, &ast.StringLiteral{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 52,
																Line:   50,
															},
															File:   "deadman_empty_test.flux",
															Source: "\"realm\"",
															Start: ast.Position{
																Column: 45,
																Line:   50,
															},
														},
													},
													Value: "realm",
												}},
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 54,
												Line:   50,
											},
											File:   "deadman_empty_test.flux",
											Source: "tickscript.groupBy(columns: [\"host\", \"realm\"])",
											Start: ast.Position{
												Column: 8,
												Line:   50,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 26,
													Line:   50,
												},
												File:   "deadman_empty_test.flux",
												Source: "tickscript.groupBy",
												Start: ast.Position{
													Column: 8,
													Line:   50,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
														Line:   50,
													},
													File:   "deadman_empty_test.flux",
													Source: "tickscript",
													Start: ast.Position{
														Column: 8,
														Line:   50,
													},
												},
											},
											Name: "tickscript",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 26,
														Line:   50,
													},
													File:   "deadman_empty_test.flux",
													Source: "groupBy",
													Start: ast.Position{
														Column: 19,
														Line:   50,
													},
												},
											},
											Name: "groupBy",
										},
									},
								},
							},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 6,
										Line:   56,
									},
									File:   "deadman_empty_test.flux",
									Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )",
									Start: ast.Position{
										Column: 36,
										Line:   46,
									},
								},
							},
							Call: &ast.CallExpression{
								Arguments: []ast.Expression{&ast.ObjectExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 95,
												Line:   55,
											},
											File:   "deadman_empty_test.flux",
											Source: "check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\"",
											Start: ast.Position{
												Column: 9,
												Line:   52,
											},
										},
									},
									Properties: []*ast.Property{&ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 21,
													Line:   52,
												},
												File:   "deadman_empty_test.flux",
												Source: "check: check",
												Start: ast.Position{
													Column: 9,
													Line:   52,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 14,
														Line:   52,
													},
													File:   "deadman_empty_test.flux",
													Source: "check",
													Start: ast.Position{
														Column: 9,
														Line:   52,
													},
												},
											},
											Name: "check",
										},
										Value: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 21,
														Line:   52,
													},
													File:   "deadman_empty_test.flux",
													Source: "check",
													Start: ast.Position{
														Column: 16,
														Line:   52,
													},
												},
											},
											Name: "check",
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 29,
													Line:   53,
												},
												File:   "deadman_empty_test.flux",
												Source: "measurement: \"testm\"",
												Start: ast.Position{
													Column: 9,
													Line:   53,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 20,
														Line:   53,
													},
													File:   "deadman_empty_test.flux",
													Source: "measurement",
													Start: ast.Position{
														Column: 9,
														Line:   53,
													},
												},
											},
											Name: "measurement",
										},
										Value: &ast.StringLiteral{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 29,
														Line:   53,
													},
													File:   "deadman_empty_test.flux",
													Source: "\"testm\"",
													Start: ast.Position{
														Column: 22,
														Line:   53,
													},
												},
											},
											Value: "testm",
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 22,
													Line:   54,
												},
												File:   "deadman_empty_test.flux",
												Source: "threshold: 10",
												Start: ast.Position{
													Column: 9,
													Line:   54,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
														Line:   54,
													},
													File:   "deadman_empty_test.flux",
													Source: "threshold",
													Start: ast.Position{
														Column: 9,
														Line:   54,
													},
												},
											},
											Name: "threshold",
										},
										Value: &ast.IntegerLiteral{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 22,
														Line:   54,
													},
													File:   "deadman_empty_test.flux",
													Source: "10",
													Start: ast.Position{
														Column: 20,
														Line:   54,
													},
												},
											},
											Value: int64(10),
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 95,
													Line:   55,
												},
												File:   "deadman_empty_test.flux",
												Source: "id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\"",
												Start: ast.Position{
													Column: 9,
													Line:   55,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 11,
														Line:   55,
													},
													File:   "deadman_empty_test.flux",
													Source: "id",
													Start: ast.Position{
														Column: 9,
														Line:   55,
													},
												},
											},
											Name: "id",
										},
										Value: &ast.FunctionExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 95,
														Line:   55,
													},
													File:   "deadman_empty_test.flux",
													Source: "(r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\"",
													Start: ast.Position{
														Column: 13,
														Line:   55,
													},
												},
											},
											Body: &ast.StringExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 95,
															Line:   55,
														},
														File:   "deadman_empty_test.flux",
														Source: "\"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\"",
														Start: ast.Position{
															Column: 20,
															Line:   55,
														},
													},
												},
												Parts: []ast.StringExpressionPart{&ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 28,
																Line:   55,
															},
															File:   "deadman_empty_test.flux",
															Source: "Realm: ",
															Start: ast.Position{
																Column: 21,
																Line:   55,
															},
														},
													},
													Value: "Realm: ",
												}, &ast.InterpolatedPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 35,
																Line:   55,
															},
															File:   "deadman_empty_test.flux",
															Source: "${tier}",
															Start: ast.Position{
																Column: 28,
																Line:   55,
															},
														},
													},
													Expression: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 34,
																	Line:   55,
																},
																File:   "deadman_empty_test.flux",
																Source: "tier",
																Start: ast.Position{
																	Column: 30,
																	Line:   55,
																},
															},
														},
														Name: "tier",
													},
												}, &ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 66,
																Line:   55,
															},
															File:   "deadman_empty_test.flux",
															Source: " - Hostname: unknown / Metric: ",
															Start: ast.Position{
																Column: 35,
																Line:   55,
															},
														},
													},
													Value: " - Hostname: unknown / Metric: ",
												}, &ast.InterpolatedPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 80,
																Line:   55,
															},
															File:   "deadman_empty_test.flux",
															Source: "${metric_type}",
															Start: ast.Position{
																Column: 66,
																Line:   55,
															},
														},
													},
													Expression: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 79,
																	Line:   55,
																},
																File:   "deadman_empty_test.flux",
																Source: "metric_type",
																Start: ast.Position{
																	Column: 68,
																	Line:   55,
																},
															},
														},
														Name: "metric_type",
													},
												}, &ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 94,
																Line:   55,
															},
															File:   "deadman_empty_test.flux",
															Source: " deadman alert",
															Start: ast.Position{
																Column: 80,
																Line:   55,
															},
														},
													},
													Value: " deadman alert",
												}},
											},
											Params: []*ast.Property{&ast.Property{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 15,
															Line:   55,
														},
														File:   "deadman_empty_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 14,
															Line:   55,
														},
													},
												},
												Key: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 15,
																Line:   55,
															},
															File:   "deadman_empty_test.flux",
															Source: "r",
															Start: ast.Position{
																Column: 14,
																Line:   55,
															},
														},
													},
													Name: "r",
												},
												Value: nil,
											}},
										},
									}},
									With: nil,
								}},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 6,
											Line:   56,
										},
										File:   "deadman_empty_test.flux",
										Source: "tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )",
										Start: ast.Position{
											Column: 8,
											Line:   51,
										},
									},
								},
								Callee: &ast.MemberExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 26,
												Line:   51,
											},
											File:   "deadman_empty_test.flux",
											Source: "tickscript.deadman",
											Start: ast.Position{
												Column: 8,
												Line:   51,
											},
										},
									},
									Object: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 18,
													Line:   51,
												},
												File:   "deadman_empty_test.flux",
												Source: "tickscript",
												Start: ast.Position{
													Column: 8,
													Line:   51,
												},
											},
										},
										Name: "tickscript",
									},
									Property: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 26,
													Line:   51,
												},
												File:   "deadman_empty_test.flux",
												Source: "deadman",
												Start: ast.Position{
													Column: 19,
													Line:   51,
												},
											},
										},
										Name: "deadman",
									},
								},
							},
						},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   57,
								},
								File:   "deadman_empty_test.flux",
								Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"])",
								Start: ast.Position{
									Column: 36,
									Line:   46,
								},
							},
						},
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 33,
											Line:   57,
										},
										File:   "deadman_empty_test.flux",
										Source: "columns: [\"details\"]",
										Start: ast.Position{
											Column: 13,
											Line:   57,
										},
									},
								},
								Properties: []*ast.Property{&ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 33,
												Line:   57,
											},
											File:   "deadman_empty_test.flux",
											Source: "columns: [\"details\"]",
											Start: ast.Position{
												Column: 13,
												Line:   57,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 20,
													Line:   57,
												},
												File:   "deadman_empty_test.flux",
												Source: "columns",
												Start: ast.Position{
													Column: 13,
													Line:   57,
												},
											},
										},
										Name: "columns",
									},
									Value: &ast.ArrayExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 33,
													Line:   57,
												},
												File:   "deadman_empty_test.flux",
												Source: "[\"details\"]",
												Start: ast.Position{
													Column: 22,
													Line:   57,
												},
											},
										},
										Elements: []ast.Expression{&ast.StringLiteral{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 32,
														Line:   57,
													},
													File:   "deadman_empty_test.flux",
													Source: "\"details\"",
													Start: ast.Position{
														Column: 23,
														Line:   57,
													},
												},
											},
											Value: "details",
										}},
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 34,
										Line:   57,
									},
									File:   "deadman_empty_test.flux",
									Source: "drop(columns: [\"details\"])",
									Start: ast.Position{
										Column: 8,
										Line:   57,
									},
								},
							},
							Callee: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 12,
											Line:   57,
										},
										File:   "deadman_empty_test.flux",
										Source: "drop",
										Start: ast.Position{
											Column: 8,
											Line:   57,
										},
									},
								},
								Name: "drop",
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 32,
								Line:   58,
							},
							File:   "deadman_empty_test.flux",
							Source: "table\n\t|> range(start: 2020-11-25T14:05:15Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${tier} - Hostname: unknown / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])",
							Start: ast.Position{
								Column: 36,
								Line:   46,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   58,
									},
									File:   "deadman_empty_test.flux",
									Source: "columns: [\"_time\"]",
									Start: ast.Position{
										Column: 13,
										Line:   58,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 31,
											Line:   58,
										},
										File:   "deadman_empty_test.flux",
										Source: "columns: [\"_time\"]",
										Start: ast.Position{
											Column: 13,
											Line:   58,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 20,
												Line:   58,
											},
											File:   "deadman_empty_test.flux",
											Source: "columns",
											Start: ast.Position{
												Column: 13,
												Line:   58,
											},
										},
									},
									Name: "columns",
								},
								Value: &ast.ArrayExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 31,
												Line:   58,
											},
											File:   "deadman_empty_test.flux",
											Source: "[\"_time\"]",
											Start: ast.Position{
												Column: 22,
												Line:   58,
											},
										},
									},
									Elements: []ast.Expression{&ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 30,
													Line:   58,
												},
												File:   "deadman_empty_test.flux",
												Source: "\"_time\"",
												Start: ast.Position{
													Column: 23,
													Line:   58,
												},
											},
										},
										Value: "_time",
									}},
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   58,
								},
								File:   "deadman_empty_test.flux",
								Source: "drop(columns: [\"_time\"])",
								Start: ast.Position{
									Column: 8,
									Line:   58,
								},
							},
						},
						Callee: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 12,
										Line:   58,
									},
									File:   "deadman_empty_test.flux",
									Source: "drop",
									Start: ast.Position{
										Column: 8,
										Line:   58,
									},
								},
							},
							Name: "drop",
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 31,
								Line:   46,
							},
							File:   "deadman_empty_test.flux",
							Source: "table=<-",
							Start: ast.Position{
								Column: 23,
								Line:   46,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 28,
									Line:   46,
								},
								File:   "deadman_empty_test.flux",
								Source: "table",
								Start: ast.Position{
									Column: 23,
									Line:   46,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 31,
								Line:   46,
							},
							File:   "deadman_empty_test.flux",
							Source: "<-",
							Start: ast.Position{
								Column: 29,
								Line:   46,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 3,
							Line:   64,
						},
						File:   "deadman_empty_test.flux",
						Source: "_tickscript_deadman = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
						Start: ast.Position{
							Column: 6,
							Line:   60,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 25,
								Line:   60,
							},
							File:   "deadman_empty_test.flux",
							Source: "_tickscript_deadman",
							Start: ast.Position{
								Column: 6,
								Line:   60,
							},
						},
					},
					Name: "_tickscript_deadman",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 3,
								Line:   64,
							},
							File:   "deadman_empty_test.flux",
							Source: "() => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
							Start: ast.Position{
								Column: 28,
								Line:   60,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 3,
									Line:   64,
								},
								File:   "deadman_empty_test.flux",
								Source: "({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
								Start: ast.Position{
									Column: 34,
									Line:   60,
								},
							},
						},
						Expression: &ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 2,
										Line:   64,
									},
									File:   "deadman_empty_test.flux",
									Source: "{\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n}",
									Start: ast.Position{
										Column: 35,
										Line:   60,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   61,
										},
										File:   "deadman_empty_test.flux",
										Source: "input: testing.loadStorage(csv: inData)",
										Start: ast.Position{
											Column: 2,
											Line:   61,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 7,
												Line:   61,
											},
											File:   "deadman_empty_test.flux",
											Source: "input",
											Start: ast.Position{
												Column: 2,
												Line:   61,
											},
										},
									},
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   61,
												},
												File:   "deadman_empty_test.flux",
												Source: "csv: inData",
												Start: ast.Position{
													Column: 29,
													Line:   61,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 40,
														Line:   61,
													},
													File:   "deadman_empty_test.flux",
													Source: "csv: inData",
													Start: ast.Position{
														Column: 29,
														Line:   61,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   61,
														},
														File:   "deadman_empty_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 29,
															Line:   61,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 40,
															Line:   61,
														},
														File:   "deadman_empty_test.flux",
														Source: "inData",
														Start: ast.Position{
															Column: 34,
															Line:   61,
														},
													},
												},
												Name: "inData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   61,
											},
											File:   "deadman_empty_test.flux",
											Source: "testing.loadStorage(csv: inData)",
											Start: ast.Position{
												Column: 9,
												Line:   61,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 28,
													Line:   61,
												},
												File:   "deadman_empty_test.flux",
												Source: "testing.loadStorage",
												Start: ast.Position{
													Column: 9,
													Line:   61,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 16,
														Line:   61,
													},
													File:   "deadman_empty_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 9,
														Line:   61,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 28,
														Line:   61,
													},
													File:   "deadman_empty_test.flux",
													Source: "loadStorage",
													Start: ast.Position{
														Column: 17,
														Line:   61,
													},
												},
											},
											Name: "loadStorage",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 37,
											Line:   62,
										},
										File:   "deadman_empty_test.flux",
										Source: "want: testing.loadMem(csv: outData)",
										Start: ast.Position{
											Column: 2,
											Line:   62,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 6,
												Line:   62,
											},
											File:   "deadman_empty_test.flux",
											Source: "want",
											Start: ast.Position{
												Column: 2,
												Line:   62,
											},
										},
									},
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 36,
													Line:   62,
												},
												File:   "deadman_empty_test.flux",
												Source: "csv: outData",
												Start: ast.Position{
													Column: 24,
													Line:   62,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 36,
														Line:   62,
													},
													File:   "deadman_empty_test.flux",
													Source: "csv: outData",
													Start: ast.Position{
														Column: 24,
														Line:   62,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   62,
														},
														File:   "deadman_empty_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 24,
															Line:   62,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 36,
															Line:   62,
														},
														File:   "deadman_empty_test.flux",
														Source: "outData",
														Start: ast.Position{
															Column: 29,
															Line:   62,
														},
													},
												},
												Name: "outData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 37,
												Line:   62,
											},
											File:   "deadman_empty_test.flux",
											Source: "testing.loadMem(csv: outData)",
											Start: ast.Position{
												Column: 8,
												Line:   62,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   62,
												},
												File:   "deadman_empty_test.flux",
												Source: "testing.loadMem",
												Start: ast.Position{
													Column: 8,
													Line:   62,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   62,
													},
													File:   "deadman_empty_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 8,
														Line:   62,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   62,
													},
													File:   "deadman_empty_test.flux",
													Source: "loadMem",
													Start: ast.Position{
														Column: 16,
														Line:   62,
													},
												},
											},
											Name: "loadMem",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   63,
										},
										File:   "deadman_empty_test.flux",
										Source: "fn: tickscript_deadman",
										Start: ast.Position{
											Column: 2,
											Line:   63,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 4,
												Line:   63,
											},
											File:   "deadman_empty_test.flux",
											Source: "fn",
											Start: ast.Position{
												Column: 2,
												Line:   63,
											},
										},
									},
									Name: "fn",
								},
								Value: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 24,
												Line:   63,
											},
											File:   "deadman_empty_test.flux",
											Source: "tickscript_deadman",
											Start: ast.Position{
												Column: 6,
												Line:   63,
											},
										},
									},
									Name: "tickscript_deadman",
								},
							}},
							With: nil,
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 3,
						Line:   64,
					},
					File:   "deadman_empty_test.flux",
					Source: "test _tickscript_deadman = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
					Start: ast.Position{
						Column: 1,
						Line:   60,
					},
				},
			},
		}},
		Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   3,
					},
					File:   "deadman_empty_test.flux",
					Source: "import \"testing\"",
					Start: ast.Position{
						Column: 1,
						Line:   3,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   3,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"testing\"",
						Start: ast.Position{
							Column: 8,
							Line:   3,
						},
					},
				},
				Value: "testing",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 13,
						Line:   4,
					},
					File:   "deadman_empty_test.flux",
					Source: "import \"csv\"",
					Start: ast.Position{
						Column: 1,
						Line:   4,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 13,
							Line:   4,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"csv\"",
						Start: ast.Position{
							Column: 8,
							Line:   4,
						},
					},
				},
				Value: "csv",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 39,
						Line:   5,
					},
					File:   "deadman_empty_test.flux",
					Source: "import \"contrib/bonitoo-io/tickscript\"",
					Start: ast.Position{
						Column: 1,
						Line:   5,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 39,
							Line:   5,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"contrib/bonitoo-io/tickscript\"",
						Start: ast.Position{
							Column: 8,
							Line:   5,
						},
					},
				},
				Value: "contrib/bonitoo-io/tickscript",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 37,
						Line:   6,
					},
					File:   "deadman_empty_test.flux",
					Source: "import \"influxdata/influxdb/monitor\"",
					Start: ast.Position{
						Column: 1,
						Line:   6,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 37,
							Line:   6,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"influxdata/influxdb/monitor\"",
						Start: ast.Position{
							Column: 8,
							Line:   6,
						},
					},
				},
				Value: "influxdata/influxdb/monitor",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 36,
						Line:   7,
					},
					File:   "deadman_empty_test.flux",
					Source: "import \"influxdata/influxdb/schema\"",
					Start: ast.Position{
						Column: 1,
						Line:   7,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 36,
							Line:   7,
						},
						File:   "deadman_empty_test.flux",
						Source: "\"influxdata/influxdb/schema\"",
						Start: ast.Position{
							Column: 8,
							Line:   7,
						},
					},
				},
				Value: "influxdata/influxdb/schema",
			},
		}},
		Metadata: "parser-type=rust",
		Name:     "deadman_empty_test.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 24,
						Line:   1,
					},
					File:   "deadman_empty_test.flux",
					Source: "package tickscript_test",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 24,
							Line:   1,
						},
						File:   "deadman_empty_test.flux",
						Source: "tickscript_test",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "tickscript_test",
			},
		},
	}, &ast.File{
		BaseNode: ast.BaseNode{
			Errors: nil,
			Loc: &ast.SourceLocation{
				End: ast.Position{
					Column: 3,
					Line:   64,
				},
				File:   "deadman_threshold_test.flux",
				Source: "package tickscript_test\n\nimport \"testing\"\nimport \"csv\"\nimport \"contrib/bonitoo-io/tickscript\"\nimport \"influxdata/influxdb/monitor\"\nimport \"influxdata/influxdb/schema\"\n\noption now = () => (2020-11-25T14:05:30Z)\n\n// overwrite as buckets are not avail in Flux tests\noption monitor.write = (tables=<-) => tables\noption monitor.log = (tables=<-) => tables\n\ninData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"\n\noutData = \"\n#group,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string,string,string\n#default,_result,,,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,host,id,realm\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate deadman alert,ft\n\"\n\ncheck = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"deadman\", // tickscript?\n  tags: {},\n}\n\nmetric_type = \"kafka_message_in_rate\"\ntier = \"ft\"\n\ntickscript_deadman = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])\n\ntest _tickscript_deadman = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
				Start: ast.Position{
					Column: 1,
					Line:   1,
				},
			},
		},
		Body: []ast.Statement{&ast.OptionStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 42,
							Line:   9,
						},
						File:   "deadman_threshold_test.flux",
						Source: "now = () => (2020-11-25T14:05:30Z)",
						Start: ast.Position{
							Column: 8,
							Line:   9,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   9,
							},
							File:   "deadman_threshold_test.flux",
							Source: "now",
							Start: ast.Position{
								Column: 8,
								Line:   9,
							},
						},
					},
					Name: "now",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 42,
								Line:   9,
							},
							File:   "deadman_threshold_test.flux",
							Source: "() => (2020-11-25T14:05:30Z)",
							Start: ast.Position{
								Column: 14,
								Line:   9,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 42,
									Line:   9,
								},
								File:   "deadman_threshold_test.flux",
								Source: "(2020-11-25T14:05:30Z)",
								Start: ast.Position{
									Column: 20,
									Line:   9,
								},
							},
						},
						Expression: &ast.DateTimeLiteral{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 41,
										Line:   9,
									},
									File:   "deadman_threshold_test.flux",
									Source: "2020-11-25T14:05:30Z",
									Start: ast.Position{
										Column: 21,
										Line:   9,
									},
								},
							},
							Value: parser.MustParseTime("2020-11-25T14:05:30Z"),
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 42,
						Line:   9,
					},
					File:   "deadman_threshold_test.flux",
					Source: "option now = () => (2020-11-25T14:05:30Z)",
					Start: ast.Position{
						Column: 1,
						Line:   9,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 45,
							Line:   12,
						},
						File:   "deadman_threshold_test.flux",
						Source: "monitor.write = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   12,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 45,
								Line:   12,
							},
							File:   "deadman_threshold_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 24,
								Line:   12,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 45,
									Line:   12,
								},
								File:   "deadman_threshold_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 39,
									Line:   12,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "deadman_threshold_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 25,
									Line:   12,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   12,
									},
									File:   "deadman_threshold_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 25,
										Line:   12,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   12,
								},
								File:   "deadman_threshold_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 32,
									Line:   12,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 21,
								Line:   12,
							},
							File:   "deadman_threshold_test.flux",
							Source: "monitor.write",
							Start: ast.Position{
								Column: 8,
								Line:   12,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   12,
								},
								File:   "deadman_threshold_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   12,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 21,
									Line:   12,
								},
								File:   "deadman_threshold_test.flux",
								Source: "write",
								Start: ast.Position{
									Column: 16,
									Line:   12,
								},
							},
						},
						Name: "write",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 45,
						Line:   12,
					},
					File:   "deadman_threshold_test.flux",
					Source: "option monitor.write = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   12,
					},
				},
			},
		}, &ast.OptionStatement{
			Assignment: &ast.MemberAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 43,
							Line:   13,
						},
						File:   "deadman_threshold_test.flux",
						Source: "monitor.log = (tables=<-) => tables",
						Start: ast.Position{
							Column: 8,
							Line:   13,
						},
					},
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 43,
								Line:   13,
							},
							File:   "deadman_threshold_test.flux",
							Source: "(tables=<-) => tables",
							Start: ast.Position{
								Column: 22,
								Line:   13,
							},
						},
					},
					Body: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 43,
									Line:   13,
								},
								File:   "deadman_threshold_test.flux",
								Source: "tables",
								Start: ast.Position{
									Column: 37,
									Line:   13,
								},
							},
						},
						Name: "tables",
					},
					Params: []*ast.Property{&ast.Property{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "deadman_threshold_test.flux",
								Source: "tables=<-",
								Start: ast.Position{
									Column: 23,
									Line:   13,
								},
							},
						},
						Key: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 29,
										Line:   13,
									},
									File:   "deadman_threshold_test.flux",
									Source: "tables",
									Start: ast.Position{
										Column: 23,
										Line:   13,
									},
								},
							},
							Name: "tables",
						},
						Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   13,
								},
								File:   "deadman_threshold_test.flux",
								Source: "<-",
								Start: ast.Position{
									Column: 30,
									Line:   13,
								},
							},
						}},
					}},
				},
				Member: &ast.MemberExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 19,
								Line:   13,
							},
							File:   "deadman_threshold_test.flux",
							Source: "monitor.log",
							Start: ast.Position{
								Column: 8,
								Line:   13,
							},
						},
					},
					Object: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 15,
									Line:   13,
								},
								File:   "deadman_threshold_test.flux",
								Source: "monitor",
								Start: ast.Position{
									Column: 8,
									Line:   13,
								},
							},
						},
						Name: "monitor",
					},
					Property: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 19,
									Line:   13,
								},
								File:   "deadman_threshold_test.flux",
								Source: "log",
								Start: ast.Position{
									Column: 16,
									Line:   13,
								},
							},
						},
						Name: "log",
					},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 43,
						Line:   13,
					},
					File:   "deadman_threshold_test.flux",
					Source: "option monitor.log = (tables=<-) => tables",
					Start: ast.Position{
						Column: 1,
						Line:   13,
					},
				},
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   26,
					},
					File:   "deadman_threshold_test.flux",
					Source: "inData = \"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   15,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 7,
							Line:   15,
						},
						File:   "deadman_threshold_test.flux",
						Source: "inData",
						Start: ast.Position{
							Column: 1,
							Line:   15,
						},
					},
				},
				Name: "inData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   26,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n\"",
						Start: ast.Position{
							Column: 10,
							Line:   15,
						},
					},
				},
				Value: "\n#group,false,false,false,false,true,true,true,true\n#datatype,string,long,dateTime:RFC3339,double,string,string,string,string\n#default,_result,,,,,,,\n,result,table,_time,_value,_field,_measurement,host,realm\n,,0,2020-11-25T14:05:03.477635916Z,1.819231109049999,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:04.541635074Z,1.635878190200181,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:05.623191313Z,39.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:06.696061106Z,26.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:07.768317097Z,8.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n,,0,2020-11-25T14:05:08.868317091Z,1.33716449678206,kafka_message_in_rate,testm,kafka07,ft\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   34,
					},
					File:   "deadman_threshold_test.flux",
					Source: "outData = \"\n#group,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string,string,string\n#default,_result,,,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,host,id,realm\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate deadman alert,ft\n\"",
					Start: ast.Position{
						Column: 1,
						Line:   28,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 8,
							Line:   28,
						},
						File:   "deadman_threshold_test.flux",
						Source: "outData",
						Start: ast.Position{
							Column: 1,
							Line:   28,
						},
					},
				},
				Name: "outData",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   34,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"\n#group,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string,string,string\n#default,_result,,,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,host,id,realm\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate deadman alert,ft\n\"",
						Start: ast.Position{
							Column: 11,
							Line:   28,
						},
					},
				},
				Value: "\n#group,false,false,true,true,true,true,false,true,false,true,false,true,false,true\n#datatype,string,long,string,string,string,string,string,string,long,string,boolean,string,string,string\n#default,_result,,,,,,,,,,,,,\n,result,table,_check_id,_check_name,_level,_measurement,_message,_source_measurement,_source_timestamp,_type,dead,host,id,realm\n,,0,rate-check,Rate Check,crit,statuses,Deadman Check: Rate Check is: dead,testm,1606313130000000000,deadman,true,kafka07,Realm: ft - Hostname: kafka07 / Metric: kafka_message_in_rate deadman alert,ft\n",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 2,
						Line:   41,
					},
					File:   "deadman_threshold_test.flux",
					Source: "check = {\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"deadman\", // tickscript?\n  tags: {},\n}",
					Start: ast.Position{
						Column: 1,
						Line:   36,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 6,
							Line:   36,
						},
						File:   "deadman_threshold_test.flux",
						Source: "check",
						Start: ast.Position{
							Column: 1,
							Line:   36,
						},
					},
				},
				Name: "check",
			},
			Init: &ast.ObjectExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 2,
							Line:   41,
						},
						File:   "deadman_threshold_test.flux",
						Source: "{\n  _check_id: \"rate-check\",\n  _check_name: \"Rate Check\",\n  _type: \"deadman\", // tickscript?\n  tags: {},\n}",
						Start: ast.Position{
							Column: 9,
							Line:   36,
						},
					},
				},
				Properties: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 26,
								Line:   37,
							},
							File:   "deadman_threshold_test.flux",
							Source: "_check_id: \"rate-check\"",
							Start: ast.Position{
								Column: 3,
								Line:   37,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 12,
									Line:   37,
								},
								File:   "deadman_threshold_test.flux",
								Source: "_check_id",
								Start: ast.Position{
									Column: 3,
									Line:   37,
								},
							},
						},
						Name: "_check_id",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 26,
									Line:   37,
								},
								File:   "deadman_threshold_test.flux",
								Source: "\"rate-check\"",
								Start: ast.Position{
									Column: 14,
									Line:   37,
								},
							},
						},
						Value: "rate-check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 28,
								Line:   38,
							},
							File:   "deadman_threshold_test.flux",
							Source: "_check_name: \"Rate Check\"",
							Start: ast.Position{
								Column: 3,
								Line:   38,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 14,
									Line:   38,
								},
								File:   "deadman_threshold_test.flux",
								Source: "_check_name",
								Start: ast.Position{
									Column: 3,
									Line:   38,
								},
							},
						},
						Name: "_check_name",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 28,
									Line:   38,
								},
								File:   "deadman_threshold_test.flux",
								Source: "\"Rate Check\"",
								Start: ast.Position{
									Column: 16,
									Line:   38,
								},
							},
						},
						Value: "Rate Check",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 19,
								Line:   39,
							},
							File:   "deadman_threshold_test.flux",
							Source: "_type: \"deadman\"",
							Start: ast.Position{
								Column: 3,
								Line:   39,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 8,
									Line:   39,
								},
								File:   "deadman_threshold_test.flux",
								Source: "_type",
								Start: ast.Position{
									Column: 3,
									Line:   39,
								},
							},
						},
						Name: "_type",
					},
					Value: &ast.StringLiteral{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 19,
									Line:   39,
								},
								File:   "deadman_threshold_test.flux",
								Source: "\"deadman\"",
								Start: ast.Position{
									Column: 10,
									Line:   39,
								},
							},
						},
						Value: "deadman",
					},
				}, &ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 11,
								Line:   40,
							},
							File:   "deadman_threshold_test.flux",
							Source: "tags: {}",
							Start: ast.Position{
								Column: 3,
								Line:   40,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 7,
									Line:   40,
								},
								File:   "deadman_threshold_test.flux",
								Source: "tags",
								Start: ast.Position{
									Column: 3,
									Line:   40,
								},
							},
						},
						Name: "tags",
					},
					Value: &ast.ObjectExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 11,
									Line:   40,
								},
								File:   "deadman_threshold_test.flux",
								Source: "{}",
								Start: ast.Position{
									Column: 9,
									Line:   40,
								},
							},
						},
						Properties: []*ast.Property{},
						With:       nil,
					},
				}},
				With: nil,
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 38,
						Line:   43,
					},
					File:   "deadman_threshold_test.flux",
					Source: "metric_type = \"kafka_message_in_rate\"",
					Start: ast.Position{
						Column: 1,
						Line:   43,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   43,
						},
						File:   "deadman_threshold_test.flux",
						Source: "metric_type",
						Start: ast.Position{
							Column: 1,
							Line:   43,
						},
					},
				},
				Name: "metric_type",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 38,
							Line:   43,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"kafka_message_in_rate\"",
						Start: ast.Position{
							Column: 15,
							Line:   43,
						},
					},
				},
				Value: "kafka_message_in_rate",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 12,
						Line:   44,
					},
					File:   "deadman_threshold_test.flux",
					Source: "tier = \"ft\"",
					Start: ast.Position{
						Column: 1,
						Line:   44,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 5,
							Line:   44,
						},
						File:   "deadman_threshold_test.flux",
						Source: "tier",
						Start: ast.Position{
							Column: 1,
							Line:   44,
						},
					},
				},
				Name: "tier",
			},
			Init: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 12,
							Line:   44,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"ft\"",
						Start: ast.Position{
							Column: 8,
							Line:   44,
						},
					},
				},
				Value: "ft",
			},
		}, &ast.VariableAssignment{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 32,
						Line:   58,
					},
					File:   "deadman_threshold_test.flux",
					Source: "tickscript_deadman = (table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])",
					Start: ast.Position{
						Column: 1,
						Line:   46,
					},
				},
			},
			ID: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 19,
							Line:   46,
						},
						File:   "deadman_threshold_test.flux",
						Source: "tickscript_deadman",
						Start: ast.Position{
							Column: 1,
							Line:   46,
						},
					},
				},
				Name: "tickscript_deadman",
			},
			Init: &ast.FunctionExpression{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 32,
							Line:   58,
						},
						File:   "deadman_threshold_test.flux",
						Source: "(table=<-) => table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])",
						Start: ast.Position{
							Column: 22,
							Line:   46,
						},
					},
				},
				Body: &ast.PipeExpression{
					Argument: &ast.PipeExpression{
						Argument: &ast.PipeExpression{
							Argument: &ast.PipeExpression{
								Argument: &ast.PipeExpression{
									Argument: &ast.PipeExpression{
										Argument: &ast.PipeExpression{
											Argument: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 41,
															Line:   46,
														},
														File:   "deadman_threshold_test.flux",
														Source: "table",
														Start: ast.Position{
															Column: 36,
															Line:   46,
														},
													},
												},
												Name: "table",
											},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 39,
														Line:   47,
													},
													File:   "deadman_threshold_test.flux",
													Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)",
													Start: ast.Position{
														Column: 36,
														Line:   46,
													},
												},
											},
											Call: &ast.CallExpression{
												Arguments: []ast.Expression{&ast.ObjectExpression{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 38,
																Line:   47,
															},
															File:   "deadman_threshold_test.flux",
															Source: "start: 2020-11-25T14:05:00Z",
															Start: ast.Position{
																Column: 11,
																Line:   47,
															},
														},
													},
													Properties: []*ast.Property{&ast.Property{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 38,
																	Line:   47,
																},
																File:   "deadman_threshold_test.flux",
																Source: "start: 2020-11-25T14:05:00Z",
																Start: ast.Position{
																	Column: 11,
																	Line:   47,
																},
															},
														},
														Key: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 16,
																		Line:   47,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "start",
																	Start: ast.Position{
																		Column: 11,
																		Line:   47,
																	},
																},
															},
															Name: "start",
														},
														Value: &ast.DateTimeLiteral{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 38,
																		Line:   47,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "2020-11-25T14:05:00Z",
																	Start: ast.Position{
																		Column: 18,
																		Line:   47,
																	},
																},
															},
															Value: parser.MustParseTime("2020-11-25T14:05:00Z"),
														},
													}},
													With: nil,
												}},
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 39,
															Line:   47,
														},
														File:   "deadman_threshold_test.flux",
														Source: "range(start: 2020-11-25T14:05:00Z)",
														Start: ast.Position{
															Column: 5,
															Line:   47,
														},
													},
												},
												Callee: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 10,
																Line:   47,
															},
															File:   "deadman_threshold_test.flux",
															Source: "range",
															Start: ast.Position{
																Column: 5,
																Line:   47,
															},
														},
													},
													Name: "range",
												},
											},
										},
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 100,
													Line:   48,
												},
												File:   "deadman_threshold_test.flux",
												Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)",
												Start: ast.Position{
													Column: 36,
													Line:   46,
												},
											},
										},
										Call: &ast.CallExpression{
											Arguments: []ast.Expression{&ast.ObjectExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 99,
															Line:   48,
														},
														File:   "deadman_threshold_test.flux",
														Source: "fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
														Start: ast.Position{
															Column: 15,
															Line:   48,
														},
													},
												},
												Properties: []*ast.Property{&ast.Property{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 99,
																Line:   48,
															},
															File:   "deadman_threshold_test.flux",
															Source: "fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
															Start: ast.Position{
																Column: 15,
																Line:   48,
															},
														},
													},
													Key: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 17,
																	Line:   48,
																},
																File:   "deadman_threshold_test.flux",
																Source: "fn",
																Start: ast.Position{
																	Column: 15,
																	Line:   48,
																},
															},
														},
														Name: "fn",
													},
													Value: &ast.FunctionExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 99,
																	Line:   48,
																},
																File:   "deadman_threshold_test.flux",
																Source: "(r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
																Start: ast.Position{
																	Column: 19,
																	Line:   48,
																},
															},
														},
														Body: &ast.LogicalExpression{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 99,
																		Line:   48,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "r._measurement == \"testm\" and r._field == metric_type and r.realm == tier",
																	Start: ast.Position{
																		Column: 26,
																		Line:   48,
																	},
																},
															},
															Left: &ast.LogicalExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 79,
																			Line:   48,
																		},
																		File:   "deadman_threshold_test.flux",
																		Source: "r._measurement == \"testm\" and r._field == metric_type",
																		Start: ast.Position{
																			Column: 26,
																			Line:   48,
																		},
																	},
																},
																Left: &ast.BinaryExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 51,
																				Line:   48,
																			},
																			File:   "deadman_threshold_test.flux",
																			Source: "r._measurement == \"testm\"",
																			Start: ast.Position{
																				Column: 26,
																				Line:   48,
																			},
																		},
																	},
																	Left: &ast.MemberExpression{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 40,
																					Line:   48,
																				},
																				File:   "deadman_threshold_test.flux",
																				Source: "r._measurement",
																				Start: ast.Position{
																					Column: 26,
																					Line:   48,
																				},
																			},
																		},
																		Object: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 27,
																						Line:   48,
																					},
																					File:   "deadman_threshold_test.flux",
																					Source: "r",
																					Start: ast.Position{
																						Column: 26,
																						Line:   48,
																					},
																				},
																			},
																			Name: "r",
																		},
																		Property: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 40,
																						Line:   48,
																					},
																					File:   "deadman_threshold_test.flux",
																					Source: "_measurement",
																					Start: ast.Position{
																						Column: 28,
																						Line:   48,
																					},
																				},
																			},
																			Name: "_measurement",
																		},
																	},
																	Operator: 17,
																	Right: &ast.StringLiteral{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 51,
																					Line:   48,
																				},
																				File:   "deadman_threshold_test.flux",
																				Source: "\"testm\"",
																				Start: ast.Position{
																					Column: 44,
																					Line:   48,
																				},
																			},
																		},
																		Value: "testm",
																	},
																},
																Operator: 1,
																Right: &ast.BinaryExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 79,
																				Line:   48,
																			},
																			File:   "deadman_threshold_test.flux",
																			Source: "r._field == metric_type",
																			Start: ast.Position{
																				Column: 56,
																				Line:   48,
																			},
																		},
																	},
																	Left: &ast.MemberExpression{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 64,
																					Line:   48,
																				},
																				File:   "deadman_threshold_test.flux",
																				Source: "r._field",
																				Start: ast.Position{
																					Column: 56,
																					Line:   48,
																				},
																			},
																		},
																		Object: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 57,
																						Line:   48,
																					},
																					File:   "deadman_threshold_test.flux",
																					Source: "r",
																					Start: ast.Position{
																						Column: 56,
																						Line:   48,
																					},
																				},
																			},
																			Name: "r",
																		},
																		Property: &ast.Identifier{
																			BaseNode: ast.BaseNode{
																				Errors: nil,
																				Loc: &ast.SourceLocation{
																					End: ast.Position{
																						Column: 64,
																						Line:   48,
																					},
																					File:   "deadman_threshold_test.flux",
																					Source: "_field",
																					Start: ast.Position{
																						Column: 58,
																						Line:   48,
																					},
																				},
																			},
																			Name: "_field",
																		},
																	},
																	Operator: 17,
																	Right: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 79,
																					Line:   48,
																				},
																				File:   "deadman_threshold_test.flux",
																				Source: "metric_type",
																				Start: ast.Position{
																					Column: 68,
																					Line:   48,
																				},
																			},
																		},
																		Name: "metric_type",
																	},
																},
															},
															Operator: 1,
															Right: &ast.BinaryExpression{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 99,
																			Line:   48,
																		},
																		File:   "deadman_threshold_test.flux",
																		Source: "r.realm == tier",
																		Start: ast.Position{
																			Column: 84,
																			Line:   48,
																		},
																	},
																},
																Left: &ast.MemberExpression{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 91,
																				Line:   48,
																			},
																			File:   "deadman_threshold_test.flux",
																			Source: "r.realm",
																			Start: ast.Position{
																				Column: 84,
																				Line:   48,
																			},
																		},
																	},
																	Object: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 85,
																					Line:   48,
																				},
																				File:   "deadman_threshold_test.flux",
																				Source: "r",
																				Start: ast.Position{
																					Column: 84,
																					Line:   48,
																				},
																			},
																		},
																		Name: "r",
																	},
																	Property: &ast.Identifier{
																		BaseNode: ast.BaseNode{
																			Errors: nil,
																			Loc: &ast.SourceLocation{
																				End: ast.Position{
																					Column: 91,
																					Line:   48,
																				},
																				File:   "deadman_threshold_test.flux",
																				Source: "realm",
																				Start: ast.Position{
																					Column: 86,
																					Line:   48,
																				},
																			},
																		},
																		Name: "realm",
																	},
																},
																Operator: 17,
																Right: &ast.Identifier{
																	BaseNode: ast.BaseNode{
																		Errors: nil,
																		Loc: &ast.SourceLocation{
																			End: ast.Position{
																				Column: 99,
																				Line:   48,
																			},
																			File:   "deadman_threshold_test.flux",
																			Source: "tier",
																			Start: ast.Position{
																				Column: 95,
																				Line:   48,
																			},
																		},
																	},
																	Name: "tier",
																},
															},
														},
														Params: []*ast.Property{&ast.Property{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 21,
																		Line:   48,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "r",
																	Start: ast.Position{
																		Column: 20,
																		Line:   48,
																	},
																},
															},
															Key: &ast.Identifier{
																BaseNode: ast.BaseNode{
																	Errors: nil,
																	Loc: &ast.SourceLocation{
																		End: ast.Position{
																			Column: 21,
																			Line:   48,
																		},
																		File:   "deadman_threshold_test.flux",
																		Source: "r",
																		Start: ast.Position{
																			Column: 20,
																			Line:   48,
																		},
																	},
																},
																Name: "r",
															},
															Value: nil,
														}},
													},
												}},
												With: nil,
											}},
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 100,
														Line:   48,
													},
													File:   "deadman_threshold_test.flux",
													Source: "filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)",
													Start: ast.Position{
														Column: 8,
														Line:   48,
													},
												},
											},
											Callee: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   48,
														},
														File:   "deadman_threshold_test.flux",
														Source: "filter",
														Start: ast.Position{
															Column: 8,
															Line:   48,
														},
													},
												},
												Name: "filter",
											},
										},
									},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 29,
												Line:   49,
											},
											File:   "deadman_threshold_test.flux",
											Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()",
											Start: ast.Position{
												Column: 36,
												Line:   46,
											},
										},
									},
									Call: &ast.CallExpression{
										Arguments: nil,
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 29,
													Line:   49,
												},
												File:   "deadman_threshold_test.flux",
												Source: "schema.fieldsAsCols()",
												Start: ast.Position{
													Column: 8,
													Line:   49,
												},
											},
										},
										Callee: &ast.MemberExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 27,
														Line:   49,
													},
													File:   "deadman_threshold_test.flux",
													Source: "schema.fieldsAsCols",
													Start: ast.Position{
														Column: 8,
														Line:   49,
													},
												},
											},
											Object: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 14,
															Line:   49,
														},
														File:   "deadman_threshold_test.flux",
														Source: "schema",
														Start: ast.Position{
															Column: 8,
															Line:   49,
														},
													},
												},
												Name: "schema",
											},
											Property: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   49,
														},
														File:   "deadman_threshold_test.flux",
														Source: "fieldsAsCols",
														Start: ast.Position{
															Column: 15,
															Line:   49,
														},
													},
												},
												Name: "fieldsAsCols",
											},
										},
									},
								},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 54,
											Line:   50,
										},
										File:   "deadman_threshold_test.flux",
										Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])",
										Start: ast.Position{
											Column: 36,
											Line:   46,
										},
									},
								},
								Call: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 53,
													Line:   50,
												},
												File:   "deadman_threshold_test.flux",
												Source: "columns: [\"host\", \"realm\"]",
												Start: ast.Position{
													Column: 27,
													Line:   50,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 53,
														Line:   50,
													},
													File:   "deadman_threshold_test.flux",
													Source: "columns: [\"host\", \"realm\"]",
													Start: ast.Position{
														Column: 27,
														Line:   50,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 34,
															Line:   50,
														},
														File:   "deadman_threshold_test.flux",
														Source: "columns",
														Start: ast.Position{
															Column: 27,
															Line:   50,
														},
													},
												},
												Name: "columns",
											},
											Value: &ast.ArrayExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 53,
															Line:   50,
														},
														File:   "deadman_threshold_test.flux",
														Source: "[\"host\", \"realm\"]",
														Start: ast.Position{
															Column: 36,
															Line:   50,
														},
													},
												},
												Elements: []ast.Expression{&ast.StringLiteral{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 43,
																Line:   50,
															},
															File:   "deadman_threshold_test.flux",
															Source: "\"host\"",
															Start: ast.Position{
																Column: 37,
																Line:   50,
															},
														},
													},
													Value: "host",
												}, &ast.StringLiteral{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 52,
																Line:   50,
															},
															File:   "deadman_threshold_test.flux",
															Source: "\"realm\"",
															Start: ast.Position{
																Column: 45,
																Line:   50,
															},
														},
													},
													Value: "realm",
												}},
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 54,
												Line:   50,
											},
											File:   "deadman_threshold_test.flux",
											Source: "tickscript.groupBy(columns: [\"host\", \"realm\"])",
											Start: ast.Position{
												Column: 8,
												Line:   50,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 26,
													Line:   50,
												},
												File:   "deadman_threshold_test.flux",
												Source: "tickscript.groupBy",
												Start: ast.Position{
													Column: 8,
													Line:   50,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
														Line:   50,
													},
													File:   "deadman_threshold_test.flux",
													Source: "tickscript",
													Start: ast.Position{
														Column: 8,
														Line:   50,
													},
												},
											},
											Name: "tickscript",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 26,
														Line:   50,
													},
													File:   "deadman_threshold_test.flux",
													Source: "groupBy",
													Start: ast.Position{
														Column: 19,
														Line:   50,
													},
												},
											},
											Name: "groupBy",
										},
									},
								},
							},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 6,
										Line:   56,
									},
									File:   "deadman_threshold_test.flux",
									Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )",
									Start: ast.Position{
										Column: 36,
										Line:   46,
									},
								},
							},
							Call: &ast.CallExpression{
								Arguments: []ast.Expression{&ast.ObjectExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 100,
												Line:   55,
											},
											File:   "deadman_threshold_test.flux",
											Source: "check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\"",
											Start: ast.Position{
												Column: 9,
												Line:   52,
											},
										},
									},
									Properties: []*ast.Property{&ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 21,
													Line:   52,
												},
												File:   "deadman_threshold_test.flux",
												Source: "check: check",
												Start: ast.Position{
													Column: 9,
													Line:   52,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 14,
														Line:   52,
													},
													File:   "deadman_threshold_test.flux",
													Source: "check",
													Start: ast.Position{
														Column: 9,
														Line:   52,
													},
												},
											},
											Name: "check",
										},
										Value: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 21,
														Line:   52,
													},
													File:   "deadman_threshold_test.flux",
													Source: "check",
													Start: ast.Position{
														Column: 16,
														Line:   52,
													},
												},
											},
											Name: "check",
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 29,
													Line:   53,
												},
												File:   "deadman_threshold_test.flux",
												Source: "measurement: \"testm\"",
												Start: ast.Position{
													Column: 9,
													Line:   53,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 20,
														Line:   53,
													},
													File:   "deadman_threshold_test.flux",
													Source: "measurement",
													Start: ast.Position{
														Column: 9,
														Line:   53,
													},
												},
											},
											Name: "measurement",
										},
										Value: &ast.StringLiteral{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 29,
														Line:   53,
													},
													File:   "deadman_threshold_test.flux",
													Source: "\"testm\"",
													Start: ast.Position{
														Column: 22,
														Line:   53,
													},
												},
											},
											Value: "testm",
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 22,
													Line:   54,
												},
												File:   "deadman_threshold_test.flux",
												Source: "threshold: 10",
												Start: ast.Position{
													Column: 9,
													Line:   54,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 18,
														Line:   54,
													},
													File:   "deadman_threshold_test.flux",
													Source: "threshold",
													Start: ast.Position{
														Column: 9,
														Line:   54,
													},
												},
											},
											Name: "threshold",
										},
										Value: &ast.IntegerLiteral{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 22,
														Line:   54,
													},
													File:   "deadman_threshold_test.flux",
													Source: "10",
													Start: ast.Position{
														Column: 20,
														Line:   54,
													},
												},
											},
											Value: int64(10),
										},
									}, &ast.Property{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 100,
													Line:   55,
												},
												File:   "deadman_threshold_test.flux",
												Source: "id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\"",
												Start: ast.Position{
													Column: 9,
													Line:   55,
												},
											},
										},
										Key: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 11,
														Line:   55,
													},
													File:   "deadman_threshold_test.flux",
													Source: "id",
													Start: ast.Position{
														Column: 9,
														Line:   55,
													},
												},
											},
											Name: "id",
										},
										Value: &ast.FunctionExpression{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 100,
														Line:   55,
													},
													File:   "deadman_threshold_test.flux",
													Source: "(r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\"",
													Start: ast.Position{
														Column: 13,
														Line:   55,
													},
												},
											},
											Body: &ast.StringExpression{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 100,
															Line:   55,
														},
														File:   "deadman_threshold_test.flux",
														Source: "\"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\"",
														Start: ast.Position{
															Column: 20,
															Line:   55,
														},
													},
												},
												Parts: []ast.StringExpressionPart{&ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 28,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: "Realm: ",
															Start: ast.Position{
																Column: 21,
																Line:   55,
															},
														},
													},
													Value: "Realm: ",
												}, &ast.InterpolatedPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 38,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: "${r.realm}",
															Start: ast.Position{
																Column: 28,
																Line:   55,
															},
														},
													},
													Expression: &ast.MemberExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 37,
																	Line:   55,
																},
																File:   "deadman_threshold_test.flux",
																Source: "r.realm",
																Start: ast.Position{
																	Column: 30,
																	Line:   55,
																},
															},
														},
														Object: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 31,
																		Line:   55,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "r",
																	Start: ast.Position{
																		Column: 30,
																		Line:   55,
																	},
																},
															},
															Name: "r",
														},
														Property: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 37,
																		Line:   55,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "realm",
																	Start: ast.Position{
																		Column: 32,
																		Line:   55,
																	},
																},
															},
															Name: "realm",
														},
													},
												}, &ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 51,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: " - Hostname: ",
															Start: ast.Position{
																Column: 38,
																Line:   55,
															},
														},
													},
													Value: " - Hostname: ",
												}, &ast.InterpolatedPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 60,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: "${r.host}",
															Start: ast.Position{
																Column: 51,
																Line:   55,
															},
														},
													},
													Expression: &ast.MemberExpression{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 59,
																	Line:   55,
																},
																File:   "deadman_threshold_test.flux",
																Source: "r.host",
																Start: ast.Position{
																	Column: 53,
																	Line:   55,
																},
															},
														},
														Object: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 54,
																		Line:   55,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "r",
																	Start: ast.Position{
																		Column: 53,
																		Line:   55,
																	},
																},
															},
															Name: "r",
														},
														Property: &ast.Identifier{
															BaseNode: ast.BaseNode{
																Errors: nil,
																Loc: &ast.SourceLocation{
																	End: ast.Position{
																		Column: 59,
																		Line:   55,
																	},
																	File:   "deadman_threshold_test.flux",
																	Source: "host",
																	Start: ast.Position{
																		Column: 55,
																		Line:   55,
																	},
																},
															},
															Name: "host",
														},
													},
												}, &ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 71,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: " / Metric: ",
															Start: ast.Position{
																Column: 60,
																Line:   55,
															},
														},
													},
													Value: " / Metric: ",
												}, &ast.InterpolatedPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 85,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: "${metric_type}",
															Start: ast.Position{
																Column: 71,
																Line:   55,
															},
														},
													},
													Expression: &ast.Identifier{
														BaseNode: ast.BaseNode{
															Errors: nil,
															Loc: &ast.SourceLocation{
																End: ast.Position{
																	Column: 84,
																	Line:   55,
																},
																File:   "deadman_threshold_test.flux",
																Source: "metric_type",
																Start: ast.Position{
																	Column: 73,
																	Line:   55,
																},
															},
														},
														Name: "metric_type",
													},
												}, &ast.TextPart{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 99,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: " deadman alert",
															Start: ast.Position{
																Column: 85,
																Line:   55,
															},
														},
													},
													Value: " deadman alert",
												}},
											},
											Params: []*ast.Property{&ast.Property{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 15,
															Line:   55,
														},
														File:   "deadman_threshold_test.flux",
														Source: "r",
														Start: ast.Position{
															Column: 14,
															Line:   55,
														},
													},
												},
												Key: &ast.Identifier{
													BaseNode: ast.BaseNode{
														Errors: nil,
														Loc: &ast.SourceLocation{
															End: ast.Position{
																Column: 15,
																Line:   55,
															},
															File:   "deadman_threshold_test.flux",
															Source: "r",
															Start: ast.Position{
																Column: 14,
																Line:   55,
															},
														},
													},
													Name: "r",
												},
												Value: nil,
											}},
										},
									}},
									With: nil,
								}},
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 6,
											Line:   56,
										},
										File:   "deadman_threshold_test.flux",
										Source: "tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )",
										Start: ast.Position{
											Column: 8,
											Line:   51,
										},
									},
								},
								Callee: &ast.MemberExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 26,
												Line:   51,
											},
											File:   "deadman_threshold_test.flux",
											Source: "tickscript.deadman",
											Start: ast.Position{
												Column: 8,
												Line:   51,
											},
										},
									},
									Object: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 18,
													Line:   51,
												},
												File:   "deadman_threshold_test.flux",
												Source: "tickscript",
												Start: ast.Position{
													Column: 8,
													Line:   51,
												},
											},
										},
										Name: "tickscript",
									},
									Property: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 26,
													Line:   51,
												},
												File:   "deadman_threshold_test.flux",
												Source: "deadman",
												Start: ast.Position{
													Column: 19,
													Line:   51,
												},
											},
										},
										Name: "deadman",
									},
								},
							},
						},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 34,
									Line:   57,
								},
								File:   "deadman_threshold_test.flux",
								Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"])",
								Start: ast.Position{
									Column: 36,
									Line:   46,
								},
							},
						},
						Call: &ast.CallExpression{
							Arguments: []ast.Expression{&ast.ObjectExpression{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 33,
											Line:   57,
										},
										File:   "deadman_threshold_test.flux",
										Source: "columns: [\"details\"]",
										Start: ast.Position{
											Column: 13,
											Line:   57,
										},
									},
								},
								Properties: []*ast.Property{&ast.Property{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 33,
												Line:   57,
											},
											File:   "deadman_threshold_test.flux",
											Source: "columns: [\"details\"]",
											Start: ast.Position{
												Column: 13,
												Line:   57,
											},
										},
									},
									Key: &ast.Identifier{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 20,
													Line:   57,
												},
												File:   "deadman_threshold_test.flux",
												Source: "columns",
												Start: ast.Position{
													Column: 13,
													Line:   57,
												},
											},
										},
										Name: "columns",
									},
									Value: &ast.ArrayExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 33,
													Line:   57,
												},
												File:   "deadman_threshold_test.flux",
												Source: "[\"details\"]",
												Start: ast.Position{
													Column: 22,
													Line:   57,
												},
											},
										},
										Elements: []ast.Expression{&ast.StringLiteral{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 32,
														Line:   57,
													},
													File:   "deadman_threshold_test.flux",
													Source: "\"details\"",
													Start: ast.Position{
														Column: 23,
														Line:   57,
													},
												},
											},
											Value: "details",
										}},
									},
								}},
								With: nil,
							}},
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 34,
										Line:   57,
									},
									File:   "deadman_threshold_test.flux",
									Source: "drop(columns: [\"details\"])",
									Start: ast.Position{
										Column: 8,
										Line:   57,
									},
								},
							},
							Callee: &ast.Identifier{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 12,
											Line:   57,
										},
										File:   "deadman_threshold_test.flux",
										Source: "drop",
										Start: ast.Position{
											Column: 8,
											Line:   57,
										},
									},
								},
								Name: "drop",
							},
						},
					},
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 32,
								Line:   58,
							},
							File:   "deadman_threshold_test.flux",
							Source: "table\n\t|> range(start: 2020-11-25T14:05:00Z)\n    |> filter(fn: (r) => r._measurement == \"testm\" and r._field == metric_type and r.realm == tier)\n    |> schema.fieldsAsCols()\n    |> tickscript.groupBy(columns: [\"host\", \"realm\"])\n    |> tickscript.deadman(\n        check: check,\n        measurement: \"testm\",\n        threshold: 10,\n        id: (r) => \"Realm: ${r.realm} - Hostname: ${r.host} / Metric: ${metric_type} deadman alert\",\n    )\n    |> drop(columns: [\"details\"]) // to avoid issue with validation\n    |> drop(columns: [\"_time\"])",
							Start: ast.Position{
								Column: 36,
								Line:   46,
							},
						},
					},
					Call: &ast.CallExpression{
						Arguments: []ast.Expression{&ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 31,
										Line:   58,
									},
									File:   "deadman_threshold_test.flux",
									Source: "columns: [\"_time\"]",
									Start: ast.Position{
										Column: 13,
										Line:   58,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 31,
											Line:   58,
										},
										File:   "deadman_threshold_test.flux",
										Source: "columns: [\"_time\"]",
										Start: ast.Position{
											Column: 13,
											Line:   58,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 20,
												Line:   58,
											},
											File:   "deadman_threshold_test.flux",
											Source: "columns",
											Start: ast.Position{
												Column: 13,
												Line:   58,
											},
										},
									},
									Name: "columns",
								},
								Value: &ast.ArrayExpression{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 31,
												Line:   58,
											},
											File:   "deadman_threshold_test.flux",
											Source: "[\"_time\"]",
											Start: ast.Position{
												Column: 22,
												Line:   58,
											},
										},
									},
									Elements: []ast.Expression{&ast.StringLiteral{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 30,
													Line:   58,
												},
												File:   "deadman_threshold_test.flux",
												Source: "\"_time\"",
												Start: ast.Position{
													Column: 23,
													Line:   58,
												},
											},
										},
										Value: "_time",
									}},
								},
							}},
							With: nil,
						}},
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 32,
									Line:   58,
								},
								File:   "deadman_threshold_test.flux",
								Source: "drop(columns: [\"_time\"])",
								Start: ast.Position{
									Column: 8,
									Line:   58,
								},
							},
						},
						Callee: &ast.Identifier{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 12,
										Line:   58,
									},
									File:   "deadman_threshold_test.flux",
									Source: "drop",
									Start: ast.Position{
										Column: 8,
										Line:   58,
									},
								},
							},
							Name: "drop",
						},
					},
				},
				Params: []*ast.Property{&ast.Property{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 31,
								Line:   46,
							},
							File:   "deadman_threshold_test.flux",
							Source: "table=<-",
							Start: ast.Position{
								Column: 23,
								Line:   46,
							},
						},
					},
					Key: &ast.Identifier{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 28,
									Line:   46,
								},
								File:   "deadman_threshold_test.flux",
								Source: "table",
								Start: ast.Position{
									Column: 23,
									Line:   46,
								},
							},
						},
						Name: "table",
					},
					Value: &ast.PipeLiteral{BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 31,
								Line:   46,
							},
							File:   "deadman_threshold_test.flux",
							Source: "<-",
							Start: ast.Position{
								Column: 29,
								Line:   46,
							},
						},
					}},
				}},
			},
		}, &ast.TestStatement{
			Assignment: &ast.VariableAssignment{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 3,
							Line:   64,
						},
						File:   "deadman_threshold_test.flux",
						Source: "_tickscript_deadman = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
						Start: ast.Position{
							Column: 6,
							Line:   60,
						},
					},
				},
				ID: &ast.Identifier{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 25,
								Line:   60,
							},
							File:   "deadman_threshold_test.flux",
							Source: "_tickscript_deadman",
							Start: ast.Position{
								Column: 6,
								Line:   60,
							},
						},
					},
					Name: "_tickscript_deadman",
				},
				Init: &ast.FunctionExpression{
					BaseNode: ast.BaseNode{
						Errors: nil,
						Loc: &ast.SourceLocation{
							End: ast.Position{
								Column: 3,
								Line:   64,
							},
							File:   "deadman_threshold_test.flux",
							Source: "() => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
							Start: ast.Position{
								Column: 28,
								Line:   60,
							},
						},
					},
					Body: &ast.ParenExpression{
						BaseNode: ast.BaseNode{
							Errors: nil,
							Loc: &ast.SourceLocation{
								End: ast.Position{
									Column: 3,
									Line:   64,
								},
								File:   "deadman_threshold_test.flux",
								Source: "({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
								Start: ast.Position{
									Column: 34,
									Line:   60,
								},
							},
						},
						Expression: &ast.ObjectExpression{
							BaseNode: ast.BaseNode{
								Errors: nil,
								Loc: &ast.SourceLocation{
									End: ast.Position{
										Column: 2,
										Line:   64,
									},
									File:   "deadman_threshold_test.flux",
									Source: "{\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n}",
									Start: ast.Position{
										Column: 35,
										Line:   60,
									},
								},
							},
							Properties: []*ast.Property{&ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 41,
											Line:   61,
										},
										File:   "deadman_threshold_test.flux",
										Source: "input: testing.loadStorage(csv: inData)",
										Start: ast.Position{
											Column: 2,
											Line:   61,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 7,
												Line:   61,
											},
											File:   "deadman_threshold_test.flux",
											Source: "input",
											Start: ast.Position{
												Column: 2,
												Line:   61,
											},
										},
									},
									Name: "input",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 40,
													Line:   61,
												},
												File:   "deadman_threshold_test.flux",
												Source: "csv: inData",
												Start: ast.Position{
													Column: 29,
													Line:   61,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 40,
														Line:   61,
													},
													File:   "deadman_threshold_test.flux",
													Source: "csv: inData",
													Start: ast.Position{
														Column: 29,
														Line:   61,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 32,
															Line:   61,
														},
														File:   "deadman_threshold_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 29,
															Line:   61,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 40,
															Line:   61,
														},
														File:   "deadman_threshold_test.flux",
														Source: "inData",
														Start: ast.Position{
															Column: 34,
															Line:   61,
														},
													},
												},
												Name: "inData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 41,
												Line:   61,
											},
											File:   "deadman_threshold_test.flux",
											Source: "testing.loadStorage(csv: inData)",
											Start: ast.Position{
												Column: 9,
												Line:   61,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 28,
													Line:   61,
												},
												File:   "deadman_threshold_test.flux",
												Source: "testing.loadStorage",
												Start: ast.Position{
													Column: 9,
													Line:   61,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 16,
														Line:   61,
													},
													File:   "deadman_threshold_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 9,
														Line:   61,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 28,
														Line:   61,
													},
													File:   "deadman_threshold_test.flux",
													Source: "loadStorage",
													Start: ast.Position{
														Column: 17,
														Line:   61,
													},
												},
											},
											Name: "loadStorage",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 37,
											Line:   62,
										},
										File:   "deadman_threshold_test.flux",
										Source: "want: testing.loadMem(csv: outData)",
										Start: ast.Position{
											Column: 2,
											Line:   62,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 6,
												Line:   62,
											},
											File:   "deadman_threshold_test.flux",
											Source: "want",
											Start: ast.Position{
												Column: 2,
												Line:   62,
											},
										},
									},
									Name: "want",
								},
								Value: &ast.CallExpression{
									Arguments: []ast.Expression{&ast.ObjectExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 36,
													Line:   62,
												},
												File:   "deadman_threshold_test.flux",
												Source: "csv: outData",
												Start: ast.Position{
													Column: 24,
													Line:   62,
												},
											},
										},
										Properties: []*ast.Property{&ast.Property{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 36,
														Line:   62,
													},
													File:   "deadman_threshold_test.flux",
													Source: "csv: outData",
													Start: ast.Position{
														Column: 24,
														Line:   62,
													},
												},
											},
											Key: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 27,
															Line:   62,
														},
														File:   "deadman_threshold_test.flux",
														Source: "csv",
														Start: ast.Position{
															Column: 24,
															Line:   62,
														},
													},
												},
												Name: "csv",
											},
											Value: &ast.Identifier{
												BaseNode: ast.BaseNode{
													Errors: nil,
													Loc: &ast.SourceLocation{
														End: ast.Position{
															Column: 36,
															Line:   62,
														},
														File:   "deadman_threshold_test.flux",
														Source: "outData",
														Start: ast.Position{
															Column: 29,
															Line:   62,
														},
													},
												},
												Name: "outData",
											},
										}},
										With: nil,
									}},
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 37,
												Line:   62,
											},
											File:   "deadman_threshold_test.flux",
											Source: "testing.loadMem(csv: outData)",
											Start: ast.Position{
												Column: 8,
												Line:   62,
											},
										},
									},
									Callee: &ast.MemberExpression{
										BaseNode: ast.BaseNode{
											Errors: nil,
											Loc: &ast.SourceLocation{
												End: ast.Position{
													Column: 23,
													Line:   62,
												},
												File:   "deadman_threshold_test.flux",
												Source: "testing.loadMem",
												Start: ast.Position{
													Column: 8,
													Line:   62,
												},
											},
										},
										Object: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 15,
														Line:   62,
													},
													File:   "deadman_threshold_test.flux",
													Source: "testing",
													Start: ast.Position{
														Column: 8,
														Line:   62,
													},
												},
											},
											Name: "testing",
										},
										Property: &ast.Identifier{
											BaseNode: ast.BaseNode{
												Errors: nil,
												Loc: &ast.SourceLocation{
													End: ast.Position{
														Column: 23,
														Line:   62,
													},
													File:   "deadman_threshold_test.flux",
													Source: "loadMem",
													Start: ast.Position{
														Column: 16,
														Line:   62,
													},
												},
											},
											Name: "loadMem",
										},
									},
								},
							}, &ast.Property{
								BaseNode: ast.BaseNode{
									Errors: nil,
									Loc: &ast.SourceLocation{
										End: ast.Position{
											Column: 24,
											Line:   63,
										},
										File:   "deadman_threshold_test.flux",
										Source: "fn: tickscript_deadman",
										Start: ast.Position{
											Column: 2,
											Line:   63,
										},
									},
								},
								Key: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 4,
												Line:   63,
											},
											File:   "deadman_threshold_test.flux",
											Source: "fn",
											Start: ast.Position{
												Column: 2,
												Line:   63,
											},
										},
									},
									Name: "fn",
								},
								Value: &ast.Identifier{
									BaseNode: ast.BaseNode{
										Errors: nil,
										Loc: &ast.SourceLocation{
											End: ast.Position{
												Column: 24,
												Line:   63,
											},
											File:   "deadman_threshold_test.flux",
											Source: "tickscript_deadman",
											Start: ast.Position{
												Column: 6,
												Line:   63,
											},
										},
									},
									Name: "tickscript_deadman",
								},
							}},
							With: nil,
						},
					},
					Params: []*ast.Property{},
				},
			},
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 3,
						Line:   64,
					},
					File:   "deadman_threshold_test.flux",
					Source: "test _tickscript_deadman = () => ({\n\tinput: testing.loadStorage(csv: inData),\n\twant: testing.loadMem(csv: outData),\n\tfn: tickscript_deadman,\n})",
					Start: ast.Position{
						Column: 1,
						Line:   60,
					},
				},
			},
		}},
		Imports: []*ast.ImportDeclaration{&ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 17,
						Line:   3,
					},
					File:   "deadman_threshold_test.flux",
					Source: "import \"testing\"",
					Start: ast.Position{
						Column: 1,
						Line:   3,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 17,
							Line:   3,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"testing\"",
						Start: ast.Position{
							Column: 8,
							Line:   3,
						},
					},
				},
				Value: "testing",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 13,
						Line:   4,
					},
					File:   "deadman_threshold_test.flux",
					Source: "import \"csv\"",
					Start: ast.Position{
						Column: 1,
						Line:   4,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 13,
							Line:   4,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"csv\"",
						Start: ast.Position{
							Column: 8,
							Line:   4,
						},
					},
				},
				Value: "csv",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 39,
						Line:   5,
					},
					File:   "deadman_threshold_test.flux",
					Source: "import \"contrib/bonitoo-io/tickscript\"",
					Start: ast.Position{
						Column: 1,
						Line:   5,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 39,
							Line:   5,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"contrib/bonitoo-io/tickscript\"",
						Start: ast.Position{
							Column: 8,
							Line:   5,
						},
					},
				},
				Value: "contrib/bonitoo-io/tickscript",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 37,
						Line:   6,
					},
					File:   "deadman_threshold_test.flux",
					Source: "import \"influxdata/influxdb/monitor\"",
					Start: ast.Position{
						Column: 1,
						Line:   6,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 37,
							Line:   6,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"influxdata/influxdb/monitor\"",
						Start: ast.Position{
							Column: 8,
							Line:   6,
						},
					},
				},
				Value: "influxdata/influxdb/monitor",
			},
		}, &ast.ImportDeclaration{
			As: nil,
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 36,
						Line:   7,
					},
					File:   "deadman_threshold_test.flux",
					Source: "import \"influxdata/influxdb/schema\"",
					Start: ast.Position{
						Column: 1,
						Line:   7,
					},
				},
			},
			Path: &ast.StringLiteral{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 36,
							Line:   7,
						},
						File:   "deadman_threshold_test.flux",
						Source: "\"influxdata/influxdb/schema\"",
						Start: ast.Position{
							Column: 8,
							Line:   7,
						},
					},
				},
				Value: "influxdata/influxdb/schema",
			},
		}},
		Metadata: "parser-type=rust",
		Name:     "deadman_threshold_test.flux",
		Package: &ast.PackageClause{
			BaseNode: ast.BaseNode{
				Errors: nil,
				Loc: &ast.SourceLocation{
					End: ast.Position{
						Column: 24,
						Line:   1,
					},
					File:   "deadman_threshold_test.flux",
					Source: "package tickscript_test",
					Start: ast.Position{
						Column: 1,
						Line:   1,
					},
				},
			},
			Name: &ast.Identifier{
				BaseNode: ast.BaseNode{
					Errors: nil,
					Loc: &ast.SourceLocation{
						End: ast.Position{
							Column: 24,
							Line:   1,
						},
						File:   "deadman_threshold_test.flux",
						Source: "tickscript_test",
						Start: ast.Position{
							Column: 9,
							Line:   1,
						},
					},
				},
				Name: "tickscript_test",
			},
		},
	}},
	Package: "tickscript_test",
	Path:    "contrib/bonitoo-io/tickscript",
}}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL