Skip to content
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

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

alimand
Copy link
Collaborator

@alimand alimand commented Aug 22, 2024

Add documentation about how to send alerts from Grafana be E-mail in Monitoring part:
d4f9dd39-b85b-4ddd-ad26-cb7952ecf483
43e8a016-e8bc-4c37-867c-c4fa0a06497a
ffad2bcf-ad5b-4f99-bf31-de11fe655390
70be7cb2-d805-424f-951d-9688119ac446
849494ee-14af-4d7b-9887-f503e21a6df2
404e34d4-febb-4316-87b2-5dfffc7b2c41

@alimand alimand requested a review from tomkralidis August 22, 2024 12:15
Copy link
Collaborator

@tomkralidis tomkralidis left a 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add blank line.

Copy link
Collaborator

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:
Copy link
Collaborator

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:
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> Testing the setup

@alimand
Copy link
Collaborator Author

alimand commented Aug 23, 2024

@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.

@alimand alimand requested a review from tomkralidis August 23, 2024 09:47
Copy link
Collaborator

@tomkralidis tomkralidis left a 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:
  1. Configuring Alerts in Your Grafana Dashboard6. Configuring Alerts in Your Grafana Dashboard

to:

Configuring alerts in your Grafana dashboard

  1. 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.
  1. "Fence" the text "grafana.ini" so that it renders as code:
``grafana.ini``

@alimand
Copy link
Collaborator Author

alimand commented Aug 23, 2024

@tomkralidis Thanks Tom, I modified based on additional comments

@alimand alimand requested a review from tomkralidis August 23, 2024 11:03
@tomkralidis tomkralidis added the documentation Improvements or additions to documentation label Aug 23, 2024
@tomkralidis tomkralidis added this to the sprint-015 milestone Aug 23, 2024
rename improper words
@tomkralidis
Copy link
Collaborator

Thank you for this contribution @alimand !

@tomkralidis tomkralidis merged commit 83ad2b5 into main Aug 23, 2024
4 checks passed
@tomkralidis tomkralidis deleted the issue-734 branch August 23, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants