Skip to content

Commit fcdd1bf

Browse files
authored
Merge branch 'master' into aerospike-agent-and-dashboards
2 parents b599389 + f53325c commit fcdd1bf

38 files changed

+12810
-19
lines changed

.builders/images/linux-aarch64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \
3636
ldconfig
3737

3838
# Compile and install Python 3
39-
ENV PYTHON3_VERSION=3.12.9
39+
ENV PYTHON3_VERSION=3.12.10
4040
RUN yum install -y libffi-devel && \
4141
DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
4242
VERSION="${PYTHON3_VERSION}" \
43-
SHA256="45313e4c5f0e8acdec9580161d565cf5fea578e3eabf25df7cc6355bf4afa1ee" \
43+
SHA256="15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" \
4444
RELATIVE_PATH="Python-{{version}}" \
4545
bash install-from-source.sh \
4646
--prefix=/opt/python/${PYTHON3_VERSION} \

.builders/images/linux-x86_64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ RUN yum install -y perl-IPC-Cmd perl-CPANPLUS && \
3535
ldconfig
3636

3737
# Compile and install Python 3
38-
ENV PYTHON3_VERSION=3.12.9
38+
ENV PYTHON3_VERSION=3.12.10
3939
RUN yum install -y libffi-devel && \
4040
DOWNLOAD_URL="https://python.org/ftp/python/{{version}}/Python-{{version}}.tgz" \
4141
VERSION="${PYTHON3_VERSION}" \
42-
SHA256="45313e4c5f0e8acdec9580161d565cf5fea578e3eabf25df7cc6355bf4afa1ee" \
42+
SHA256="15d9c623abfd2165fe816ea1fb385d6ed8cf3c664661ab357f1782e3036a6dac" \
4343
RELATIVE_PATH="Python-{{version}}" \
4444
bash install-from-source.sh --prefix=/opt/python/${PYTHON3_VERSION} --with-ensurepip=yes --enable-ipv6 --with-dbmliborder=
4545
ENV PATH="/opt/python/${PYTHON3_VERSION}/bin:${PATH}"

.builders/images/windows-x86_64/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ RUN Get-RemoteFile `
8282
Approve-File -Path $($Env:USERPROFILE + '\.cargo\bin\rustc.exe') -Hash $Env:RUSTC_HASH
8383

8484
# Install Python 3
85-
ENV PYTHON_VERSION="3.12.9"
85+
ENV PYTHON_VERSION="3.12.10"
8686
RUN Get-RemoteFile `
8787
-Uri https://www.python.org/ftp/python/$Env:PYTHON_VERSION/python-$Env:PYTHON_VERSION-amd64.exe `
8888
-Path python-$Env:PYTHON_VERSION-amd64.exe `
89-
-Hash '2a52993092a19cfdffe126e2eeac46a4265e25705614546604ad44988e040c0f'; `
89+
-Hash '67b5635e80ea51072b87941312d00ec8927c4db9ba18938f7ad2d27b328b95fb'; `
9090
Start-Process -Wait python-$Env:PYTHON_VERSION-amd64.exe -ArgumentList '/quiet', 'InstallAllUsers=1'; `
9191
Remove-Item python-$Env:PYTHON_VERSION-amd64.exe; `
9292
& 'C:\Program Files\Python312\python.exe' -m pip install --no-warn-script-location --upgrade pip; `

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,11 @@ plaid/assets/logs/ @DataDog/saa
528528
/openvpn/manifest.json @DataDog/agent-integrations @DataDog/documentation
529529
/openvpn/assets/logs/ @DataDog/agent-integrations @DataDog/documentation @DataDog/logs-backend @DataDog/logs-core
530530

531+
/watchguard_firebox/ @DataDog/agent-integrations
532+
/watchguard_firebox/*.md @DataDog/agent-integrations @DataDog/documentation
533+
/watchguard_firebox/manifest.json @DataDog/agent-integrations @DataDog/documentation
534+
/watchguard_firebox/assets/logs/ @DataDog/agent-integrations @DataDog/documentation @DataDog/logs-backend @DataDog/logs-core
535+
531536
/kaspersky/ @DataDog/agent-integrations
532537
/kaspersky/*.md @DataDog/agent-integrations @DataDog/documentation
533538
/kaspersky/manifest.json @DataDog/agent-integrations @DataDog/documentation

.github/workflows/config/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,8 @@ integration/vonage:
673673
- vonage/**/*
674674
integration/vsphere:
675675
- vsphere/**/*
676+
integration/watchguard_firebox:
677+
- watchguard_firebox/**/*
676678
integration/wazuh:
677679
- wazuh/**/*
678680
integration/weaviate:

