Remove integration html instructions (#2627)

Remove integration html instructions, They were migrated to the docs
This commit is contained in:
Innokentii Konstantinov 2023-07-25 12:31:28 +08:00 committed by GitHub
parent 49972c2139
commit 6dcaf52efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 4 additions and 1104 deletions

View file

@ -40,9 +40,6 @@ class IntegrationOptionsMixin:
integration_config.slug for integration_config in _config if integration_config.is_displayed_on_web
]
PUBLIC_API_INTEGRATION_MAP = {integration_config.slug: integration_config.slug for integration_config in _config}
INTEGRATIONS_TO_INSTRUCTIONS_WEB = {
integration_config.slug: f"html/integration_{integration_config.slug}.html" for integration_config in _config
}
INTEGRATION_SHORT_DESCRIPTION = {
integration_config.slug: integration_config.short_description for integration_config in _config
}

View file

@ -537,10 +537,6 @@ class AlertReceiveChannel(IntegrationOptionsMixin, MaintainableObject):
def heartbeat_expired_payload(self):
return getattr(self.heartbeat_module, "heartbeat_expired_payload")
@property
def heartbeat_instruction_template(self):
return getattr(self.heartbeat_module, "heartbeat_instruction_template")
@property
def heartbeat_module(self):
return getattr(heartbeat, self.integration, None)

View file

