Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4799063
feat(nrdot-mssql): add debian.yml/rhel.yml recipes for Linux SQL Serv…
RamanaReddy8801 Jul 28, 2026
7562418
Delete test/definitions/nrdot/mssql-otel/mssql-centos9-amd64.json
RamanaReddy8801 Jul 28, 2026
8d9bdff
Delete test/definitions/nrdot/mssql-otel/mssql-ubuntu22-amd64.json
RamanaReddy8801 Jul 28, 2026
d221ecc
SQL Server major-version parsing on Linux
RamanaReddy8801 Jul 28, 2026
22ea191
add mssql-tools18 to PATH before invoking sqlcmd on Linux
RamanaReddy8801 Jul 28, 2026
a475b12
use OTELCOL_OPTIONS instead of OTELCOL_CONFIG on Linux
RamanaReddy8801 Jul 28, 2026
4599bef
Add integration test definitions for MSSQL OTEL recipes
RamanaReddy8801 Jul 29, 2026
19784ee
correct MSSQL OTEL test definitions for CI validation
RamanaReddy8801 Jul 29, 2026
aa37dbe
correct MSSQL OTEL test definitions for CI validation
RamanaReddy8801 Jul 29, 2026
cbce1e4
add MSSQL OTEL integration test definitions
RamanaReddy8801 Jul 29, 2026
720151e
Fix MSSQL OTel test roles for Ubuntu/RHEL, drop unsupported ubuntu24 …
RamanaReddy8801 Jul 30, 2026
a2bac5d
Fix: Add Microsoft Production repo for mssql-tools18 installation
RamanaReddy8801 Jul 30, 2026
c02fc45
Add mssql-tools18 to PATH for NRDOT MSSQL recipe
RamanaReddy8801 Jul 30, 2026
10c09a6
Add default empty value for NR_CLI_MSSQL_LOGIN_PASSWORD
RamanaReddy8801 Jul 30, 2026
b5becc6
Remove NR_CLI_MSSQL_LOGIN_PASSWORD from inputVars to unblock non-inte…
RamanaReddy8801 Jul 30, 2026
8ea12f2
read SA_PASSWORD, SERVER, PORT, LOGIN_NAME from env instead of task t…
RamanaReddy8801 Aug 4, 2026
e8aa904
chmod 600 mssql-config.yaml on debian/rhel
RamanaReddy8801 Aug 5, 2026
da722b0
guard against leaking mssql temp password files on failure
RamanaReddy8801 Aug 5, 2026
6f06610
Merge branch 'main' into mssql-otel-linux-cli
RamanaReddy8801 Aug 6, 2026
06cad6a
update tests for both os
RamanaReddy8801 Aug 6, 2026
a5dc3e8
fix SQL Server auth reliability and config permissions
RamanaReddy8801 Aug 7, 2026
563e80c
restore -b on all sqlcmd calls to catch auth failures
RamanaReddy8801 Aug 7, 2026
825e3c4
add rds-debian.yml/rds-rhel.yml for AWS RDS SQL Server monitoring
RamanaReddy8801 Aug 12, 2026
d7abb34
rename RDS recipes to nrdot-collector-mssql-rds to avoid name collisi…
RamanaReddy8801 Aug 12, 2026
75a64ff
add curl --fail flag so HTTP errors abort the RDS install download in…
RamanaReddy8801 Aug 12, 2026
ff43fa3
catch sqlcmd login failures via error-text match, not just exit code
RamanaReddy8801 Aug 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
626 changes: 626 additions & 0 deletions recipes/newrelic/infrastructure/nrdot/mssql-otel/debian.yml

Large diffs are not rendered by default.

821 changes: 821 additions & 0 deletions recipes/newrelic/infrastructure/nrdot/mssql-otel/rds-debian.yml

Large diffs are not rendered by default.

821 changes: 821 additions & 0 deletions recipes/newrelic/infrastructure/nrdot/mssql-otel/rds-rhel.yml

Large diffs are not rendered by default.

