create
create alerts
🚨 Create an alert.
This command supports reading input from a file.
Files can be supplied via the --file flag or piped into the command.
Example of file structure
{
"active": true,
"alert_type": "cpu",
"environment_id": "00000000-0000-0000-0000-000000000000",
"evaluation_period": 5,
"project_id": "00000000-0000-0000-0000-000000000000",
"severity_level": "high",
"threshold": 90
}
Usage​
csph alerts create [flags]
Aliases​
alerts create, alerts new, alert create, alert new
Options​
Command Specific​
Inherited​
Examples​
# start an interactive prompt to create an alert
> csph alert create
# create an alert for a specific project
> csph alert create \
--project <project-id> \
--environment <environment-id> \
--alert-type cpu \
--severity high \
--threshold 80 \
--evaluation-period 50
# create an alert from a file
> csph alert create --file /path/to/alert.yaml
# create an alert via stdin
> cat /path/to/alert.json | csph alert create
See also​
- csph alerts — manage alerts
- csph alerts get — get alerts
- csph alerts list — list alerts
- csph alerts update — update alerts
- csph alerts delete — delete alerts