summaryrefslogtreecommitdiff
path: root/gnu/packages/prometheus.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/prometheus.scm')
-rw-r--r--gnu/packages/prometheus.scm128
1 files changed, 128 insertions, 0 deletions
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index c206b670bd..fa2481b8be 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -189,6 +189,134 @@ posts the metrics to the Prometheus client registry and just updates the
registry.")
(license license:asl2.0)))
+(define-public go-github-com-prometheus-alertmanager
+ (package
+ (name "go-github-com-prometheus-alertmanager")
+ (version "0.28.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prometheus/alertmanager")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zar5l92a0f3ghm7ndijadzjm6va1qpnxksrah7pxza95pnx0wfq"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; TODO: UI is shipped with JS/TS, CSS, and font libraries
+ ;; required to build CLI <cmd/alertmanager>:
+ ;; - ui/app/lib/bootstrap-4.0.0-alpha.6-dist/css
+ ;; - ui/app/lib/elm-datepicker/css
+ ;; - ui/app/lib/font-awesome-4.7.0
+ ;; - ui/react-app
+ (delete-file-recursively "ui")))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:skip-build? #t
+ #:import-path "github.com/prometheus/alertmanager"
+ #:embed-files #~(list ".*\\.css" ".*\\.html" ".*\\.json")
+ ;; XXX: Enable all when UI is packaged.
+ #:test-subdirs #~(list "api/v2"
+ "cli/config"
+ "dispatch"
+ "featurecontrol"
+ "inhibit"
+ "matcher/compliance"
+ "matcher/parse"
+ "nflog"
+ "nflog/nflogpb"
+ "notify"
+ "notify/discord"
+ "notify/email"
+ "notify/msteams"
+ "notify/msteamsv2"
+ "notify/opsgenie"
+ "notify/pagerduty"
+ "notify/pushover"
+ "notify/rocketchat"
+ "notify/slack"
+ "notify/sns"
+ "notify/telegram"
+ "notify/victorops"
+ "notify/webex"
+ "notify/webhook"
+ "notify/wechat"
+ "pkg/labels"
+ "provider/mem"
+ "store"
+ "template"
+ "timeinterval"
+ "types")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-examples
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (delete-file-recursively "examples")))))))
+ (native-inputs
+ (list go-github-com-emersion-go-smtp
+ go-github-com-kylelemons-godebug
+ go-github-com-stretchr-testify
+ go-go-uber-org-atomic))
+ (propagated-inputs
+ (list go-github-com-alecthomas-kingpin-v2
+ go-github-com-alecthomas-units
+ go-github-com-aws-aws-sdk-go
+ go-github-com-cenkalti-backoff-v4
+ go-github-com-cespare-xxhash-v2
+ go-github-com-coder-quartz
+ go-github-com-go-openapi-analysis
+ go-github-com-go-openapi-errors
+ go-github-com-go-openapi-loads
+ go-github-com-go-openapi-runtime
+ go-github-com-go-openapi-spec
+ go-github-com-go-openapi-strfmt
+ go-github-com-go-openapi-swag
+ go-github-com-go-openapi-validate
+ go-github-com-gofrs-uuid
+ go-github-com-gogo-protobuf
+ go-github-com-hashicorp-go-sockaddr
+ go-github-com-hashicorp-golang-lru-v2
+ go-github-com-hashicorp-memberlist
+ go-github-com-jessevdk-go-flags
+ go-github-com-kimmachinegun-automemlimit
+ go-github-com-matttproud-golang-protobuf-extensions
+ go-github-com-oklog-run
+ go-github-com-oklog-ulid
+ go-github-com-prometheus-client-golang
+ go-github-com-prometheus-common
+ go-github-com-prometheus-common-assets
+ go-github-com-prometheus-exporter-toolkit
+ go-github-com-prometheus-sigv4
+ go-github-com-rs-cors
+ go-github-com-shurcool-httpfs
+ go-github-com-shurcool-vfsgen
+ ;; go-github-com-trivago-tgo
+ go-github-com-xlab-treeprint
+ go-go-uber-org-automaxprocs
+ go-golang-org-x-mod
+ go-golang-org-x-net
+ go-golang-org-x-text
+ go-golang-org-x-tools
+ go-gopkg-in-telebot-v3
+ go-gopkg-in-yaml-v2))
+ (home-page "https://github.com/prometheus/alertmanager")
+ (synopsis "Prometheus Alertmanager")
+ (description
+ "The Alertmanager handles alerts sent by client applications such as the
+Prometheus server. It takes care of deduplicating, grouping, and routing them
+to the correct
+@url{https://prometheus.io/docs/alerting/latest/configuration/#receiver,
+receiver integrations} such as email, @code{PagerDuty}, @code{OpsGenie}, or
+many other
+@url{https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver,
+mechanisms} thanks to the webhook receiver. It also takes care of silencing
+and inhibition of alerts.")
+ (license license:asl2.0)))
+
(define-public go-github-com-prometheus-client-golang
(package
(name "go-github-com-prometheus-client-golang")