Skip to content

Commit 651c2a8

Browse files
added docs changes for Apache, Apache Tomcat, Haproxy, IIS-10, Nginx, Nginx Ingress, Nginx Plus and Nginx Plus Ingress (#5017)
* added docs changes for Apache, Apache Tomcat, Haproxy, IIS-10 * update Haproxy app document to remove apache reference * update apache tomcat app document to remove apache reference * updated docs for Nginx, Nginx Ingress, Nginx Plus and Nginx Plus Ingress * resolved feedback comments * additional feedbacks * feedback comments resolved --------- Co-authored-by: John Pipkin (Sumo Logic) <[email protected]>
1 parent 585a6a1 commit 651c2a8

File tree

8 files changed

+151
-958
lines changed

8 files changed

+151
-958
lines changed

docs/integrations/web-servers/apache-tomcat.md

Lines changed: 22 additions & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,22 @@ Before installing the Sumo Logic app, Apache Tomcat must be set up and configure
1919

2020
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.
2121

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).
25-
26-
<Tabs
27-
groupId="k8s-nonk8s"
28-
defaultValue="k8s"
29-
values={[
30-
{label: 'Kubernetes environments', value: 'k8s'},
31-
{label: 'Non-Kubernetes environments', value: 'non-k8s'},
32-
]}>
33-
34-
<TabItem value="k8s">
35-
36-
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-
<TabItem value="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
4723

24+
As part of the app installation process, the following fields will be created by default:
4825
* `component`
4926
* `environment`
5027
* `webserver_system`
5128
* `webserver_farm`
5229
* `pod`
5330

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).
5638

5739
### Step 2: Configure Collection for Apache Tomcat
5840

@@ -66,7 +48,7 @@ If you're using Apache Tomcat in a non-Kubernetes environment, create the fields
6648

6749
<TabItem value="k8s">
6850

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).
7052

7153
<img src={useBaseUrl('img/integrations/web-servers/apachetomcat-k8s.png')} alt="apache-k8s" />
7254

@@ -274,27 +256,8 @@ This section explains the steps to collect Apache Tomcat logs from a Kubernetes
274256
1. Sumo Logic Kubernetes collection will automatically start collecting logs from the pods having the annotations defined above.
275257
1. Verify logs in Sumo Logic.
276258

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:
287-
```sql
288-
pod_labels_environment=* pod_labels_component=webserver pod_labels_webserver_farm=* pod_labels_webserver_system=*
289-
```
290-
* **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/>
298261

299262
</TabItem>
300263
<TabItem value="non-k8s">
@@ -591,140 +554,6 @@ At this point, Tomcat logs should start flowing into Sumo Logic.
591554
</TabItem>
592555
</Tabs>
593556
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>
656-
</tr>
657-
<tr>
658-
<td>A specific webserver farm </td>
659-
<td><code>webserver_farm=tomcat.prod.01</code> </td>
660-
</tr>
661-
<tr>
662-
<td>All clusters in an environment </td>
663-
<td><code>environment=prod</code> </td>
664-
</tr>
665-
<tr>
666-
<td>Multiple webserver farms using a wildcard </td>
667-
<td><code>webserver_farm=tomcat-prod*</code> </td>
668-
</tr>
669-
<tr>
670-
<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).
689-
690-
```bash title="Pagerduty connection example"
691-
connection_notifications = [
692-
{
693-
connection_type = "PagerDuty",
694-
connection_id = "<CONNECTION_ID>",
695-
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}}\"}",
696-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
697-
},
698-
{
699-
connection_type = "Webhook",
700-
connection_id = "<CONNECTION_ID>",
701-
payload_override = "",
702-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
703-
}
704-
]
705-
```
706-
707-
```bash title="Email notifications example"
708-
email_notifications = [
709-
{
710-
connection_type = "Email",
711-
recipients = ["[email protected]"],
712-
subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
713-
time_zone = "PST",
714-
message_body = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
715-
run_for_trigger_types = ["Critical", "ResolvedCritical"]
716-
}
717-
]
718-
```
719-
720-
Step 6: Install Monitors
721-
722-
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-
728557
## Installing the Apache Tomcat app
729558
730559
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
891720
892721
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.
893722
894-
## Apache Tomcat Alerts
723+
## Installing Apache Tomcat monitors
895724
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).
897726
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).
732+
:::
733+
734+
## Apache Tomcat Alerts
898735
899736
<table>
900737
<tr>

0 commit comments

Comments
 (0)