Skip to content

Commit

Permalink
Add new PostgreSQL check
Browse files Browse the repository at this point in the history
  • Loading branch information
stratacast committed Nov 10, 2022
1 parent efd194c commit 68447b3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions lib/nodeping/checktypes/postgresql.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
defmodule NodePing.Checktypes.Postgresql do
@moduledoc false

@enforce_keys [:target]
defstruct [
:target,
label: "",
autodiag: false,
type: "PGSQL",
query: nil,
fields: %{},
interval: 15,
enabled: false,
public: false,
runlocations: nil,
homeloc: false,
threshold: 5,
sens: 2,
dep: nil,
notifications: []
]

@typedoc """
PostgreSQL Check field types
"""
@type t :: %__MODULE__{
target: String.t(),
label: String.t() | nil,
autodiag: boolean(),
type: String.t(),
query: String.t(),
fields: map(),
interval: non_neg_integer(),
enabled: boolean(),
public: boolean(),
runlocations: nil | [String.t()],
homeloc: nil | String.t(),
threshold: non_neg_integer(),
sens: non_neg_integer(),
dep: nil | String.t(),
notifications: [map()]
}
end

0 comments on commit 68447b3

Please sign in to comment.