.github/workflows/resolve-build-deps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
- name: Set up Python
195195
env:
196196
# Despite the name, this is built for the macOS 11 SDK on arm64 and 10.9+ on intel
197-
PYTHON3_DOWNLOAD_URL: "https://www.python.org/ftp/python/3.12.9/python-3.12.9-macos11.pkg"
197+
PYTHON3_DOWNLOAD_URL: "https://www.python.org/ftp/python/3.12.10/python-3.12.10-macos11.pkg"
198198
run: |-
199199
curl "$PYTHON3_DOWNLOAD_URL" -o python3.pkg
200200
sudo installer -pkg python3.pkg -target /

mysql/changelog.d/20336.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Set lock_wait_timeout session variable lower in order to avoid stalling on acquiring metadata locks when explaining queries

mysql/datadog_checks/mysql/activity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from datadog_checks.base.utils.tracking import tracked_method
1919
from datadog_checks.mysql.cursor import CommenterDictCursor
2020

21-
from .util import DatabaseConfigurationError, connect_with_autocommit, get_truncation_state, warning_with_tags
21+
from .util import DatabaseConfigurationError, connect_with_session_variables, get_truncation_state, warning_with_tags
2222

2323
try:
2424
import datadog_agent
@@ -387,7 +387,7 @@ def _get_db_connection(self):
387387
pymysql connections are not thread safe, so we can't reuse the same connection from the main check.
388388
"""
389389
if not self._db:
390-
self._db = connect_with_autocommit(**self._connection_args)
390+
self._db = connect_with_session_variables(**self._connection_args)
391391
return self._db
392392

393393
def _close_db_conn(self):

mysql/datadog_checks/mysql/metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from datadog_checks.mysql.cursor import CommenterDictCursor
1111
from datadog_checks.mysql.databases_data import DEFAULT_DATABASES_DATA_COLLECTION_INTERVAL, DatabasesData
1212

13-
from .util import connect_with_autocommit
13+
from .util import connect_with_session_variables
1414

1515
try:
1616
import datadog_agent
@@ -94,7 +94,7 @@ def get_db_connection(self):
9494
:return:
9595
"""
9696
if not self._db:
97-
self._db = connect_with_autocommit(**self._connection_args)
97+
self._db = connect_with_session_variables(**self._connection_args)
9898
else:
9999
# Metadata checks runs far less frequently than other checks, and there are reports
100100
# that unused pymysql connections sometimes end up being closed unexpectedly.

mysql/datadog_checks/mysql/mysql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
)
8383
from .statement_samples import MySQLStatementSamples
8484
from .statements import MySQLStatementMetrics
85-
from .util import DatabaseConfigurationError, connect_with_autocommit # noqa: F401
85+
from .util import DatabaseConfigurationError, connect_with_session_variables # noqa: F401
8686
from .version_utils import get_version
8787

