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
@@ -19,40 +19,22 @@ Before installing the Sumo Logic app, Apache Tomcat must be set up and configure
19
19
20
20
This section provides instructions for configuring log and metric collection for the Sumo Logic app for Apache Tomcat. Configuring log and metric collection for the Apache Tomcat app includes the following tasks.
21
21
22
-
### Step 1: Configure Fields in Sumo Logic
23
-
24
-
Create the following Fields in Sumo Logic prior to configuring collection. This ensures that your logs and metrics are tagged with relevant metadata, which is required by the app dashboards. For information on setting up fields, see [Sumo Logic Fields](/docs/manage/fields).
If you're using Apache Tomcat in a Kubernetes environment, create the fields:
37
-
38
-
*`pod_labels_component`
39
-
*`pod_labels_environment`
40
-
*`pod_labels_webserver_system`
41
-
*`pod_labels_webserver_farm`
42
-
43
-
</TabItem>
44
-
<TabItemvalue="non-k8s">
45
-
46
-
If you're using Apache Tomcat in a non-Kubernetes environment, create the fields:
22
+
### Step 1: Configure fields in Sumo Logic
47
23
24
+
As part of the app installation process, the following fields will be created by default:
48
25
*`component`
49
26
*`environment`
50
27
*`webserver_system`
51
28
*`webserver_farm`
52
29
*`pod`
53
30
54
-
</TabItem>
55
-
</Tabs>
31
+
Additionally, if you are using Apache Tomcat in the Kubernetes environment, the following additional fields will be created by default during the app installation process:
32
+
*`pod_labels_component`
33
+
*`pod_labels_environment`
34
+
*`pod_labels_webserver_system`
35
+
*`pod_labels_webserver_farm`
36
+
37
+
For information on setting up fields, see [Fields](/docs/manage/fields).
56
38
57
39
### Step 2: Configure Collection for Apache Tomcat
58
40
@@ -66,7 +48,7 @@ If you're using Apache Tomcat in a non-Kubernetes environment, create the fields
66
48
67
49
<TabItemvalue="k8s">
68
50
69
-
In Kubernetes environments, we use the Telegraf Operator, which is packaged with our Kubernetes collection. You can learn more about it [here](/docs/send-data/collect-from-other-data-sources/collect-metrics-telegraf/telegraf-collection-architecture). The diagram below illustrates how data is collected from Apache Tomcat in a Kubernetes environment. Four services in the architecture shown below make up the metric collection pipeline: Telegraf, Telegraf Operator, Prometheus, and [Sumo Logic Distribution for OpenTelemetry Collector](https://github.com/SumoLogic/sumologic-otel-collector).
51
+
In Kubernetes environments, we use the Telegraf Operator, which is packaged with our Kubernetes collection. You can learn more about it [here](/docs/send-data/collect-from-other-data-sources/collect-metrics-telegraf/telegraf-collection-architecture). The diagram below illustrates how data is collected from Apache Tomcat in the Kubernetes environment. Four services in the architecture shown below make up the metric collection pipeline: Telegraf, Telegraf Operator, Prometheus, and [Sumo Logic Distribution for OpenTelemetry Collector](https://github.com/SumoLogic/sumologic-otel-collector).
@@ -274,27 +256,8 @@ This section explains the steps to collect Apache Tomcat logs from a Kubernetes
274
256
1. Sumo Logic Kubernetes collection will automatically start collecting logs from the pods having the annotations defined above.
275
257
1. Verify logs in Sumo Logic.
276
258
277
-
**Add an FER to normalize the fields in Kubernetes environments**. Labels created in Kubernetes environments automatically are prefixed with pod_labels. To normalize these for our app to work, we need to create a Field Extraction Rule if not already created for WebServer Application Components. To do so:
278
-
279
-
1.[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Logs > Field Extraction Rules**. <br/>[**New UI**](/docs/get-started/sumo-logic-ui). In the top menu select **Configuration**, and then under **Logs** select **Field Extraction Rules**. You can also click the **Go To...** menu at the top of the screen and select **Field Extraction Rules**.
280
-
2. Click the + Add button on the top right of the table.
281
-
3. The **Add Field Extraction Rule** form will appear:
282
-
4. Enter the following options:
283
-
***Rule Name**. Enter the name as **App Observability - Webserver**.
284
-
***Applied At.** Choose **Ingest Time**
285
-
***Scope**. Select **Specific Data**
286
-
***Scope**: Enter the following keyword search expression:
***Parse Expression**.Enter the following parse expression:
291
-
```sql
292
-
if (!isEmpty(pod_labels_environment), pod_labels_environment, "") as environment
293
-
| pod_labels_component as component
294
-
| pod_labels_webserver_system as webserver_system
295
-
| pod_labels_webserver_farm as webserver_farm
296
-
```
297
-
5. Click **Save** to create the rule.
259
+
<br/>**FER to normalize the fields in Kubernetes environments**. Labels created in Kubernetes environments automatically are prefixed with `pod_labels`. To normalize these for our app to work, we will have a Field Extraction Rule automatically created for Apache Tomcat Web Server Application Components named as **AppObservabilityApacheTomcatWebserverFER**
260
+
<br/>
298
261
299
262
</TabItem>
300
263
<TabItemvalue="non-k8s">
@@ -591,140 +554,6 @@ At this point, Tomcat logs should start flowing into Sumo Logic.
591
554
</TabItem>
592
555
</Tabs>
593
556
594
-
This section has instructions for installing Sumo Logic Monitors for Apache Tomcat, the app and descriptions of each of the app dashboards.
595
-
596
-
## Installing Apache Tomcat Monitors
597
-
598
-
Sumo Logic has provided pre-packaged alerts available through [Sumo Logic monitors](/docs/alerts/monitors) to help you proactively determine if an Apache Tomcat webserver farm 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 [Apache Tomcat Alerts](/docs/integrations/web-servers/apache-tomcat#apache-tomcat-alerts).
599
-
600
-
To install these monitors, you must have the **Manage Monitors** role capability.
601
-
602
-
You can install monitors by importing a JSON file or using a Terraform script.
603
-
604
-
Use this dashboard to:mits to how many alerts can be enabled. For more information, see [Monitors](/docs/alerts/monitors/create-monitor) for details.
605
-
606
-
### Method A: Importing a JSON file
607
-
608
-
1. Download the [JSON file](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/blob/main/monitor_packages/ApacheTomcat/ApacheTomcat.json) that describes the monitors.
609
-
2. The [JSON](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/blob/main/monitor_packages/ApacheTomcat/ApacheTomcat.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 Apache Tomcat webserver farms, the data for which has been collected via the instructions in the previous sections.
610
-
611
-
However, if you would like to restrict these alerts to specific clusters or environments, update the JSON file by replacing the text `webserver_farm=` with `<Your Custom Filter>`.
612
-
613
-
Custom filter examples:
614
-
1. For alerts applicable only to a specific webserver farm, your custom filter would be: `webserver_farm=dev-tomcat-01`
615
-
2. For alerts applicable to all webserver farms that start with tomcat-prod, your custom filter would be: `webserver_farm=tomcat-prod*`
616
-
3. For alerts applicable to a specific webserver farm, within a production environment, your custom filter would be: `webserver_farm=dev-tomcat-01 AND environment=prod`. This assumes you have set the optional environment tag while configuring collection.
617
-
618
-
1. [**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**.
619
-
2. Click **Add**.
620
-
3. Click **Import**.
621
-
4. On the **Import Content popup**, enter **Apache Tomcat** in the Name field, paste in the JSON into the popup, and click **Import**.
622
-
5. The monitors are created in a "Apache Tomcat" folder. The monitors are disabled by default. See the [Monitors](/docs/alerts/monitors) topic for information about enabling monitors and configuring notifications or connections.
623
-
624
-
### Method B: Using a Terraform script
625
-
626
-
Step 1: Generate a Sumo Logic access key and ID
627
-
628
-
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).
629
-
630
-
Step 2: Download and install Terraform
631
-
632
-
Download [Terraform 0.13](https://www.terraform.io/downloads.html) or later, and install it.
633
-
634
-
Step 3: Download the Sumo Logic Terraform package for Apache Tomcat monitors
635
-
636
-
The alerts package is available in the Sumo Logic GitHub [repository](https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor/tree/main/monitor_packages/ApacheTomcat). You can either download it using the git clone command or as a zip file.
637
-
638
-
Step 4: Alert Configuration
639
-
640
-
After extracting the package , navigate to the `terraform-sumologic-sumo-logic-monitor/monitor_packages/ApacheTomcat/` directory.
641
-
642
-
Edit the ApacheTomcat.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).
643
-
644
-
```sql
645
-
access_id = "<SUMOLOGIC ACCESS ID>"
646
-
access_key = "<SUMOLOGIC ACCESS KEY>"
647
-
environment = "<SUMOLOGIC DEPLOYMENT>"
648
-
```
649
-
650
-
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 `apachetomcat_data_source` variable. For example:
651
-
652
-
<table>
653
-
<tr>
654
-
<td>To configure alerts for: </td>
655
-
<td>Set <code>apachetomcat_data_source</code> to something like: </td>
<td>A specific webserver farms within a specific environment </td>
671
-
<td><code>webserver_farm=tomcat-1</code> and <code>environment=prod</code>
672
-
<p>This assumes you have configured and applied Fields as described in <a href="#step-1-configure-fields-in-sumo-logic">Step 1: Configure Fields of the Sumo Logic of the Collect Logs and Metrics for Apache Tomcat</a> topic.</p> </td>
673
-
</tr>
674
-
</table>
675
-
676
-
All monitors are disabled by default on installation. To enable all of the monitors, set the monitors_disabled parameter to false.
677
-
678
-
By default, the monitors will be located in a "Apache Tomcat" folder on the **Monitors** page. To change the name of the folder, update the monitor folder name in the folder variable in the ApacheTomcat.auto.tfvars file.
679
-
680
-
If you want the alerts to send email or connection notifications, follow the instructions in the next section.
681
-
682
-
Step 5: Email and Connection Notification Configuration Examples
683
-
684
-
Edit the ApacheTomcat_notifications.auto.tfvars file to populate the connection_notifications and email_notifications sections. Examples are provided below.
685
-
686
-
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).
687
-
688
-
For information about overriding the payload for different connection types, see [Set Up Webhook Connections](/docs/alerts/webhook-connections/set-up-webhook-connections).
1. Navigate to the `terraform-sumologic-sumo-logic-monitor/monitor_packages/ApacheTomcat/` directory and run terraform init. This will initialize Terraform and download the required components.
723
-
2. Run terraform plan to view the monitors that Terraform will create or modify.
724
-
3. Run terraform apply.
725
-
726
-
This section demonstrates how to install the Apache Tomcat app.
727
-
728
557
## Installing the Apache Tomcat app
729
558
730
559
The Sumo Logic app for Apache Tomcat provides pre-configured Dashboards for Access, Catalina.out, and Garbage Collection logs.
@@ -891,10 +720,18 @@ The **Apache Tomcat - MemoryPool** dashboard provides a memory of your JMX Apac
891
720
892
721
To help determine if the Apache Tomcat server is available and performing well, the [Sumo Logic monitors](/docs/alerts/monitors) are provided with out-of-box alerts.
893
722
894
-
## Apache Tomcat Alerts
723
+
## Installing Apache Tomcat monitors
895
724
896
-
The alerts are built based on metrics datasets and have preset thresholds.
725
+
Sumo Logic provides pre-configured alerts available through [Sumo Logic monitors](/docs/alerts/monitors) to help you proactively determine if an Apache Tomcat webserver farm 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, refer to the [Apache Tomcat alerts](/docs/integrations/web-servers/apache-tomcat#apache-tomcat-alerts).
897
726
727
+
import CreateMonitors from '../../reuse/apps/create-monitors.md';
728
+
729
+
:::note
730
+
- Ensure that you have [Manage Monitors role capability](/docs/manage/users-roles/roles/role-capabilities/#alerting) permissions to install the Apache Tomcat alerts.
731
+
- You can only enable the set number of alerts. For more information, refer to [Monitors](/docs/alerts/monitors/create-monitor).
0 commit comments