Replace _sourceName for count
I'd like to do `count _sourceName` where most of the values look as I want them except some ECS services where their naming is `{cluser}-{task-definition}-{revision}-{containername}-{id}` and I'd like to combine all entries by a service so for example in this case rewrite _sourceName to just task-definition part.
How can I do that?
Thanks
-
Try this Eren,
| replace(_sourcename,"{cluser}-{task-definition}-{revision}-{containername}-{id}","{task-definition}") as _sourcename
Unfortunately, it doesn't appear that wildcard works for this. But knowing Sumo, there's better ways to skin this gator.
If you only have a few of such _sourcenames, this should suffice.
Az
Please sign in to leave a comment.
Comments
4 comments