You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sources/setup/datasource.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,15 @@ weight: 103
17
17
18
18
# Configure the GitHub data source plugin for Grafana
19
19
20
-
1. After creating the **personal access token** in GitHub, navigate into Grafana and click on the menu option on the top left.
20
+
1. After creating the **access token** in GitHub, navigate into Grafana and click on the menu option on the top left.
21
21
22
22
1. Browse to the **Connections** menu and then click on the **Data sources**.
23
23
24
24
1. Click on the GitHub data source plugin which you have installed.
25
25
26
26
1. Go to its settings tab and at the bottom, you will find the **Connection** section.
27
27
28
-
1. Paste the personal access token.
28
+
1. Paste the access token.
29
29

30
30
31
31
(_Optional_): If you using the GitHub Enterprise, then select the **Enterprise** option inside the **Additional Settings** section and paste the URL of your GitHub Enterprise.
Copy file name to clipboardExpand all lines: docs/sources/setup/token.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Create a GitHub personal access token
3
-
menuTitle: Create a personal access token
4
-
description: Create a GitHub personal access token
2
+
title: Create a GitHub access token
3
+
menuTitle: Create an access token
4
+
description: Create a GitHub access token
5
5
keywords:
6
6
- data source
7
7
- github
@@ -15,37 +15,38 @@ labels:
15
15
weight: 102
16
16
---
17
17
18
-
# Create a GitHub personal access token
18
+
# Create a GitHub access token
19
19
20
-
You will need a _personal access token_ to use the plugin. GitHub currently supports two types of personal access tokens:
21
-
22
-
1. fine-grained personal access tokens
23
-
1. personal access tokens (classic)
24
-
25
-
Read more about [personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
26
-
27
-
The Grafana GitHub data source plugin works with both. Below is a table that indicates what minimum requirements must be matched before the plugin can be used.
| Access token | true | This is required to allow plugin to connect to GitHub |
34
-
| GitHub Enterprise URL | false | Only if you are using GitHub Enterprise account |
20
+
You will need either a `GitHub App` or a `Personal Access Token` to use this plugin.
35
21
36
22
## Creating a personal access token (classic)
37
23
38
-
This is an example when you want to use the personal access token (classic).
24
+
This is an example when you want to use the personal access token (classic). \
25
+
Read more about [personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
39
26
40
27
1. Login to your GitHub account.
41
28
1. Navigate to [Personal access tokens](https://github.com/settings/tokens) and click **Generate new token**.
42
29
1. Select the **personal access token (classic)**.
43
30
1. Define the permissions which you want to allow.
44
31
1. Click **Generate Token**.
45
32
46
-
### Permissions
33
+
## Using GitHub App Authentication
34
+
35
+
You can also authenticate using a GitHub App instead of a personal access token. This method allows for better security and fine-grained access to resources.
36
+
37
+
1. Register a new GitHub App by following the instructions in the [GitHub App documentation](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app).
38
+
1. After registering the App, generate a private key for authentication.
39
+
1. Note down the App ID assigned to your GitHub App.
40
+
1.[Install the GitHub App](https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app) on your GitHub account or organization.
41
+
1. Note the installation ID after completing the installation.
42
+
1. In Grafana's data source settings, provide the **app id**, **installation id**, and **private key** in the appropriate fields.
43
+
44
+
> **Where to find your installation id?**\
45
+
> Head over to Settings > Installed GitHub Apps > Configure. The installation ID can be found at the end of the URL `https://github.com/settings/installations/<installation_id>`.
46
+
47
+
## Permissions
47
48
48
-
You will need to define the access permissions for your token in order to allow it to access the data.
49
+
You will need to define the access permissions for your **personal access token** in order to allow it to access the data.
49
50
50
51
The following lists include the required permissions for the access token:
0 commit comments