@ -4,7 +4,6 @@ from django.apps import apps
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import ValidationError as DjangoValidationError
from django.template.loader import render_to_string
from jinja2 import TemplateSyntaxError
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
@ -140,14 +139,8 @@ class AlertReceiveChannelSerializer(EagerLoadingMixin, serializers.ModelSerializ
raise BadRequest(detail=AlertReceiveChannel.DuplicateDirectPagingError.DETAIL)
def get_instructions(self, obj):
if obj.integration in [AlertReceiveChannel.INTEGRATION_MAINTENANCE]:
return ""
rendered_instruction_for_web = render_to_string(
AlertReceiveChannel.INTEGRATIONS_TO_INSTRUCTIONS_WEB[obj.integration], {"alert_receive_channel": obj}
)
return rendered_instruction_for_web
# Deprecated, kept for api-backward compatibility
return ""
# MethodFields are used instead of relevant properties because of properties hit db on each instance in queryset
def get_default_channel_filter(self, obj):

View file

@ -1,6 +1,4 @@
import humanize
from django.conf import settings
from django.template.loader import render_to_string
from django.utils import timezone
from rest_framework import serializers
@ -9,8 +7,6 @@ from apps.heartbeat.models import IntegrationHeartBeat
from common.api_helpers.custom_fields import OrganizationFilteredPrimaryKeyRelatedField
from common.api_helpers.mixins import EagerLoadingMixin
NO_INSTRUCTION_MESSAGE = "No instruction"
class IntegrationHeartBeatSerializer(EagerLoadingMixin, serializers.ModelSerializer):
id = serializers.CharField(read_only=True, source="public_primary_key")
@ -49,14 +45,8 @@ class IntegrationHeartBeatSerializer(EagerLoadingMixin, serializers.ModelSeriali
return self._last_heartbeat_time_verbal(obj) if obj.last_heartbeat_time else None
def get_instruction(self, obj):
rendered_instruction = render_to_string(
obj.alert_receive_channel.heartbeat_instruction_template,
{
"heartbeat_url": obj.link,
"service_url": settings.BASE_URL,
},
)
return rendered_instruction
# Deprecated. Kept for API backward compatibility.
return ""
@staticmethod
def _last_heartbeat_time_verbal(instance):

View file

@ -11,7 +11,6 @@ class IntegrationHeartBeatText:
heartbeat_expired_message: str = "heartbeat_expired"
heartbeat_restored_title: str = "heartbeat_restored"
heartbeat_restored_message: str = "heartbeat_restored"
heartbeat_instruction_template: str = None
class HeartBeatTextCreator:
@ -24,7 +23,6 @@ class HeartBeatTextCreator:
heartbeat_expired_message=self._get_heartbeat_expired_message(),
heartbeat_restored_title=self._get_heartbeat_restored_title(),
heartbeat_restored_message=self._get_heartbeat_restored_message(),
heartbeat_instruction_template=self._get_heartbeat_instruction_template(),
)
def _get_heartbeat_expired_title(self):
@ -51,9 +49,6 @@ class HeartBeatTextCreator:
)
return heartbeat_expired_message
def _get_heartbeat_instruction_template(self):
return f"heartbeat_instructions/{self.integration_verbal.lower()}.html"
class HeartBeatTextCreatorForTitleGrouping(HeartBeatTextCreator):
"""

View file

@ -6,7 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreatorForTitleGrouping(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -6,8 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreator(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -6,7 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreator(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -6,7 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreatorForTitleGrouping(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -6,7 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreator(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -6,8 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreator(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -6,8 +6,6 @@ integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreator(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_instruction_template = heartbeat_text.heartbeat_instruction_template
heartbeat_expired_title = heartbeat_text.heartbeat_expired_title
heartbeat_expired_message = heartbeat_text.heartbeat_expired_message

View file

@ -1,41 +0,0 @@
<p>This configuration will send an alert once a minute, and if alertmanager stops working, OnCall will detect
it and notify you about that.</p>
<ol>
<li>
<p>Add the alert generating script to <code>prometheus.yaml</code> file.
Within Prometheus it is trivial to create an expression that we can use as a heartbeat for OnCall,
like <code>vector(1)</code>. That expression will always return true.</p>
<p>Here is an alert that leverages the previous expression to create a heartbeat alert:</p>
<pre><code>
groups:
- name: meta
rules:
- alert: heartbeat
expr: vector(1)
labels:
severity: none
annotations:
description: This is a heartbeat alert for Grafana OnCall
summary: Heartbeat for Grafana OnCall
</code></pre>
</li>
<li><p>Add receiver configuration to <code>prometheus.yaml</code> with the unique url from OnCall global:</p>
<pre><code>
...
route:
...
routes:
- match:
alertname: heartbeat
receiver: 'grafana-oncall-heartbeat'
group_wait: 0s
group_interval: 1m
repeat_interval: 50s
receivers:
- name: 'grafana-oncall-heartbeat'
webhook_configs:
- url: {{ heartbeat_url }}
send_resolved: false
</code></pre>
</li>
</ol>

View file

@ -1,11 +0,0 @@
<p>Add the following rule to ElastAlert</p>
<pre><code>
index: elastalert_status
type: any
alert: post
http_post_url: {{ heartbeat_url }}
realert:
minutes: 1
alert_text: elastalert is still running
alert_text_type: alert_text_only
</code></pre>

View file

@ -1,16 +0,0 @@
<ol>
<li>
<p>In command line execute following commands:</p>
<pre><code>
echo 'curl -s {{ heartbeat_url }} > /dev/null' > heartbeat_script.sh
chmod +x heartbeat_script.sh
crontab -e
</code></pre>
</li>
<li>
Add this line to crontab:
<pre><code>
* * * * * /path/to/your/heartbeat_script.sh
</code></pre>
</li>
</ol>

View file

@ -1,37 +0,0 @@
{% load static %}
<ol>
<li>
<p>1. In Alerting > Notification channels, click <b>Add channel</b>.</p>
<p>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_grafana_1.png' }}'
alt="grafana_instruction_1" width="400">
</p>
</li>
<li>
<p>2. Enter a <b>Name</b>. The <b>Type</b> is webhook, Enter the unique OnCall URL.</p>
<p>3. Select <b>Send reminders</b> and set a 5m (minute) interval.<p>
<p>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_grafana_2.png' }}'
alt="grafana_instruction_2" width="400">
</p>
</li>
<li>
<p>4. In a dashboard, create a panel that will generate heartbeat alerts. </p>
<p>5. In the <b>Metrics</b> tab, enter 0 in the query field.
<p>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_grafana_3.png' }}'
alt="grafana_instruction_3" width="400">
</p>
<p>6. In the <b>Alerting</b> tab, enter an alert name, and conditions that allow the alert to always be enabled. Set the alert interval.</p>
<p>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_grafana_4.png' }}'
alt="grafana_instruction_4" width="400">
</p>
<p>7. In <b>Notifications</b>, select the name of your heartbeat channel. </p>
<p>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_grafana_5.png' }}'
alt="grafana_instruction_5" width="400">
</p>
<p>8. Click <b>Save</b>. </p>
</li>
</ol>

View file

@ -1,3 +0,0 @@
<p>We propose to set up PRTG to send heartbeat GET or POST requests to amixr endpoint to detect an outage of your
monitoring system.<br/> You can write a script which does this and then run the script via an EXE/script Sensor.<br/>
If you add this Sensor to the Core Server, Amixr will send an alert if the Core Server is offline.

View file

@ -1,16 +0,0 @@
<ol>
<li>
<p>In command line execute following commands:</p>
<pre><code>
echo 'curl -s {{ heartbeat_url }} > /dev/null' > heartbeat_script.sh
chmod +x heartbeat_script.sh
crontab -e
</code></pre>
</li>
<li>
Add this line to crontab:
<pre><code>
* * * * * /path/to/your/heartbeat_script.sh
</code></pre>
</li>
</ol>

View file

@ -1,33 +0,0 @@
{% load static %}
<ol>
<li>Open your Zabbix interface</li>
<li>Well use Zabbix Simple Check to send periodic requests to a special amixr heartbeat endpoint</li>
<li>First we would need to create a host. Go to Configuration -> Host Create -> host</li>
</ol>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_zabbix_1.png' }}'
alt="zabbix_instruction_1" width="400">
<ol start="4">
<li>Fill Host name, Groups, DNS name (app.amixr.io), select DNS and click Save</li>
</ol>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_zabbix_2.png' }}'
alt="zabbix_instruction_2" width="400">
<ol start="5">
<li>Click Web and create a new Web Scenario</li>
</ol>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_zabbix_3.png' }}'
alt="zabbix_instruction_3" width="400">
<ol start="6">
<li>Fill the name, interval (10m) and go to the Steps section</li>
</ol>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_zabbix_4.png' }}'
alt="zabbix_instruction_4" width="400">
<ol start="7">
<li>In the steps section add Name, and the unique url from amixr</li>
</ol>
<img src='{{ service_url|add:'/static/images/heartbeat_instructions/heartbeat_zabbix_5.png' }}'
alt="zabbix_instruction_5" width="400">
<ol start="8">
<li>In the steps section add Name, and the unique url from amixr</li>
</ol>

View file

@ -1,33 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from AlertManager</h4>
<p><ol>
<li>
1. Add the new receiver to the AlertManager configuration file, for example:
<pre>
...
route:
receiver: 'grafana_oncall'
group_by: [alertname, datacenter, app]
...
receivers:
- name: 'grafana_oncall'
webhook_configs:
- url: {{ alert_receive_channel.integration_url }}
send_resolved: true
</pre>
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,20 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from AlertManager</h4>
<p><ol>
<li>
1. Add the new receiver to the AlertManager configuration file:
<pre>
receivers:
- name: 'grafana_oncall'
webhook_configs:
- url: {{ alert_receive_channel.integration_url }}
max_alerts: 100
</pre>
2. Use receiver in route tree:
</pre>
routes:
- matchers:
- severity="critical"
receiver: grafana_oncall
</pre>
</li>
</ol></p>

View file

@ -1,28 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Amazon SNS</h4>
<p><ol>
<li>
1. Create a new Topic in
<a href="https://console.aws.amazon.com/sns">https://console.aws.amazon.com/sns</a>
</li>
<li>2. Open this topic, then create a new subscription</li>
<li>3. Choose the protocol HTTPS</li>
<li>
4. Add the following webhook URL to the Amazon SNS Endpoint
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,93 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from AppDynamics</h4>
<p>Create a new HTTP Request Template in AppDynamics to send events to Grafana OnCall using the
integration URL above.<br>
Refer to AppDynamics documentation for more information on how to create HTTP Request Templates:<br>
<a href="https://docs.appdynamics.com/appd/23.x/latest/en/appdynamics-essentials/alert-and-respond/actions/http-request-actions-and-templates"
target="_blank">
https://docs.appdynamics.com/appd/23.x/latest/en/appdynamics-essentials/alert-and-respond/actions/http-request-actions-and-templates
</a>
</p>
<p>Use the following values when configuring a new HTTP Request Template:</p>
<p>
<b>Request URL:</b>
<br>
Method: <code>POST</code>
<br>
Raw URL: <code>Integration URL above</code>
</p>
<p>
<b>Authentication:</b>
<br>
Type: <code>None</code>
</p>
<p>
<b>Payload:</b>
<br>
MIME Type: <code>application/json</code>
<br>
Template:
{% verbatim %}
<pre>
{
"event": {
"eventType": "${latestEvent.eventType}",
"id": "${latestEvent.id}",
"guid": "${latestEvent.guid}",
"eventTypeKey": "${latestEvent.eventTypeKey}",
"eventTime": "${latestEvent.eventTime}",
"displayName": "${latestEvent.displayName}",
"summaryMessage": "${latestEvent.summaryMessage}",
"eventMessage": "${latestEvent.eventMessage}",
"application": {
"name": "${latestEvent.application.name}"
},
"node": {
"name": "${latestEvent.node.name}"
},
"severity": "${latestEvent.severity}",
"deepLink": "${latestEvent.deepLink}"
}
}
</pre>
{% endverbatim %}
<p>
<b>Response Handling Criteria</b>
<br>
Success Criteria: <code>Status Code 200</code>
</p>
<p>
<b>Settings:</b>
<br>
One Request Per Event: Enabled
</p>
<p>
After setting up a template, create a new action in AppDynamics and select the template you created earlier.
Now you can configure policies to trigger the action when certain events occur in AppDynamics.
<br>
When configuring a policy, select the following events to trigger the action:
<ul>
<li><code>Health Rule Violation Started - Warning</code></li>
<li><code>Health Rule Violation Started - Critical</code></li>
<li><code>Health Rule Violation Continues - Warning</code></li>
<li><code>Health Rule Violation Continues - Critical</code></li>
<li><code>Health Rule Violation Upgraded - Warning to Critical</code></li>
<li><code>Health Rule Violation Downgraded - Critical to Warning</code></li>
<li><code>Health Rule Violation Ended - Warning</code></li>
<li><code>Health Rule Violation Ended - Critical</code></li>
<li><code>Health Rule Violation Canceled - Warning</code></li>
<li><code>Health Rule Violation Canceled - Critical</code></li>
</ul>
</p>
<p>
After setting up the connection, you can test it by sending a test request from the AppDynamics UI.
</p>

View file

@ -1,11 +0,0 @@
<p><em>More details in <a href='https://docs.amixr.io/#/integrations/curler' target="_blank">our documentation</a></em></p>
<ol>
<li>Go to https://curler.amixr.io</li>
<li>Set your website URL and E-Mail</li>
<li>Click &quot;Edit&quot;</li>
<li>Set &quot;Amixr Webhook&quot;:</li></ol>
<pre><code>{{ alert_receive_channel.integration_url }}<br></code></pre>
<ol start="5">
<li>Click &quot;Save&quot;</li>
</ol>

View file

@ -1,33 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Datadog</h4>
<p><ol>
<li>
1. Navigate to the Integrations page from the sidebar
</li>
<li>2. Search for webhook in the search bar</li>
<li>3. Enter a name for the integration, for example: grafana-oncall-alerts</li>
<li>
4. Paste the webhook URL, then save
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
<li>
5. Navigate to the Events page from the sidebar to send the test alert
</li>
<li>6. Type @webhook-grafana-oncall-alerts test alert</li>
<li>7. Click the post button</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1 +0,0 @@
<p>This is the Demointegration for Slack so no actions required.</p>

View file

@ -1,2 +0,0 @@
<p>You can create a direct page alert group from the web UI</p>

View file

@ -1,22 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from ElastAlert</h4>
<p><ol>
<li>
1. Use the integration URL from above as the ElastAlert webhook
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,26 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Fabric</h4>
<p><ol>
<li>1. Go to https://www.fabric.io/settings/apps</li>
<li>2. Choose your application</li>
<li>3. Navigate to Service Hooks -> WebHook</li>
<li>4. Enter URL:
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
<li>5. Click Verify</li>
<li>6. Choose &quot;SEND IMPACT CHANGE ALERTS&quot; and &quot;ALSO SEND NON-FATAL ALERTS&quot;</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,47 +0,0 @@
<blockquote>
Formatted Webhook is primarily used for custom integrations using scripts.
Use any http client, for example curl, to send POST requests with body using the format in the example below:
</blockquote>
<p>
<h6>Body Fields Format:</h6>
<ul>
<li><code>alert_uid</code> [char][not required] - unique alert ID for grouping;</li>
<li><code>title</code> [char][not required] - title;</li>
<li><code>image_url</code> [char][not required] - url for image attached to alert;</li>
<li><code>state</code> [char][not required] - could be &quot;ok&quot; or &quot;alerting&quot;, helpful for auto-resolving;</li>
<li><code>link_to_upstream_details</code> [char][not required] - link back to your monitoring system;</li>
<li><code>message</code> [char][not required] - alert details;</li>
</ul>
</p>
<h6>Request example:</h6>
<p>
<pre>
curl -X POST \
{{ alert_receive_channel.integration_url }} \
-H 'Content-Type: Application/json' \
-d '{
&quot;alert_uid&quot;: &quot;08d6891a-835c-e661-39fa-96b6a9e26552&quot;,
&quot;title&quot;: &quot;The whole system is down&quot;,
&quot;image_url&quot;: &quot;https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg&quot;,
&quot;state&quot;: &quot;alerting&quot;,
&quot;link_to_upstream_details&quot;: &quot;https://en.wikipedia.org/wiki/Downtime&quot;,
&quot;message&quot;: &quot;Smth happened. Oh no!&quot;
}'
</pre>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,41 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Other Grafana</h4>
<blockquote>
To connect the current Grafana stack alerting automatically, please use the <b>Current Grafana</b>.
</blockquote>
<p><ol>
<li>
1. Open your other Grafana instance
</li>
<li>
2. Open Alerting Configuration and go to <code class='code-inline'>Contact Points</code>
</li>
<li>
3. Create a new Contact Point with type <code class='code-inline'>webhook</code> and url
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
<li>
4. Open Notification Policies and create a New Specific Policy
</li>
<li>
5. Choose any Matching labels, or leave them empty to route all the alerts to Grafana OnCall
</li>
<li>
6. Choose the Contact point created in step 3
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,62 +0,0 @@
<h4>Congratulations, you've connected the Grafana Alerting and Grafana OnCall!</h4>
<blockquote>
This is the integration with current Grafana Alerting.
It already automatically created a new Grafana Alerting <code class='code-inline'>Contact Point</code> and
a <code class='code-inline'>Specific Route</code>.<br>
If you want to connect the other Grafana Instance please
choose the <code class='code-inline'>Other Grafana</code> Integration instead.
</blockquote>
<h4>How to send the Test alert from Grafana Alerting?</h4>
<p>
<ol>
<li>
1. Open the corresponding Grafana Alerting <code class='code-inline'>Contact Point</code>
</li>
<li>
2. Use the <code class='code-inline'>Test</code> buton to send an alert to Grafana OnCall
</li>
</ol>
</p>
<h4>How to choose what alerts to send from Grafana Alerting to Grafana OnCall?</h4>
<p>
<ol>
<li>
1. Open the corresponding Grafana Alerting <code class='code-inline'>Specific Route</code>
</li>
<li>
2. All alerts are sent from Grafana Alerting to Grafana OnCall by default,
specify Matching Labels to select which alerts to send
</li>
</ol>
</p>
<h4>What if the Grafana Alerting <code class='code-inline'>Contact Point</code> is missing?</h4>
<p>
<ol>
<li>
1. May be it was deleted, you can always re-create them manually
</li>
<li>
2. Use the following webhook url to create a webhook
<code class='code-inline'>Contact Point</code> in Grafana Alerting
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
</ol>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,4 +0,0 @@
<p>Amixr-based Heartbeat Monitoring allows you to monitor long-lasting processes in your infrastructure or backend and ensure they are finshed in expected timeframe.</p>
<p>Your unique HeartBeat API link:</p>
<pre><code>{{ alert_receive_channel.integration_url }}</code></pre>
<p><em>More details and API specification in <a href='https://docs.amixr.io/#/integrations/heartbeat' target="_blank">our documentation</a></em></p>

View file

@ -1,5 +0,0 @@
<h4>This is the dedicated email address to create alert groups:</h4>
<pre><code class='code-multiline'>{{ alert_receive_channel.inbound_email }}</code></pre>
<a href="https://grafana.com/docs/oncall/latest/integrations/available-integrations/configure-inbound-email/">Docs</a>

View file

@ -1,20 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Jira</h4>
<p>Create a new webhook connection in Jira to send events to Grafana OnCall using the integration URL above.</p>
<p>Refer to Jira documentation for more information on how to create and manage webhooks:
<a href="https://developer.atlassian.com/server/jira/platform/webhooks/" target="_blank">
https://developer.atlassian.com/server/jira/platform/webhooks/
</a>
</p>
<p>When creating a webhook in Jira, select the following events to be sent to Grafana OnCall:</p>
<p>
<ol>
<li>1. Issue - created</li>
<li>2. Issue - updated</li>
<li>3. Issue - deleted</li>
</ol>
</p>
<p>After setting up the connection, you can test it by creating a new issue in Jira. You should see a new alert
group in Grafana OnCall.</p>

View file

@ -1,22 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Kapacitor</h4>
<p><ol>
<li>
1. Use the integration url from above as Kapacitor Webhook
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,7 +0,0 @@
<p>There are 2 ways to issue an incident manually from Slack:</p>
<ol start="1">
<li>Send <code class='code-inline'>/oncall</code> or <code class='code-inline'>/oncall Title</code> message to any chat</li>
<li>Select a message, choose its context menu and click <code class='code-inline'>Create a new incident</code></li>
</ol>

View file

@ -1,27 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from NewRelic</h4>
<p>
<ol>
<li>1. Go to &quot;Alerts&quot;.</li>
<li>2. Go to &quot;Notification Channels&quot;.</li>
<li>3. Create &quot;Webhook&quot; notification channel.</li>
<li>
4. Set the following URL:
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
<li>5. Check &quot;Payload type&quot; is JSON.</li>
</ol>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,22 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from PagerDuty</h4>
<p><ol>
<li>
1. Use the integration url from above as PagerDuty Webhook
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,27 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Pingdom</h4>
<p>
<ol>
<li>1. Go to https://my.pingdom.com/integrations/settings</li>
<li>2. Click &quot;Add Integration&quot;.</li>
<li>3. Type: Webhook. Name: Amixr. URL:</li>
<pre>{{ alert_receive_channel.integration_url }}</pre>
<li>4. Go to &quot;Reports&quot; -> &quot;Uptime&quot; -> &quot;Edit Check&quot;.</li>
<li>5. Select Amixr integration in the bottom.</li>
<li>6. Click &quot;Modify Check&quot; to save.</li>
</ol>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>>

View file

@ -1,98 +0,0 @@
<blockquote>
PRTG can use the script to send the alerts to Grafana OnCall. Please use the format below
</blockquote>
<p>
<h6>Body Fields Format:</h6>
<ul>
<li><code>alert_uid</code> [char][not required] - unique alert ID for grouping;</li>
<li><code>title</code> [char][not required] - title;</li>
<li><code>image_url</code> [char][not required] - url for image attached to alert;</li>
<li><code>state</code> [char][not required] - could be &quot;ok&quot; or &quot;alerting&quot;, helpful for auto-resolving;</li>
<li><code>link_to_upstream_details</code> [char][not required] - link back to your monitoring system;</li>
<li><code>message</code> [char][not required] - alert details;</li>
</ul>
</p>
<h6>ps1 script example:</h6>
<p>
<pre>
# You are very welcome to change this script to fit your needs and formats
Param(
[string]$sensorid,
[string]$date,
[string]$device,
[string]$shortname,
[string]$status,
[string]$message,
[string]$datetime,
[string]$linksensor,
[string]$url
)
# PRTG Server
$PRTGServer = "localhost:8080"
$PRTGUsername = "amixr"
$PRTGPasshash = *****
#Directory for logging
$LogDirectory = "C:\temp\prtg-notifications-msteam.log"
#Acknowledgement Message for alerts ack'd via Teams
$ackmessage = "Problem has been acknowledged via Amixr."
# the acknowledgement URL
$ackURL = [string]::Format("{0}/api/acknowledgealarm.htm?id={1}&ackmsg={2}&username={3}&passhash={4}",$PRTGServer,$sensorID,$ackmessage,$PRTGUsername,$PRTGPasshash);
# Autoresolve an alert in Amixr
if($status -eq "Up")
{ $state = "ok" }
ElseIf($status -match "now: Up")
{ $state = "ok" }
ElseIf($status -match "Up (was:")
{ $state = "ok" }
Else
{ $state = "alerting" }
$image_datetime = [datetime]::parse($datetime)
$sdate = $image_datetime.AddHours(-1).ToString("yyyy-MM-dd-HH-mm-ss")
$edate = $image_datetime.ToString("yyyy-MM-dd-HH-mm-ss")
$image_url = "$PRTGServer/chart.png?type=graph&graphid=-1&avg=0&width=1000&height=400&username=$PRTGUsername&passhash=$PRTGPasshash&id=$sensorid&sdate=$sdate&edate=$edate"
$Body = @{
"alert_uid"="$sensorid $date";
"title"="$device $shortname $status at $datetime ";
"image_url"=$image_url;
"state"=$state;
"link_to_upstream_details"="$linksensor";
"message"="$message";
"ack_url_get"="$ackURL"
} | ConvertTo-Json
$Body
try
{ Invoke-RestMethod -uri $url -Method Post -body $Body -ContentType 'application/json; charset=utf-8'; exit 0; }
Catch
{
$ErrorMessage = $_.Exception.Message
(Get-Date).ToString() +" - "+ $ErrorMessage | Out-File -FilePath $LogDirectory -Append
exit 2;
}
</pre>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,22 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Sentry</h4>
<p><ol>
<li>
1. Use the integration url from above as Sentry Webhook
<pre>{{ alert_receive_channel.integration_url }}</pre>
</li>
</ol></p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,6 +0,0 @@
<p><i>More details in <a href="https://docs.amixr.io/#/integrations/sentry" target="_blank">our documentation</a></i></p>
<p>Amixr and Sentry configuration is simple as that</p>
<ol><li>Go to <a href="https://sentry.io/sentry-apps/amixr/external-install/" target="_blank">Sentry Website</a>
</li><li>Click <code class='code-inline'>Accept & Install</code> button.
</li></ol>

View file

@ -1,5 +0,0 @@
<p>This integration will consume messages from the channel you choose and make incidents from them.</p>
<p>Its useful for:</p>
<p>1. Service desk.</p>
<p>2. Consuming alerts from other systems using Slack as a message bus.</p>

View file

@ -1,26 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Stackdriver</h4>
<p>
<ol>
<li>1. Create a notification channel in Stackdriver by navigating to
Workspace Settings -> WEBHOOKS -> Add Webhook</li>
<li>{{ alert_receive_channel.integration_url }}</li>
<li>2. Create and alert in Stackdriver
by navigating to Alerting -> Policies -> Add Policy ->
Choose Notification Channel using the channel set up in step 1</li>
</ol>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,51 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Kapacitor</h4>
<p>
<ol><li>Open <a href="https://uptimerobot.com" target="_blank">https://uptimerobot.com</a> and log in
</li><li>Go to <code class='code-inline'>My Settings</code> > <code class='code-inline'>Add Alert Contact</code> and set the following fields:
</li></ol>
<ul>
<li>Alert Contact Type: <code class='code-inline'>Webhook</code></li>
<li>Friendly Name: <code class='code-inline'>Amixr</code></li>
<li>URL to Notify: <code class='code-inline'>&lt;{{ alert_receive_channel.integration_url }}&gt;</code></li>
</ul>
<ol start="3"><li>POST Value (JSON Format):</li></ol>
<pre><code class='code-multiline'>
{
"monitorURL": "monitorURL",
"monitorFriendlyName": "monitorFriendlyName",
"alertType": "alertType",
"alertTypeFriendlyName": "alertTypeFriendlyName",
"alertDetails": "alertDetails",
"alertDuration": "alertDuration",
"sslExpiryDate": "sslExpiryDate",
"sslExpiryDaysLeft": "sslExpiryDaysLeft"
}
</code></pre>
<ol start="4"> <li> Flag Send as JSON </li>
<li>Click <code class='code-inline'>Save Changes</code> and <code class='code-inline'>Close</code></li></ol>
<p><strong>Send Test Alert to Amixr</strong></p>
<ol><li>Click <code class='code-inline'>Add New Monitor</code>
</li><li>Monitor Type HTTP(s)
</li><li>Friendly Name Test Amixr
</li><li>Set URL to <code>http://devnull.amixr.io</code> or any other non-existent domain
</li><li>Click Checkbox next to Amixr Alert Contact (created in the previous step)
</li><li>Click <code class='code-inline'>Create Monitor</code>
</li></ol>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,36 +0,0 @@
<blockquote>
Free-format Webhook is mostly used for custom integrations via scrips. Use any http client,
e.g. curl to send POST requests with any payload.
</blockquote>
<h6>Request example:</h6>
<p>
<pre>
curl -X POST \
{{ alert_receive_channel.integration_url }} \
-H 'Content-Type: Application/json' \
-d '{
&quot;alert_uid&quot;: &quot;08d6891a-835c-e661-39fa-96b6a9e26552&quot;,
&quot;title&quot;: &quot;The whole system is down&quot;,
&quot;image_url&quot;: &quot;https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg&quot;,
&quot;state&quot;: &quot;alerting&quot;,
&quot;link_to_upstream_details&quot;: &quot;https://en.wikipedia.org/wiki/Downtime&quot;,
&quot;message&quot;: &quot;Smth happened. Oh no!&quot;
}'
</pre>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,72 +0,0 @@
<blockquote>
Zabbix can use the script to send the alerts to Grafana OnCall. Please use the format below
</blockquote>
<p>
<h6>Body Fields Format:</h6>
<ul>
<li><code>alert_uid</code> [char][not required] - unique alert ID for grouping;</li>
<li><code>title</code> [char][not required] - title;</li>
<li><code>image_url</code> [char][not required] - url for image attached to alert;</li>
<li><code>state</code> [char][not required] - could be &quot;ok&quot; or &quot;alerting&quot;, helpful for auto-resolving;</li>
<li><code>link_to_upstream_details</code> [char][not required] - link back to your monitoring system;</li>
<li><code>message</code> [char][not required] - alert details;</li>
</ul>
</p>
<h6>Script example:</h6>
<p>
<pre>
#!/bin/bash
# This is the modification of original ericos's shell script.
# Get the url ($1), subject ($2), and message ($3)
url="$1"
subject="${2//$'\r\n'/'\n'}"
message="${3//$'\r\n'/'\n'}"
# Alert state depending on the subject indicating whether it is a trigger going in to problem state or recovering
recoversub='^RECOVER(Y|ED)?$|^OK$|^Resolved.*'
if [[ "$subject" =~ $recoversub ]]; then
state='ok'
else
state='alerting'
fi
payload='{
"title": "'${subject}'",
"state": "'${state}'",
"message": "'${message}'"
}'
# Alert group identifier from the subject of action. Grouping will not work without AMIXR_GROUP in the action subject
regex='AMIXR_GROUP: ([a-zA-Z0-9_\"]*)'
if [[ "$subject" =~ $regex ]]; then
alert_uid=${BASH_REMATCH[1]}
payload='{
"alert_uid": "'${alert_uid}'",
"title": "'${subject}'",
"state": "'${state}'",
"message": "'${message}'"
}'
fi
return=$(curl $url -d "${payload}" -H "Content-Type: application/json" -X POST)
</pre>
</p>
<h4>Next steps:</h4>
<p><ol>
<li>
1. Add the routes and escalations in <code class='code-inline'>Escalations settings</code>
</li>
<li>
2. Check grouping, auto-resolving, and rendering templates in
<code class='code-inline'>Alert Templates</code> Settings
</li>
<li>
3. Make sure all the users set up their <code class='code-inline'>Personal Notifications</code> Settings
on the <code class='code-inline'>Users</code> Page
</li>
</ol></p>

View file

@ -1,34 +0,0 @@
<h4>How to start sending alerts to Grafana OnCall from Zendesk</h4>
<p>Create a new "Trigger or automation" webhook connection in Zendesk to send events to Grafana OnCall using the
integration URL above.<br>
Refer to Zendesk documentation for more information on how to create and manage webhooks:
<a href="https://support.zendesk.com/hc/en-us/articles/4408839108378-Creating-webhooks-to-interact-with-third-party-systems"
target="_blank">
https://support.zendesk.com/hc/en-us/articles/4408839108378-Creating-webhooks-to-interact-with-third-party-systems
</a>
</p>
<p>After setting up a webhook in Zendesk, create a new trigger with the following condition:<br>
<code>Meet ANY of the following conditions: "Ticket Is Created", "Ticket status Changed"</code></p>
<p>Set <code>Notify webhook</code> as the trigger action and select the webhook you created earlier.<br>
In the JSON body field, use the following JSON template:</p>
{% verbatim %}
<pre>
{
"ticket": {
"id": "{{ticket.id}}",
"url": "{{ticket.url}}",
"status": "{{ticket.status}}",
"title": "{{ticket.title}}",
"description": "{{ticket.description}}"
}
}
</pre>
{% endverbatim %}
<p>After setting up the connection, you can test it by creating a new ticket in Zendesk. You should see a new alert
group in Grafana OnCall.</p>

View file

@ -9,7 +9,6 @@ def test_heartbeat_metadata_presence():
"heartbeat_restored_title",
"heartbeat_restored_message",
"heartbeat_restored_payload",
"heartbeat_instruction_template",
]
modules = [x for x in dir(heartbeat) if not x.startswith("_") and x != "apps"]
for m in modules: