NodePing.Checks.create_check

You're seeing just the function create_check, go back to NodePing.Checks module for more information.
Link to this function

create_check(token, checktype_struct, args, customerid \\ nil)

View Source

Create a new check for your NodePing account or subaccount

Create any of the listed NodePing checks at: https://nodeping.com/docs-api-checks.html and view the "Fields by check type" section to see which checks accept what fields.

Parameters

  • token - NodePing API token that is provided with account
  • checktype_struct - the NodePing.Checktypes that defines the check you are trying to create
  • args - non-default parameters you want to set for creating your check
  • customerid - optional customerid for subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> checktype = NodePing.Checktypes.Ping
iex> args = %{label: "my label", target: "example.com", interval: 1, enabled: true}
iex> NodePing.Checks.create_check(token, checktype, args)