-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default
freetds
driver for Docker Agent (#6636)
- Loading branch information
1 parent
ca468aa
commit a62fe8a
Showing
6 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
sqlserver/datadog_checks/sqlserver/data/driver_config/odbcinst.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ODBC Drivers] | ||
FreeTDS=Installed | ||
|
||
[FreeTDS] | ||
Driver=/opt/datadog-agent/embedded/lib/libtdsodbc.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# (C) Datadog, Inc. 2018-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
import os | ||
|
||
from datadog_checks.base.utils.platform import Platform | ||
|
||
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
DRIVER_CONFIG_DIR = os.path.join(CURRENT_DIR, 'data', 'driver_config') | ||
|
||
|
||
def set_default_driver_conf(): | ||
if Platform.is_containerized(): | ||
# Use default `./driver_config/odbcinst.ini` when Agent is running in docker. | ||
# `freetds` is shipped with the Docker Agent. | ||
os.environ.setdefault('ODBCSYSINI', DRIVER_CONFIG_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters