prometheus / prometheus/alertmanager

Add extensive templating helpers based on Masterminds/sprig

Open
#3,726 13 comments 21 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discuss-in-meeting kind/enhancement
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

When writing custom templates, the current set of functions is fairly limited.

We could register the functions from https://github.com/Masterminds/sprig to offer the template authors an extensive set of helper functions. Docs of the functions is available here: https://masterminds.github.io/sprig/

If you are interested, I would be happy to send a patch.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Alertmanager's current custom-template function registration and the Sprig function documentation linked in the issue. Define the supported helper set and verify the resulting custom-template behavior before considering the feature complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.