Browse Source

Updated instructions and JSON payload for VictorOps integration.

pull/44/head
Pēteris Caune 9 years ago
parent
commit
6bb08e16d6
3 changed files with 18 additions and 13 deletions
  1. +2
    -1
      hc/api/transports.py
  2. +13
    -11
      templates/integrations/add_victorops.html
  3. +3
    -1
      templates/integrations/victorops_description.html

+ 2
- 1
hc/api/transports.py View File

@ -160,7 +160,8 @@ class VictorOps(HttpTransport):
payload = { payload = {
"entity_id": str(check.code), "entity_id": str(check.code),
"message_type": "CRITICAL" if check.status == "down" else "RECOVERY", "message_type": "CRITICAL" if check.status == "down" else "RECOVERY",
"entity_display_name": description,
"entity_display_name": check.name_then_code(),
"state_message": description,
"monitoring_tool": "healthchecks.io", "monitoring_tool": "healthchecks.io",
} }


+ 13
- 11
templates/integrations/add_victorops.html View File

@ -35,12 +35,10 @@
<div class="col-sm-6"> <div class="col-sm-6">
<span class="step-no">2</span> <span class="step-no">2</span>
<p> <p>
Make note of the routing key. If this team schedule
does not already have a routing key,
click <strong>Setup Routing</strong>
or go to <strong>Integrations</strong>
and scroll to the bottom to create a routing rule and routing key
for this team.
Go to <strong>Settings &gt; Integrations</strong> and scroll
to the bottom of the page. Choose an existing
<strong>Routing Key</strong> or
add a new one, and make note of it.
</p> </p>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
@ -52,9 +50,10 @@
<div class="row ai-step"> <div class="row ai-step">
<div class="col-sm-6"> <div class="col-sm-6">
<span class="step-no">3</span> <span class="step-no">3</span>
Go to <strong>Settings > Integrations</strong>
and click on <strong>REST Endpoint</strong>.
Make note of the <strong>Post URL</strong>.
In the right hand side of
<strong>Settings &gt; Integrations</strong> page,
select <strong>REST Endpoint</strong>, and click on
<strong>Enable Integration</strong>.
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<img <img
@ -66,7 +65,10 @@
<div class="row ai-step"> <div class="row ai-step">
<div class="col-sm-6"> <div class="col-sm-6">
<span class="step-no">4</span> <span class="step-no">4</span>
<p>Paste the <strong>Post URL</strong> from step 3 in the field below, being careful to replace <strong>$routing_key</strong> with your actual routing key from step 2. Save the integration, and it's done!</p>
<p>Paste the <strong>Post URL</strong> from step 3 in the field
below, being careful to replace <strong>$routing_key</strong>
with your actual Routing Key from step 2. Save the integration,
and it's done!</p>
</div> </div>
</div> </div>
@ -76,7 +78,7 @@
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="kind" value="victorops" /> <input type="hidden" name="kind" value="victorops" />
<div class="form-group"> <div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">API Key</label>
<label for="inputEmail3" class="col-sm-2 control-label">Post URL</label>
<div class="col-sm-3"> <div class="col-sm-3">
<input type="text" class="form-control" name="value" placeholder=""> <input type="text" class="form-control" name="value" placeholder="">
</div> </div>


+ 3
- 1
templates/integrations/victorops_description.html View File

@ -1,5 +1,7 @@
{% load humanize %}
{% if check.status == "down" %} {% if check.status == "down" %}
{{ check.name_then_code }} is DOWN
{{ check.name_then_code }} is DOWN.
Last ping was {{ check.last_ping|naturaltime }}.
{% else %} {% else %}
{{ check.name_then_code }} received a ping and is now UP {{ check.name_then_code }} received a ping and is now UP
{% endif %} {% endif %}

Loading…
Cancel
Save