Command Line Interface / Create new check

Creates new AppBeat check (periodic monitor) from json settings provided by UTF-8 encoded input file or standard input.

This command requires more parameters than other commands and is considered a little bit more complex for this reason. You can also run it in three different ways.

Usage 1: create new simple website monitor directly from command line (check interval is set to 300 seconds, paid plans can also set 60 seconds)

dotnet AppBeat.CLI.dll new-check --type web --url www.google.com --name test1 --service 00257c9d-a86b-4427-9105-e683e8148e3f --interval 300

Output example:


{
  "Id": "ac94bd0f7e154acb8779c80ab1c92ba5",
  "Success": true,
  "Error": null
}

This command created new periodic website check called "test1" with resource identifier ac94bd0f7e154acb8779c80ab1c92ba5

--service parameter can be skipped if you have only one active service.

Usage 2: create new website monitor from UTF-8 encoded json file

dotnet AppBeat.CLI.dll new-check ./web_check_template.json

Content of web_check_template.json file:


{
	"Agent": "AdvancedWeb",
	"Name": "test2",
	"Description": "Check created with AppBeat command line tool / API",
	"CheckIntervalInSeconds": "300",
	"ServiceId": "00257c9d-a86b-4427-9105-e683e8148e3f",
	"ResendNotificationOnFailure": 0,
	"ConsecutiveFailedChecksNotificationThreshold": 0,
	"AgentSpecificSettings": {
		"URL": "www.google.com",
		"TIMEOUT": "15",
		"METHOD": "GET",
		"HTTP_VER": "http1.1",
		"IP_VER": "ipv4"
	}
}

Output example:


{
  "Id": "d811a5b1a70d4cff9dbd815e18892b0c",
  "Success": true,
  "Error": null
}

Usage 3: create new website monitor from standard input

dotnet AppBeat.CLI.dll new-check <web_check_template_2.json

Content of web_check_template_2.json file:


{
	"Agent": "AdvancedWeb",
	"Name": "test3",
	"Description": "Check created with AppBeat command line tool / API",
	"CheckIntervalInSeconds": "300",
	"ServiceId": "00257c9d-a86b-4427-9105-e683e8148e3f",
	"AgentSpecificSettings": {
		"URL": "www.google.com",
		"TIMEOUT": "15",
		"METHOD": "GET",
		"HTTP_VER": "http1.1",
		"IP_VER": "ipv4"
	}
}

Output example:


{
  "Id": "bef8a5f045544786b1fa8e6eeffefa38",
  "Success": true,
  "Error": null
}

We will soon add json file templates for all other agent types with full parameter specification.

Questions and Feedback

If you have any questions or issues please let us know. You can contact us here.