626 changes: 626 additions & 0 deletions recipes/newrelic/infrastructure/nrdot/mssql-otel/rhel.yml

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions test/definitions/nrdot/mssql-otel/mssql-rhel9-amd64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"global_tags": {
"owning_team": "database-integrations",
"Environment": "development",
"Department": "product",
"Product": "database-integrations"
},
"resources": [
{
"id": "host1",
"provider": "aws",
"type": "ec2",
"size": "t3.medium",
"ami_name": "RHEL-9.*_HVM-????????-x86_64-?-Hourly2-GP3",
"user_name": "ec2-user"
}
],
"services": [
{
"id": "mssql1",
"destinations": [
"host1"
],
"source_repository": "https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/nrdot-mssql/install/rhel/roles",
"port": 1433
}
],
"instrumentations": {
"resources": [
{
"id": "nr_nrdot_mssql_rhel9_amd64",
"resource_ids": [
"host1"
],
"source_repository": "https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
"params": {
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/nrdot/mssql-otel/rhel.yml",
"recipe_targeted": "nrdot-collector-mssql",
"validate_output": "NRDOT MSSQL \\(RHEL/CentOS\\)\\s+\\(installed\\)",
"env_var": "NEW_RELIC_CLI_SKIP_CORE=1 NR_CLI_MSSQL_CONFIG_PRESET=1 NR_CLI_MSSQL_SERVER=localhost NR_CLI_MSSQL_PORT=1433 NR_CLI_MSSQL_SA_PASSWORD=YourStrong@Passw0rd NR_CLI_MSSQL_LOGIN_NAME=newrelic"
},
"provider": "newrelic"
}
]
}
}
48 changes: 48 additions & 0 deletions test/definitions/nrdot/mssql-otel/mssql-ubuntu22-amd64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"global_tags": {
"owning_team": "database-integrations",
"Environment": "development",
"Department": "product",
"Product": "database-integrations"
},
"resources": [
{
"id": "host1",
"provider": "aws",
"type": "ec2",
"size": "t3.medium",
"ami_name": "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-????????",
"user_name": "ubuntu"
}
],
"services": [
{
"id": "mssql1",
"destinations": [
"host1"
],
"source_repository": "https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/nrdot-mssql/install/debian/roles",
"port": 1433
}
],
"instrumentations": {
"resources": [
{
"id": "nr_nrdot_mssql_ubuntu22_amd64",
"resource_ids": [
"host1"
],
"source_repository": "https://github.com/newrelic/open-install-library.git",
"deploy_script_path": "test/deploy/linux/newrelic-cli/install-recipe/roles",
"params": {
"recipe_content_url": "https://raw.githubusercontent.com/newrelic/open-install-library/main/recipes/newrelic/infrastructure/nrdot/mssql-otel/debian.yml",
"recipe_targeted": "nrdot-collector-mssql",
"validate_output": "NRDOT MSSQL \\(Debian/Ubuntu\\)\\s+\\(installed\\)",
"env_var": "NEW_RELIC_CLI_SKIP_CORE=1 NR_CLI_MSSQL_CONFIG_PRESET=1 NR_CLI_MSSQL_SERVER=localhost NR_CLI_MSSQL_PORT=1433 NR_CLI_MSSQL_SA_PASSWORD=YourStrong@Passw0rd NR_CLI_MSSQL_LOGIN_NAME=newrelic"
},
"provider": "newrelic"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
- debug:
msg: Install SQL Server for NRDOT MSSQL Testing on Debian/Ubuntu

- name: Import Microsoft GPG key
shell: |
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
become: yes

- name: Add Microsoft SQL Server 2022 repository
shell: |
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server.list
become: yes

- name: Update package list
shell: "apt-get update -y"
become: yes

- name: Install SQL Server
shell: "DEBIAN_FRONTEND=noninteractive apt-get install -y mssql-server"
become: yes
environment:
DEBIAN_FRONTEND: noninteractive

- name: Add Microsoft Production repository for mssql-tools
shell: |
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
become: yes

- name: Update package list for prod repository
shell: "apt-get update -y"
become: yes

- name: Install SQL Server command-line tools (sqlcmd)
shell: "ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get install -y mssql-tools18 unixodbc-dev"
become: yes
environment:
ACCEPT_EULA: 'Y'
DEBIAN_FRONTEND: noninteractive

- name: Add mssql-tools18 to system PATH
shell: |
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' | tee /etc/profile.d/mssql-tools.sh
chmod +x /etc/profile.d/mssql-tools.sh
become: yes

- name: Configure SQL Server with SA password
shell: |
MSSQL_SA_PASSWORD='YourStrong@Passw0rd' \
MSSQL_PID='evaluation' \
/opt/mssql/bin/mssql-conf -n setup accept-eula
become: yes
environment:
MSSQL_SA_PASSWORD: 'YourStrong@Passw0rd'
MSSQL_PID: 'evaluation'

- name: Enable SQL Server Agent
shell: "/opt/mssql/bin/mssql-conf set sqlagent.enabled true"
become: yes

- name: Restart SQL Server service
shell: "systemctl restart mssql-server"
become: yes
async: 120
poll: 0

- name: Wait for the host to become reachable again
wait_for_connection:
delay: 5
timeout: 120

- name: Wait for SQL Server to accept connections
shell: |
export PATH="/opt/mssql-tools18/bin:/opt/mssql-tools/bin:$PATH"
for i in $(seq 1 30); do
if sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -C -Q "SELECT 1" > /dev/null 2>&1; then
echo "SQL Server is accepting connections."
exit 0
fi
sleep 2
done
echo "SQL Server did not start accepting connections in time." >&2
exit 1
become: yes

- name: Verify SQL Server is running
shell: "systemctl status mssql-server --no-pager"
become: yes
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
- debug:
msg: Install SQL Server for NRDOT MSSQL Testing on RHEL/CentOS

- name: Download Microsoft SQL Server repository configuration
shell: |
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/9/mssql-server-2022.repo
become: yes

- name: Install SQL Server
shell: "yum install -y mssql-server"
become: yes

- name: Download Microsoft Production repository configuration for mssql-tools
shell: |
curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/9/prod.repo
become: yes

- name: Install SQL Server command-line tools (sqlcmd)
shell: "ACCEPT_EULA=Y yum install -y mssql-tools18 unixODBC-devel"
become: yes
environment:
ACCEPT_EULA: 'Y'

- name: Add mssql-tools18 to system PATH
shell: |
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' | tee /etc/profile.d/mssql-tools.sh
chmod +x /etc/profile.d/mssql-tools.sh
become: yes

- name: Configure SQL Server with SA password
shell: |
MSSQL_SA_PASSWORD='YourStrong@Passw0rd' \
MSSQL_PID='evaluation' \
/opt/mssql/bin/mssql-conf -n setup accept-eula
become: yes
environment:
MSSQL_SA_PASSWORD: 'YourStrong@Passw0rd'
MSSQL_PID: 'evaluation'

- name: Enable SQL Server Agent
shell: "/opt/mssql/bin/mssql-conf set sqlagent.enabled true"
become: yes

- name: Restart SQL Server service
shell: "systemctl restart mssql-server"
become: yes
async: 120
poll: 0

- name: Wait for the host to become reachable again
wait_for_connection:
delay: 5
timeout: 120

- name: Wait for SQL Server to accept connections
shell: |
export PATH="/opt/mssql-tools18/bin:/opt/mssql-tools/bin:$PATH"
for i in $(seq 1 30); do
if sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -C -Q "SELECT 1" > /dev/null 2>&1; then
echo "SQL Server is accepting connections."
exit 0
fi
sleep 2
done
echo "SQL Server did not start accepting connections in time." >&2
exit 1
become: yes

- name: Verify SQL Server is running
shell: "systemctl status mssql-server --no-pager"
become: yes
Loading