Skip to content

Instantly share code, notes, and snippets.

View helltone's full-sized avatar

Anton Kolupayev helltone

View GitHub Profile
@helltone
helltone / alertmanager_templates_howto.md
Created October 1, 2024 15:45 — forked from vi7/alertmanager_templates_howto.md
Alertmanager templates testing

Render Alertmanager templates locally

Normally to test Alertmanager templates you need to restart running Alertmanager and wait for alerts to arrive to Slack or email. To speed up this process parts of templates could be rendered locally using predefined alerts data without the need of the actual Alertmanager.

What you still need in this case is amtool which is a part of Alertmanager delivery which could be downloaded here https://github.com/prometheus/alertmanager/releases

Some examples of templates rendering:

# navigate to the templates dir
@helltone
helltone / PictureRename.ps1
Last active August 11, 2024 13:30 — forked from dkittell/PictureRename.ps1
PowerShell – Rename Pictures to Image Taken Date/Time with Dimensions and Hash
<#
.SYNOPSIS
Renames pictures.
.DESCRIPTION
The Rename-Pictures cmdlet to rename pictures to a format where the file creation time is first
in the name in this format: . The idea is that
.PARAMETER Path
Specifies the path to the folder where image files are located. Default is current location (Get-Location).