Updated instructions and JSON payload for VictorOps integration.

This commit is contained in:
Pēteris Caune 2016-02-04 09:21:58 +02:00
parent e5cc7a6b38
commit 6bb08e16d6
3 changed files with 18 additions and 13 deletions

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",
} }

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 Go to <strong>Settings &gt; Integrations</strong> and scroll
does not already have a routing key, to the bottom of the page. Choose an existing
click <strong>Setup Routing</strong> <strong>Routing Key</strong> or
or go to <strong>Integrations</strong> add a new one, and make note of it.
and scroll to the bottom to create a routing rule and routing key
for this team.
</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> In the right hand side of
and click on <strong>REST Endpoint</strong>. <strong>Settings &gt; Integrations</strong> page,
Make note of the <strong>Post URL</strong>. 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>

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 %}