Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md « github « media « templates - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7adf36e49b859d18ee3a6500bfc984569ee5a36d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

# Github webhook 

This guide describes how to integrate your Zabbix installation with Github issues using the Zabbix webhook feature. This guide will provide instructions on setting up a media type, a user and an action in Zabbix.
<br/><br/>
## In Github

1\. Create or use existing user in Github with permission to create issues and 
issue comments in desired repositories.

2\. Please create an **personal access token** according to the original [instruction](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token).


Example of permissions for private repository.

[![](images/thumb.2.jpg?raw=true)](images/2.jpg)

3\. Copy the **personal access token** of your new integration to use it in Zabbix.
<br/><br/>
## In Zabbix

The configuration consists of a _media type_ in Zabbix, which will invoke the webhook to send alerts to Github issues through the Github Rest API.


1\. [Import](https://www.zabbix.com/documentation/6.0/manual/web_interface/frontend_sections/administration/mediatypes) the Github media type from file [media_github.yaml](media_github.yaml).

2\. Change in the imported media the values of the variable github_token.

Change github_url ony in case if will integrate with Github Enterprise.

For more information about the Zabbix Webhook configuration, please see the [documentation](https://www.zabbix.com/documentation/6.0/manual/config/notifications/media/webhook).

3\. Create user and add Github media type to it. In field "Send to" use your full repo name (\<owner\>/\<project name\>) e.g. johndoe/example-project.

[![](images/thumb.1.jpg?raw=true)](images/1.jpg)

4\. Set up a global macro {$ZABBIX.URL} with URL of current zabbix. Please notice that HTTPS will be used by default if HTTP/HTTPS schema is not present in the URL.

For more information, please see [Zabbix](https://www.zabbix.com/documentation/6.0/manual/config/notifications) and [Github](https://docs.github.com/en/rest) documentation.
<br/><br/>
## Supported Versions

Zabbix 6.0, Github RestApi v3