Before creating a VictorOps notifier in Observability Platform, enable the Prometheus
integration in VictorOps and create a service API key. See the
REST endpoint integration guide
in the VictorOps documentation for more information.To configure a VictorOps notifier:
In VictorOps, click the Integrations tab.
Search for Prometheus, and then click Enable Integration.
Copy the Service API Key value.
Open the pre-configured REST integration, and copy the URL to notify value.
In the navigation menu select Settings >
Routing Keys
and review your routing keys. If you have any routing keys defined, copy the
appropriate value for the team you want to route this notifier to.
SLUG: A unique identifier, such as team-victorops.
API_KEY: Your VictorOps API key.
Enter the URL to notify value you copied from VictorOps as the value in the
api_url field.
Enter the routing key you copied from VictorOps as the value in the routing_key
field.
Apply the changes:
chronoctl apply -f FILE_NAME.yaml
Replace FILE_NAME with the name of your notifier YAML file.
To create a VictorOps notifier:
Create a VictorOps notifier with Terraform by using the
chronosphere_victorops_alert_notifier type followed by a name in a resource
declaration:
resource "chronosphere_victorops_alert_notifier" "test_victorops" { name = "test-victorops" # Optional slug of the victorops notifier. slug = "vo-test-notifier" ## Notifier-specific required configuration # Detailed definitions can be found at: https://prometheus.io/docs/alerting/latest/configuration/#victorops_config api_key = "0b590c67-20d6-40ba-afb4-84f0808dd969" api_url = "https://alert.victorops.com/integrations/generic/20131114/alert/" routing_key = "test" ## Notifier-specific optional configurations message_type = "CRITICAL" # (Default) OR: WARNING, INFO entity_display_name = "summary of the problem" state_message = "long explanation of the problem" monitoring_tool = "Chronosphere" # Can have multiple custom fields. custom_fields = { "first_field" = "interesting value" } ## (Optional) Base configuration common to all notifiers send_resolved = true # The default value ## (Optional) HTTP configuration common to HTTP notifiers basic_auth_username = "username" basic_auth_password = "strong+p@ssword" # Can use bearer_token instead of basic auth tls_insecure_skip_verify = false}
Enter your VictorOps API key as the value in the api_key field.
Enter the URL to notify value you copied from VictorOps as the value in the
api_url field.
Enter the routing key you copied from VictorOps as the value in the routing_key
field.
Run terraform apply to create the notifier resource.
terraform apply
To complete this action with the Chronosphere API, use the victor_ops object in the
CreateNotifier endpoint.Because the Chronosphere API requires authentication, include an API token with your
curl request, as shown in the following example. For more details, see
Create an API token.