Hi Community,
I want to create a Davis rule that will let me monitor the number of EC2 instances created in a specific Autoscaling group in a time window. I can get the number by counting the entity ids, but this produces a non-timesries data.
timeseries usage=avg(dt.cloud.aws.ec2.cpu.usage),by:{dt.entity.ec2_instance}, from: -24h
| fieldsAdd tags = replacePattern(tostring(entityAttr(dt.entity.ec2_instance, "tags")), """ "\\\\:" """, "_")
| parse tags, "LD:placeholder '[AWS]aws_autoscaling_groupName:' LD: asg_name '\"'" | fieldsRemove placeholder, tags
| filter asg_name == "my-monitoring"
| summarize count(), by:{asg_name}
I have been trying to use makeTimesries without success. I’ getting the following all the time:
Please specify the parameter `time` explicitly, as the implicit default timestamp doesn’t exist
Whe I use time: with any of the available values I get “No records”