-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add documentation about how to send alerts from Grafana be e-mail #744
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @alimand ! See minor change requests. In addition, please ensure all PNG files in this PR are renamed to not have spaces.
.. code-block:: bash | ||
|
||
docker cp grafana:/etc/grafana/grafana.ini /your-local-directory | ||
This command copies the grafana.ini file from the Docker container to your local machine for editing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blank line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename page to docs/source/reference/monitoring/alerts.rst
and making Receiving alerts by email
a section.
|
||
Copy the grafana.ini File from Docker Container | ||
----------------------------------------------- | ||
First, you need to extract the grafana.ini configuration file from your Grafana Docker container to your local system. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enclose grafana.ini in a code fence (i.e. grafana.ini
)
Modify the grafana.ini File | ||
--------------------------- | ||
|
||
Open the grafana.ini file you just copied in a text editor and locate the [smtp] section. You will need to enable SMTP and configure it to use your email provider's SMTP server. Here’s how you can configure it for an email account: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enclose grafana.ini in a code fence (i.e. grafana.ini
)
|
||
.. note:: | ||
|
||
The password used in the grafana.ini SMTP configuration is not your regular email account password. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enclose grafana.ini in a code fence (i.e. grafana.ini
)
|
||
This line tells Docker to use the local version of grafana.ini when starting the Grafana container. | ||
|
||
Restart wis2box to Apply Changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to "Applying changes"
|
||
This command stops and then restarts your containers, ensuring that the new configuration is loaded. | ||
|
||
Set Up the Notification Channel in Grafana |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to "Setting up the notification channel in Grafana"
|
||
(1) Navigate to Alerting -> Notification channels. | ||
|
||
(2) Click Add channel and choose Email as the notification type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> Click "Add channel"
:alt: notification channel detail | ||
:align: center | ||
|
||
Configure Alerts in Your Grafana Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> Configuring alerts in Your Grafana dashboard
:alt: add alert notification | ||
:align: center | ||
|
||
Final Step: Test the Setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> Testing the setup
@tomkralidis Thanks for your time to review Tom, I renamed each png files to make sure there are no spaces anymore and changed the script based on each suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alimand. Some additional comments:
- update all headings/sections without numbers and sentence case do not number headings i.e. changing:
- Configuring Alerts in Your Grafana Dashboard6. Configuring Alerts in Your Grafana Dashboard
to:
Configuring alerts in your Grafana dashboard
- Update all numbered lists to bulleted lists i.e. changing:
(1) Enable Less Secure Apps: If you don't use 2FA, enable "Less secure app access" in your Google account settings.
(2) Generate an App Password: If you use 2FA:
(3) Go to your Google Account -> Security -> App passwords.
(4) Generate a new app password for "Mail".
(5) Use this app password in the grafana.ini password field.
to:
* Enable Less Secure Apps: If you don't use 2FA, enable "Less secure app access" in your Google account settings.
* Generate an App Password: If you use 2FA:
* Go to your Google Account -> Security -> App passwords.
* Generate a new app password for "Mail".
* Use this app password in the grafana.ini password field.
- "Fence" the text "grafana.ini" so that it renders as code:
``grafana.ini``
@tomkralidis Thanks Tom, I modified based on additional comments |
minor changes about the words
recheck
recheck
rename improper words
Thank you for this contribution @alimand ! |
Add documentation about how to send alerts from Grafana be E-mail in Monitoring part: