might work
This commit is contained in:
parent
c18a4c9a8b
commit
e0e59e2620
3 changed files with 28 additions and 3 deletions
6
deps.edn
6
deps.edn
|
@ -10,8 +10,10 @@
|
||||||
:deps
|
:deps
|
||||||
{;; Application
|
{;; Application
|
||||||
org.clojure/clojure {:mvn/version "1.11.4"}
|
org.clojure/clojure {:mvn/version "1.11.4"}
|
||||||
org.clojure/spec.alpha {:mvn/version "0.5.238"}
|
org.babashka/spec.alpha {:git/url "https://github.com/babashka/spec.alpha"
|
||||||
orchestra/orchestra {:mvn/version "2021.01.01-1"}}
|
:git/sha "79e7daaead944583eece42ff5665be208d019861"}
|
||||||
|
orchestra/orchestra {:mvn/version "2021.01.01-1"}
|
||||||
|
babashka/babashka.curl {:mvn/version "0.1.2"}}
|
||||||
;; ---------------------------------------------------------
|
;; ---------------------------------------------------------
|
||||||
|
|
||||||
;; ---------------------------------------------------------
|
;; ---------------------------------------------------------
|
||||||
|
|
11
src/dda/backup/monitoring.clj
Normal file
11
src/dda/backup/monitoring.clj
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
(ns dda.backup.monitoring
|
||||||
|
(:require
|
||||||
|
[dda.backup.monitoring.domain :as d]
|
||||||
|
[orchestra.core :refer [defn-spec]]))
|
||||||
|
|
||||||
|
(defn-spec send-monitoring any?
|
||||||
|
[config ::d/monitoring-config]
|
||||||
|
(curl/post
|
||||||
|
"http://pushgateway:9091/metrics/job/backup"
|
||||||
|
{:headers {"Content-Type" "application/json; schema=\"prometheus/telemetry\"; version=\"0.0.2\""}
|
||||||
|
:body (d/monitoring-data config)}))
|
14
tests.edn
14
tests.edn
|
@ -10,4 +10,16 @@
|
||||||
|
|
||||||
;; ---------------------------------------------------------
|
;; ---------------------------------------------------------
|
||||||
|
|
||||||
#kaocha/v1 {}
|
#kaocha/v1 {:plugins [:orchestra
|
||||||
|
:kaocha.plugin.alpha/info
|
||||||
|
:profiling
|
||||||
|
:print-invocations
|
||||||
|
:hooks
|
||||||
|
:notifier
|
||||||
|
:kaocha.plugin/version-filter]
|
||||||
|
|
||||||
|
:kaocha/bindings {kaocha.stacktrace/*stacktrace-filters* []
|
||||||
|
kaocha.stacktrace/*stacktrace-stop-list* []}
|
||||||
|
|
||||||
|
:reporter kaocha.report/documentation}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue