Done
Details
Details
Assignee
Unassigned
UnassignedReporter
Alexey Palazhchenko
Alexey Palazhchenko(Deactivated)Priority
Components
Labels
Fix versions
Story Points
5
Sprint
Add sprint
Created November 25, 2020 at 7:50 AM
Updated March 6, 2024 at 3:36 AM
Resolved December 29, 2020 at 10:12 PM
We should ship built-in Integrated Alerting Templates with PMM Server. To keep them closer to pmm-managed code that will validate them during running and on CI, we should keep them in pmm-managed repository, similar to how we do with Check Service. Unlike Check Server, we don't build a Docker image; instead, we should use go-bindata to include them into pmm-managed binary. We should not use pmm-server-packaging or pmm-update for that.
We also should start managing directories with pmm-managed, not pmm-update, to support Docker-way (swapping image) PMM updates. See https://github.com/percona/pmm-update/pull/112.
Generalize and extract Alertmanager.Service.createDataDir method into utils/dir package. It should create or update a directory with given permissions (both
chmod
andchown
). Use it inside Alertmanager.Service.Use that function to create new directories on pmm-managed startup:
/srv/ia/templates
,/etc/ia/rules
.Use go-bindata and
make gen
to convert IA template files to Go code and include it into the build.Use those built-in templates in the template collection code from https://perconadev.atlassian.net/browse/PMM-6873#icft=PMM-6873. Change
/tmp/ia1
to/srv/ia/templates
and remove/tmp/ia2
. Update tests.Write a unit test that ensures that all collected templates are valid.