influxdata / influxdata/kapacitor
Extract substring from groupBy value
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Hi,
Il use Kapacitor (1.5.3) to send email alerts when a certificate expiration date is approaching.
Data is grabbed by Telegraf (1.12.0) with x509_cert plugin.
I get the "timeout" value with eval(lambda: "expiry").as('value').
The TICK script uses "groupBy = ['common_name']" to parse all certificates.
Then I use "Certificate expiration : {{.Group}}" as subject of the mail.
But {{.Group}} prints "common_name=server.domain.org".
I'd like to print only "server.domain.org" without the tag name "common_name" and the equal sign.
Is this possible with Kapacitor ?
Something like PHP str_replace function, or a Perl regex mechanism (s/common_name=//)...
Thanks
Contributor guide
Research direction
The report does not name a file, test, or entry point. Start by locating Kapacitor's handling of the alert template .Group value and determine whether group values can be transformed before rendering. Done means the certificate subject contains only the common_name value, without its tag name or equals sign.
Written by the indexing model from the issue text.
Assessment
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100