8888
try:
@@ -535,7 +535,7 @@ def _connect(self):
535535
db = None
536536
try:
537537
connect_args = self._get_connection_args()
538-
db = connect_with_autocommit(**connect_args)
538+
db = connect_with_session_variables(**connect_args)
539539
self.log.debug("Connected to MySQL")
540540
self.service_check_tags = list(set(service_check_tags))
541541
self.service_check(

mysql/datadog_checks/mysql/statement_samples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from .util import (
3535
DatabaseConfigurationError,
3636
StatementTruncationState,
37-
connect_with_autocommit,
37+
connect_with_session_variables,
3838
get_truncation_state,
3939
warning_with_tags,
4040
)
@@ -280,7 +280,7 @@ def _get_db_connection(self):
280280
:return:
281281
"""
282282
if not self._db:
283-
self._db = connect_with_autocommit(**self._connection_args)
283+
self._db = connect_with_session_variables(**self._connection_args)
284284
return self._db
285285

286286
def _close_db_conn(self):

mysql/datadog_checks/mysql/statements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from datadog_checks.base.utils.tracking import tracked_method
2121
from datadog_checks.mysql.cursor import CommenterDictCursor
2222

23-
from .util import DatabaseConfigurationError, connect_with_autocommit, warning_with_tags
23+
from .util import DatabaseConfigurationError, connect_with_session_variables, warning_with_tags
2424

2525
try:
2626
import datadog_agent
@@ -105,7 +105,7 @@ def _get_db_connection(self):
105105
:return:
106106
"""
107107
if not self._db:
108-
self._db = connect_with_autocommit(**self._connection_args)
108+
self._db = connect_with_session_variables(**self._connection_args)
109109
return self._db
110110

111111
def _close_db_conn(self):

mysql/datadog_checks/mysql/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ def get_truncation_state(statement):
4747
return StatementTruncationState.truncated if truncated else StatementTruncationState.not_truncated
4848

4949

50-
def connect_with_autocommit(**connect_args):
50+
def connect_with_session_variables(**connect_args):
5151
db = pymysql.connect(**connect_args)
5252
with closing(db.cursor(CommenterCursor)) as cursor:
5353
# PyMYSQL only sets autocommit if it receives a different value from the server
5454
# see https://github.com/PyMySQL/PyMySQL/blob/bbd049f40db9c696574ce6f31669880042c56d79/pymysql/connections.py#L443-L447
5555
# but there are cases where the server will not send a correct value for autocommit, so we
5656
# set it explicitly to ensure it's set correctly
5757
cursor.execute("SET AUTOCOMMIT=1")
58-
58+
# Lower the lock wait timeout to avoid deadlocks on metadata locks. By default this is a year.
59+
# https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_lock_wait_timeout
60+
cursor.execute("SET LOCK_WAIT_TIMEOUT=5")
5961
return db
6062

6163

watchguard_firebox/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CHANGELOG - WatchGuard Firebox
2+
3+
<!-- towncrier release notes start -->
4+

watchguard_firebox/README.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
## Overview
2+
3+
[WatchGuard Firebox][4] is a network security platform offering comprehensive threat protection, including firewall, networking, and other security features, suitable for various network environments, from small offices to large enterprises.
4+
5+
This integration enriches and ingests the following events:
6+
7+
- **Firewall Events**: Represents log messages generated by your Firebox for events that occur on the Firebox and for traffic managed by packet filter policies. In addition to normal traffic, this can include messages related to feature keys, subscription services, server load balancing, and other features configured on your Firebox.
8+
- **Networking Events**: Represents log messages generated for traffic related to the connections through your Firebox. This can include events related to interface activity, dynamic routing, PPPoE connections, and DHCP server requests.
9+
- **Management Events**: Represents log messages generated for activity on your Firebox. This includes when changes are made to the device configuration and Device Management user accounts, for user authentication to the Firebox, and actions related to system settings.
10+
- **VPN Events**: Represents log messages generated for processes related to the all VPNs configured on your Firebox. This includes changes to the VPN configuration, tunnel status, and daemon activity.
11+
- **Proxy Policy Events**: Represents log messages generated for traffic managed by the proxy policies configured on your Firebox. This can include events related to traffic through the proxy, proxy actions, and security services.
12+
13+
This integration seamlessly collects all the above listed logs, channeling them into Datadog for analysis. Leveraging the built-in logs pipeline, these logs are parsed and enriched, enabling effortless search and analysis. The integration provides insight into firewall, networking, management, VPN, and proxy policy events through the out-of-the-box dashboards. Additionally, it includes ready-to-use Cloud SIEM detection rules for enhanced monitoring and security.
14+
15+
## Setup
16+
17+
### Installation
18+
19+
To install the WatchGuard Firebox integration, run the following Agent installation command and the steps below. For more information, see the [Integration Management][5] documentation.
20+
21+
**Note**: This step is not necessary for Agent version >= 7.66.0.
22+
23+
Linux command:
24+
25+
```shell
26+
sudo -u dd-agent -- datadog-agent integration install datadog-watchguard-firebox==1.0.0
27+
```
28+
29+
### Configuration
30+
31+
#### Log collection
32+
33+
1. Collecting logs is disabled by default in the Datadog Agent. Enable it in `datadog.yaml`:
34+
35+
```yaml
36+
logs_enabled: true
37+
```
38+
39+
2. Add this configuration block to your `watchguard-firebox.d/conf.yaml` file to start collecting your WatchGuard Firebox logs. See the sample [watchguard-firebox.d/conf.yaml][6] for available configuration options.
40+
41+
```yaml
42+
logs:
43+
- type: udp
44+
port: <PORT>
45+
service: watchguard-firebox
46+
source: watchguard-firebox
47+
```
48+
49+
Note:
50+
- PORT: Port should be identical to the port provided in **Configure Syslog Message Forwarding from WatchGuard Firebox Server**.
51+
- It is recommended not to change the service and source values, as these parameters are integral to the pipeline's operation.
52+
53+
3. [Restart the Agent][1].
54+
55+
#### Configure Syslog Message Forwarding from WatchGuard Firebox Server
56+
57+
1. Log in to **Fireware Web UI** with an administrator account.
58+
2. Select **System** > **Logging**.
59+
3. Select the **Syslog Server** tab.
60+
4. Select the **Send log messages to these syslog servers** check box.
61+
5. Click **Add** to open the Syslog Server dialog box.
62+
6. In the **IP Address** text box, enter the IP address of the server on which datadog-agent is installed.
63+
7. In the **Port** text box, enter the port you configured to receive the Firebox logs.
64+
8. From the **Log Format** drop-down list, select **Syslog**.
65+
9. Select **The time stamp** and **The serial number of the device** check boxes.
66+
10. Click **OK**.
67+
68+
### Validation
69+
70+
[Run the Agent's status subcommand][2] and look for `watchguard-firebox` under the Checks section.
71+
72+
## Data Collected
73+
74+
### Logs
75+
76+
The WatchGuard Firebox integration collects firewall, networking, management, VPN, and proxy policy Events.
77+
78+
### Metrics
79+
80+
The WatchGuard Firebox integration does not include any metrics.
81+
82+
### Events
83+
84+
The WatchGuard Firebox integration does not include any events.
85+
86+
## Troubleshooting
87+
88+
### WatchGuard Firebox
89+
90+
**Permission denied while port binding:**
91+
92+
If you see a **Permission denied** error while port binding in the Agent logs, see the following instructions:
93+
94+
1. Binding to a port number under 1024 requires elevated permissions. Grant access to the port using the `setcap` command:
95+
96+
- Grant access to the port using the `setcap` command:
97+
98+
```shell
99+
sudo setcap CAP_NET_BIND_SERVICE=+ep /opt/datadog-agent/bin/agent/agent
100+
```
101+
102+
- Verify the setup is correct by running the `getcap` command:
103+
104+
```shell
105+
sudo getcap /opt/datadog-agent/bin/agent/agent
106+
```
107+
108+
With the expected output:
109+
110+
```shell
111+
/opt/datadog-agent/bin/agent/agent = cap_net_bind_service+ep
112+
```
113+
114+
**Note**: Re-run this `setcap` command every time you upgrade the Agent.
115+
116+
2. [Restart the Agent][1].
117+
118+
**Data is not being collected:**
119+
120+
Make sure that traffic is bypassed from the configured port if the firewall is enabled.
121+
122+
**Port already in use:**
123+
124+
If you see the **Port <PORT_NUMBER> Already in Use** error, see the following instructions. The example below is for a PORT_NUMBER equal to 514:
125+
126+
On systems using Syslog, if the Agent listens for events on port 514, the following error can appear in the Agent logs: `Can't start UDP forwarder on port 514: listen udp :514: bind: address already in use`.
127+
128+
This error occurs because by default, Syslog listens on port 514. To resolve this error, take **one** of the following steps:
129+
130+
- Disable Syslog.
131+
- Configure the Agent to listen on a different, available port.
132+
133+
For any further assistance, contact [Datadog support][3].
134+
135+
[1]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent
136+
[2]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information
137+
[3]: https://docs.datadoghq.com/help/
138+
[4]: https://www.watchguard.com/wgrd-products/network-security
139+
[5]: https://docs.datadoghq.com/agent/guide/integration-management/?tab=linux#install
140+
[6]: https://github.com/DataDog/integrations-core/blob/master/watchguard-firebox/datadog_checks/watchguard-firebox/data/conf.yaml.example
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: WatchGuard Firebox
2+
files:
3+
- name: watchguard_firebox.yaml
4+
options:
5+
- template: logs
6+
example:
7+
- type: udp
8+
port: <PORT>
9+
service: watchguard-firebox
10+
source: watchguard-firebox

0 commit comments

Comments
 (0)