Skip to content

Commit 6643ff6

Browse files
Updating monitor part
1 parent e4233c0 commit 6643ff6

File tree

4 files changed

+22
-391
lines changed

4 files changed

+22
-391
lines changed

docs/integrations/databases/mariadb.md

Lines changed: 5 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -429,91 +429,6 @@ At this point, Telegraf should start collecting the MariaDB metrics and forward
429429
</TabItem>
430430
</Tabs>
431431

432-
433-
## Installing the MariaDB Monitors
434-
435-
The next few sections provide instructions for installing the MariaDB Monitors app, as well as examples of each of the app dashboards. These instructions assume you have already set up the collection as described in the Collect Logs and Metrics for the MariaDB app page.
436-
437-
#### Pre-Packaged Alerts
438-
439-
Sumo Logic has provided out-of-the-box alerts available through [Sumo Logic monitors](/docs/alerts/monitors) to help you monitor your MariaDB clusters. These alerts are built based on metrics and logs datasets and include preset thresholds based on industry best practices and recommendations. See [Alerts](#mariadb-alerts) for more information.
440-
* To install these alerts, you need to have the Manage Monitors role capability.
441-
* Alerts can be installed by either importing a JSON file or a Terraform script.
442-
* There are limits to how many alerts can be enabled - see the [Alerts FAQ](/docs/alerts/monitors/monitor-faq) for details.
443-
444-
### Method A: Importing a JSON file
445-
446-
1. Download the [JSON file](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/blob/main/monitor_packages/MariaDB/MariaDB.json) that describes the monitors.
447-
2. The [JSON](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/blob/main/monitor_packages/MariaDB/MariaDB.json) contains the alerts that are based on Sumo Logic searches that do not have any scope filters and therefore will be applicable to all MariaDB clusters, the data for which has been collected via the instructions in the previous sections. However, if you would like to restrict these alerts to specific clusters or environments, update the JSON file by replacing the text `db_system=mariadb` with `<Your Custom Filter>`. Custom filter examples:
448-
* For alerts applicable only to a specific cluster, your custom filter would be `db_cluster=mariadb-prod.01`.
449-
* For alerts applicable to all clusters that start with Kafka-prod, your custom filter would be `db_cluster=mariadb-prod*`.
450-
* For alerts applicable to a specific cluster within a production environment, your custom filter would be `db_cluster=mariadb-1` and `environment=prod`. This assumes you have set the optional environment tag while configuring collection.
451-
3. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Monitoring > Monitors**. <br/>[**New UI**](/docs/get-started/sumo-logic-ui). In the main Sumo Logic menu, select **Alerts > Monitors**. You can also click the **Go To...** menu at the top of the screen and select **Monitors**.
452-
4. Click **Add**.
453-
5. Click Import and then copy-paste the above JSON to import monitors.
454-
6. The monitors are disabled by default. Once you have installed the alerts using this method, navigate to the MariaDB folder under **Monitors** to configure them. See [this](/docs/alerts/monitors) document to enable monitors to send notifications to teams or connections. See the instructions detailed in [Add a Monitor](/docs/alerts/monitors/create-monitor).
455-
456-
### Method B: Using a Terraform script
457-
458-
1. **Generate a Sumo Logic access key and ID.** Generate an access key and access ID for a user that has the Manage Monitors role capability in Sumo Logic using instructions in [Access Keys](/docs/manage/security/access-keys). Identify which deployment your Sumo Logic account is in, using this [link](/docs/api/getting-started#sumo-logic-endpoints-by-deployment-and-firewall-security)
459-
2. **[Download and install Terraform 0.13](https://www.terraform.io/downloads.html)** or later.
460-
3. **Download the Sumo Logic Terraform package for MariaDB alerts.** The alerts package is available in the Sumo Logic GitHub [repository](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/tree/main/monitor_packages/MariaDB). You can either download it through the “git clone” command or as a zip file.
461-
4. **Alert Configuration.** After the package has been extracted, navigate to the package directory `terraform-sumologic-sumo-logic-monitor/monitor_packages/MariaDB/`. Edit the **MariaDB.auto.tfvars** file and add the Sumo Logic Access Key, Access Id, and Deployment from Step 1.
462-
```bash
463-
access_id = "<SUMOLOGIC ACCESS ID>"
464-
access_key = "<SUMOLOGIC ACCESS KEY>"
465-
environment = "<SUMOLOGIC DEPLOYMENT>"
466-
```
467-
The Terraform script installs the alerts without any scope filters, if you would like to restrict the alerts to specific clusters or environments, update the variable `mariadb_data_source`. Custom filter examples:
468-
* For a specific cluster, your custom filter would be `db_cluster=mariadb.prod.01`
469-
* For all clusters in an environment, your custom filter would be `environment=prod`
470-
* For alerts applicable to all clusters that start with `mariadb-prod`, your custom filter would be `db_cluster=mariadb-prod*`
471-
* For alerts applicable to a specific cluster within a production environment, your custom filter would be `db_cluster=mariadb-1` and `environment=prod`. This assumes you have set the optional environment tag while configuring collection.
472-
473-
All monitors are disabled by default on installation. If you would like to enable all the monitors, set the parameter `monitors_disabled` to `false` in this file.
474-
475-
By default, the monitors are configured in a monitor folder called “MariaDB”. If you would like to change the name of the folder, update the monitor folder name in “folder” key at `MariaDB.auto.tfvars` file. If you would like the alerts to send email or connection notifications, configure these in the file `MariaDB_notifications.auto.tfvars`. For configuration examples, refer to the next section.
476-
477-
5. **Email and Connection Notification Configuration Examples**. Modify the file `MariaDB_notifications.auto.tfvars` and populate `connection_notifications` and `email_notifications` as per below examples.
478-
```sql title="Pagerduty Connection Example"
479-
connection_notifications = [
480-
{
481-
connection_type = "PagerDuty",
482-
connection_id = "<CONNECTION_ID>",
483-
payload_override = "{\"service_key\": \"your_pagerduty_api_integration_key\",\"event_type\": \"trigger\",\"description\": \"Alert: Triggered {{TriggerType}} for Monitor {{Name}}\",\"client\": \"Sumo Logic\",\"client_url\": \"{{QueryUrl}}\"}",
484-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
485-
},
486-
{
487-
connection_type = "Webhook",
488-
connection_id = "<CONNECTION_ID>",
489-
payload_override = "",
490-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
491-
}
492-
]
493-
```
494-
495-
Replace `<CONNECTION_ID>` with the connection id of the webhook connection. The webhook connection id can be retrieved by calling the [Monitors API](https://api.sumologic.com/docs/#operation/listConnections).
496-
497-
For overriding payload for different connection types, refer to this [document](/docs/alerts/webhook-connections/set-up-webhook-connections).
498-
499-
```sql title="Email Notifications Example"
500-
email_notifications = [
501-
{
502-
connection_type = "Email",
503-
recipients = ["[email protected]"],
504-
subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
505-
time_zone = "PST",
506-
message_body = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
507-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
508-
}
509-
]
510-
```
511-
512-
6. **Install the Alerts**. Navigate to the package directory terraform-sumologic-sumo-logic-monitor/monitor_packages/**MariaDB** and run `terraform init`. This will initialize Terraform and will download the required components.
513-
1. Run `terraform plan` to view the monitors which will be created/modified by Terraform.
514-
2. Run `terraform apply`.
515-
7. **Post Installation**. If you haven’t enabled alerts and/or configured notifications through the Terraform procedure outlined above, we highly recommend enabling alerts of interest and configuring each enabled alert to send notifications to other users or services. This is detailed in Step 4 of [this document](/docs/alerts/monitors/create-monitor).
516-
517432
## Installing the MariaDB app
518433

519434
This section demonstrates how to install the MariaDB app. To install the app:
@@ -646,11 +561,13 @@ Use this dashboard to:
646561

647562
<img src={useBaseUrl('https://sumologic-app-data-v2.s3.amazonaws.com/dashboards/MariaDB/MariaDB-Table-Peformance-Metrics.png')} alt="mariadb dashboards" />
648563

649-
## MariaDB Alerts
564+
## Create monitors for MariaDB app
565+
566+
import CreateMonitors from '../../reuse/apps/create-monitors.md';
650567

651-
Sumo Logic has provided out-of-the-box alerts available through [Sumo Logic monitors](/docs/alerts/monitors) to help you quickly determine if the MariaDB Database are available and performing as expected. These alerts are built based on logs and metrics datasets and have preset thresholds based on industry best practices and recommendations.
568+
<CreateMonitors/>
652569

653-
Sumo Logic provides the following out-of-the-box alerts:
570+
### MariaDB alerts
654571

655572
| Alert Type (Metrics/Logs) | Alert Name | Alert Description | Trigger Type (Critical / Warning) | Alert Condition | Recover Condition |
656573
|:---------------------------|:------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------|:-----------------|:-------------------|

docs/integrations/databases/mysql.md

Lines changed: 6 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -558,91 +558,6 @@ At this point, MySQL slow query logs should start flowing into Sumo Logic.
558558
</TabItem>
559559
</Tabs>
560560

561-
## Installing MySQL Monitors
562-
563-
The next few sections provide instructions for installing Sumo Logic Monitors for MySQL, the app and descriptions of each of the app dashboards. These instructions assume you have already set up collection as described in Collecting MySQL Logs and Metrics.
564-
565-
Sumo Logic has provided pre-packaged alerts available through [Sumo Logic monitors](/docs/alerts/monitors) to help you proactively determine if a MySQL cluster is available and performing as expected. These monitors are based on metric and log data and include pre-set thresholds that reflect industry best practices and recommendations. For more information about individual alerts, see [MySQL Alerts](#mysql-alerts).
566-
567-
To install these monitors, you must have the **Manage Monitors** role capability.
568-
569-
You can install monitors by importing a JSON file or using a Terraform script.
570-
571-
There are limits to how many alerts can be enabled. For more information, see [Monitors](/docs/alerts/monitors/create-monitor) for details.
572-
573-
### Method A: Install Monitors by importing a JSON file
574-
575-
1. Download the [JSON file](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/blob/main/monitor_packages/mysql/mysql.json) that describes the monitors.
576-
2. Replace `$$mysql_data_source` with a custom source filter. To configure alerts for a specific database cluster, use a filter like `db_system=mysql` or `db_cluster=dev-mysql`. To configure the alerts for all of your clusters, set `$$mysql_data_source` to blank (`""`).
577-
3. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Monitoring > Monitors**. <br/>[**New UI**](/docs/get-started/sumo-logic-ui). In the main Sumo Logic menu, select **Alerts > Monitors**. You can also click the **Go To...** menu at the top of the screen and select **Monitors**.
578-
4. Click **Add**.
579-
5. Click **Import.**
580-
6. On the **Import Content popup**, enter "MySQL" in the Name field, paste in the JSON into the the popup, and click **Import**.
581-
7. The monitors are created in a "MySQL" folder. The monitors are disabled by default. See the [Monitors](/docs/alerts/monitors) topic for information about enabling monitors and configuring notifications or connections.
582-
583-
584-
### Method B: Using a Terraform script
585-
586-
1. Generate an access key and access ID for a user that has the **Manage Monitors** role capability. For instructions, see [Access Keys](/docs/manage/security/access-keys).
587-
2. Download [Terraform 0.13](https://www.terraform.io/downloads.html) or later, and install it.
588-
3. Download the Sumo Logic Terraform package for MySQL monitors. The alerts package is available in the Sumo Logic GitHub [repository](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/tree/main/monitor_packages/mysql). You can either download it using the `git clone` command or as a zip file.
589-
4. Alert Configuration: After extracting the package, navigate to the `terraform-sumologic-sumo-logic-monitor/monitor_packages/mysql/` directory.
590-
1. Edit the `mysql.auto.tfvars` file and add the Sumo Logic Access Key and Access ID from Step 1 and your Sumo Logic deployment. If you're not sure of your deployment, see [Sumo Logic Endpoints and Firewall Security](/docs/api/getting-started#sumo-logic-endpoints-by-deployment-and-firewall-security).
591-
```sql
592-
access_id = "<SUMOLOGIC ACCESS ID>"
593-
access_key = "<SUMOLOGIC ACCESS KEY>"
594-
environment = "<SUMOLOGIC DEPLOYMENT>"
595-
```
596-
2. The Terraform script installs the alerts without any scope filters. If you would like to restrict the alerts to specific clusters or environments, update the `mysql_data_source` variable. For example:
597-
* To configure alerts for a specific cluster, set `mysql_data_source` to something like `db_cluster=mysql.prod.01`
598-
* To configure alerts for all clusters in an environment Set mysql_data_source to something like `environment=prod`
599-
* To configure alerts for...Multiple clusters using a wildcard, set `mysql_data_source` to something like `db_cluster=mysql-prod*`
600-
* To configure alerts for a specific cluster within a specific environment, set `mysql_data_source` to something like `db_cluster=mysql-1` and `environment=prod`. This assumes you have configured and applied Fields as described in Step 1: Configure Fields of the Sumo Logic of the Collect Logs and Metrics for MySQL topic.
601-
602-
All monitors are disabled by default on installation. To enable all of the monitors, set the `monitors_disabled` parameter to `false`. By default, the monitors will be located in a "MySQL" folder on the **Monitors** page. To change the name of the folder, update the monitor folder name in the `folder` variable in the `mysql.auto.tfvars` file.
603-
604-
5. If you want the alerts to send email or connection notifications, edit the `mysql_notifications.auto.tfvars` file to populate the `connection_notifications` and `email_notifications` sections. Examples are provided below.
605-
606-
In the variable definition below, replace `<CONNECTION_ID>` with the connection ID of the Webhook connection. You can obtain the Webhook connection ID by calling the [Monitors API](https://api.sumologic.com/docs/#operation/listConnections).
607-
608-
```sql title="Pagerduty connection example"
609-
connection_notifications = [
610-
{
611-
connection_type = "PagerDuty",
612-
connection_id = "<CONNECTION_ID>",
613-
payload_override = "{\"service_key\": \"your_pagerduty_api_integration_key\",\"event_type\": \"trigger\",\"description\": \"Alert: Triggered {{TriggerType}} for Monitor {{Name}}\",\"client\": \"Sumo Logic\",\"client_url\": \"{{QueryUrl}}\"}",
614-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
615-
},
616-
{
617-
connection_type = "Webhook",
618-
connection_id = "<CONNECTION_ID>",
619-
payload_override = "",
620-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
621-
}
622-
]
623-
```
624-
625-
For information about overriding the payload for different connection types, see [Set Up Webhook Connections](/docs/alerts/webhook-connections/set-up-webhook-connections).
626-
627-
```sql title="Email notifications example"
628-
email_notifications = [
629-
{
630-
connection_type = "Email",
631-
recipients = ["[email protected]"],
632-
subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
633-
time_zone = "PST",
634-
message_body = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
635-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
636-
}
637-
]
638-
```
639-
640-
6. Install Monitors.
641-
1. Navigate to the `terraform-sumologic-sumo-logic-monitor/monitor_packages/mysql/` directory and run `terraform init`. This will initialize Terraform and download the required components.
642-
2. Run `terraform plan` to view the monitors that Terraform will create or modify.
643-
3. Run `terraform apply`.
644-
645-
646561
## Installing the MySQL app
647562

648563
Now that you have set up collection for MySQL, install the Sumo Logic app for MySQL to use the preconfigured searches and dashboards that provide insight into your data.
@@ -736,9 +651,13 @@ Use this dashboard to:
736651

737652
<img src={useBaseUrl('img/integrations/databases/MySQL-Performance-Schema-Metrics.png')} alt="MySQL dashboard" />
738653

739-
## MySQL Alerts
654+
## Create monitors for MySQL app
655+
656+
import CreateMonitors from '../../reuse/apps/create-monitors.md';
657+
658+
<CreateMonitors/>
740659

741-
This section describes the monitors provided with the MySQL app. These monitors are built based on logs and metrics datasets and have preset thresholds based on industry best practices and recommendations.
660+
### MySQL alerts
742661

743662
| Monitor name | Monitor description | Alert Condition | Recovery Condition |
744663
|:------------|:-----------------------------|:----------------|:-------------------|

0 commit comments

Comments
 (0)