The ability to perform string processing on fields is now fully supported
in Kapacitor v0.13.1 and greater.
On Sunday, June 12, 2016 at 8:49:07 AM UTC-6, oz. wrote:
>
> Same thing here. I would like to setup alerts based on a specific count of
> log messages.
>
> Le jeudi 28 avril 2016 22:33:42 UTC+2, Clint Nelissen a écrit :
>>
>> I have the following TickScript:
>>
>>
>> stream
>> |from()
>> .database('mydb')
>> .retentionPolicy('rp-1h')
>> .measurement('connected-devices')
>> .groupBy('clientId')
>> |window()
>> .period(1m)
>> .every(1m)
>> .align()
>> |distinct('macAddressField')
>> |count('macAddressField')
>> .as('connectedDevices')
>> |influxDBOut()
>> .database('sunray')
>> .retentionPolicy('rp-30d')
>> .measurement('clients-connected-devices')
>>
>>
>> and when it runs I am getting an error in the logs:
>>
>> [edge:aggregate_clients|distinct3->count4] 2016/04/28 20:08:08 D! closing
>> c: 0 e: 0
>> [edge:aggregate_clients|window2->distinct3] 2016/04/28 20:08:08 I!
>> aborting c: 22 e: 1
>> [aggregate_clients:distinct3] 2016/04/28 20:08:08 E! invalid field type:
>> string
>> [edge:aggregate_clients|count4->influxdb_out5] 2016/04/28 20:08:08 D!
>> closing c: 0 e: 0
>> [edge:aggregate_clients|stream->srcstream0] 2016/04/28 20:08:08 D!
>> closing c: 16208 e: 16208
>> [edge:aggregate_clients|srcstream0->stream1] 2016/04/28 20:08:08 D!
>> closing c: 16208 e: 16208
>> [edge:aggregate_clients|stream1->window2] 2016/04/28 20:08:08 D! closing
>> c: 16208 e: 16208
>> [edge:aggregate_clients|window2->distinct3] 2016/04/28 20:08:08 D!
>> closing c: 22 e: 1
>> [task_master] 2016/04/28 20:08:08 E! Stopped task: aggregate_clients
>> invalid field type: string
>> [task_store] 2016/04/28 20:08:08 E! task aggregate_clients finished with
>> error: invalid field type: string
>>
>>
>> The data in question looks roughly like:
>>
>> measurement: connected-devices
>> tags: [
>> clientId: 'abc123'
>> macAddress: '00:00:00:00:00:00'
>> ]
>> fields: [
>> macAddressField: '00:00:00:00:00:00'
>> downloadBytes: 1234
>> uploadBytes: 1234
>> ]
>>
>>
>> (Ideally I would like to do the distinct and count functions on the
>> macAddress tag instead of the macAddress field, but I understand that is
>> not currently an option, which is why it is duplicated)
>>
>> Do the distinct and count functions not work on string fields? Is there
>> anything else glaringly obvious that I am missing?
>>
>
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/7873ba3e-74c1-4490-8b97-fa11b9ebdd8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.