diff --git a/lib/nodeping/checktypes/postgresql.ex b/lib/nodeping/checktypes/postgresql.ex new file mode 100644 index 0000000..453be7d --- /dev/null +++ b/lib/nodeping/checktypes/postgresql.ex @@ -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