From 9fb7e6be854a4c3e11155558f76f20c0629d926f Mon Sep 17 00:00:00 2001 From: Warren Puziewicz Date: Tue, 5 May 2026 14:46:55 -0500 Subject: [PATCH 1/5] feat: Add metrics to MS SQL Perfmon collection. --- .../sqlserver/dmaSQLServerPerfmonDataset.ps1 | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 b/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 index 1d12f90c1..17a6255b1 100644 --- a/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 +++ b/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 @@ -206,6 +206,9 @@ function CreateDMAPerfmonDataSet { \Process(_Total)\IO Write Operations/sec \Process(_Total)\IO Read Bytes/sec \Process(_Total)\IO Write Bytes/sec + \$instance:Log Bytes Flushed/sec + \Network\Bytes Received/sec + \Network\Bytes Sent/sec \Memory\Available MBytes \PhysicalDisk(_Total)\Avg. Disk Bytes/Read \PhysicalDisk(_Total)\Avg. Disk Bytes/Write @@ -235,6 +238,9 @@ function CreateDMAPerfmonDataSet { \IO Write Operations/sec \IO Read Bytes/sec \IO Write Bytes/sec + \$instance:Log Bytes Flushed/sec + \Network Bytes Received/sec + \Network Bytes Sent/sec 0 @@ -334,6 +340,9 @@ function CreateDMAPerfmonDataSet { \Process(_Total)\IO Write Operations/sec \Process(_Total)\IO Read Bytes/sec \Process(_Total)\IO Write Bytes/sec + \$instance:Log Bytes Flushed/sec + \Network\Bytes Received/sec + \Network\Bytes Sent/sec \Memory\Available MBytes \PhysicalDisk(_Total)\Avg. Disk Bytes/Read \PhysicalDisk(_Total)\Avg. Disk Bytes/Write @@ -363,6 +372,9 @@ function CreateDMAPerfmonDataSet { \IO Write Operations/sec \IO Read Bytes/sec \IO Write Bytes/sec + \SQLServer:Log Bytes Flushed/sec + \Network Bytes Received/sec + \Network Bytes Sent/sec 0 @@ -581,7 +593,7 @@ function CollectDMAPerfmonDataSet { #New file split method $perfmonCsv = $_.ToString() -split ',' $perfmonFormattedDate = checkTimestampFormat($perfmonCsv[0]) - '"' + $pkey + '"|' + $perfmonFormattedDate + '|' + $perfmonCsv[1] + '|' + $perfmonCsv[2] + '|' + $perfmonCsv[3] + '|' + $perfmonCsv[4] + '|' + $perfmonCsv[5] + '|' + $perfmonCsv[6] + '|' + $perfmonCsv[7] + '|' + $perfmonCsv[8] + '|' + $perfmonCsv[9] + '|' + $perfmonCsv[10] + '|' + $perfmonCsv[11] + '|' + $perfmonCsv[12] + '|' + $perfmonCsv[13] + '|' + $perfmonCsv[14] + '|' + $perfmonCsv[15] + '|' + $perfmonCsv[16] + '|' + $perfmonCsv[17] + '|' + $perfmonCsv[18] + '|' + $perfmonCsv[19] + '|' + $perfmonCsv[20] + '|' + $perfmonCsv[21] + '|' + $perfmonCsv[22] + '|' + $perfmonCsv[23] + '|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|' + $perfmonCsv[24] + '|' + $perfmonCsv[25] + '|' + $perfmonCsv[26] + '|' + $perfmonCsv[27] + '|' + $perfmonCsv[28] + '|' + $perfmonCsv[29] + '"' + $pkey + '"|' + $perfmonFormattedDate + '|' + $perfmonCsv[1] + '|' + $perfmonCsv[2] + '|' + $perfmonCsv[3] + '|' + $perfmonCsv[4] + '|' + $perfmonCsv[5] + '|' + $perfmonCsv[6] + '|' + $perfmonCsv[7] + '|' + $perfmonCsv[8] + '|' + $perfmonCsv[9] + '|' + $perfmonCsv[10] + '|' + $perfmonCsv[11] + '|' + $perfmonCsv[12] + '|' + $perfmonCsv[13] + '|' + $perfmonCsv[14] + '|' + $perfmonCsv[15] + '|' + $perfmonCsv[16] + '|' + $perfmonCsv[17] + '|' + $perfmonCsv[18] + '|' + $perfmonCsv[19] + '|' + $perfmonCsv[20] + '|' + $perfmonCsv[21] + '|' + $perfmonCsv[22] + '|' + $perfmonCsv[23] + '|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|' + $perfmonCsv[24] + '|' + $perfmonCsv[25] + '|' + $perfmonCsv[26] + '|' + $perfmonCsv[27] + '|' + $perfmonCsv[28] + '|' + $perfmonCsv[29] + '|' + $perfmonCsv[30] + '|' + $perfmonCsv[31] + '|' + $perfmonCsv[32] } | Out-File -FilePath $env:TEMP\$tempFileName -Encoding utf8 } WriteLog -logLocation $outputDir\$perfmonLogFile -logMessage " " -logOperation "BOTH" @@ -596,7 +608,10 @@ function CollectDMAPerfmonDataSet { } WriteLog -logLocation $outputDir\$perfmonLogFile -logMessage "Concatenating and adding header to perfmon files..." -logOperation "BOTH" - $tempContent = '"PKEY"|"COLLECTION_TIME"|"AVAILABLE_MBYTES"|"PHYSICALDISK_AVG_DISK_BYTES_READ"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE"|"PHYSICALDISK_AVG_DISK_BYTES_READ_SEC"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE_SEC"|"PHYSICALDISK_DISK_READS_SEC"|"PHYSICALDISK_DISK_WRITES_SEC"|"PROCESSOR_IDLE_TIME_PCT"|"PROCESSOR_TOTAL_TIME_PCT"|"PROCESSOR_FREQUENCY"|"PROCESSOR_QUEUE_LENGTH"|"BUFFER_CACHE_HIT_RATIO"|"CHECKPOINT_PAGES_SEC"|"FREE_LIST_STALLS_SEC"|"PAGE_LIFE_EXPECTANCY"|"PAGE_LOOKUPS_SEC"|"PAGE_READS_SEC"|"PAGE_WRITES_SEC"|"USER_CONNECTION_COUNT"|"MEMORY_GRANTS_PENDING"|"TARGET_SERVER_MEMORY_KB"|"TOTAL_SERVER_MEMORY_KB"|"BATCH_REQUESTS_SEC"|"DMA_SOURCE_ID"|"DMA_MANUAL_ID"|"NUMA_TOTAL_MEMORY_MB"|"NUMA_AVAILABLE_MEMORY_MB"|"PROCESS_IO_READ_OPERATIONS_SEC"|"PROCESS_IO_WRITE_OPERATIONS_SEC"|"PROCESS_IO_READ_BYTES_SEC"|"PROCESS_IO_WRITE_BYTES_SEC"' + $tempContent = '"PKEY"|"COLLECTION_TIME"|"AVAILABLE_MBYTES"|"PHYSICALDISK_AVG_DISK_BYTES_READ"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE"|"PHYSICALDISK_AVG_DISK_BYTES_READ_SEC"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE_SEC"|"PHYSICALDISK_DISK_READS_SEC"|"PHYSICALDISK_DISK_WRITES_SEC"|"PROCESSOR_IDLE_TIME_PCT"|"PROCESSOR_TOTAL_TIME_PCT"|"PROCESSOR_FREQUENCY"|"PROCESSOR_QUEUE_LENGTH"|"BUFFER_CACHE_HIT_RATIO"|"CHECKPOINT_PAGES_SEC"|"FREE_LIST_STALLS_SEC"|"PAGE_LIFE_EXPECTANCY"|"PAGE_LOOKUPS_SEC"|"PAGE_READS_SEC"|"PAGE_WRITES_SEC"|"USER_CONNECTION_COUNT"|"MEMORY_GRANTS_PENDING"|"TARGET_SERVER_MEMORY_KB"|"TOTAL_SERVER_MEMORY_KB"|"BATCH_REQUESTS_SEC"|"DMA_SOURCE_ID"|"DMA_MANUAL_ID"|"NUMA_TOTAL_MEMORY_MB"|"NUMA_AVAILABLE_MEMORY_MB"|"PROCESS_IO_READ_OPERATIONS_SEC"|"PROCESS_IO_WRITE_OPERATIONS_SEC"|"PROCESS_IO_READ_BYTES_SEC"|"PROCESS_IO_WRITE_BYTES_SEC"|"LOG_BYTES_FLUSHED_SEC"|"NETWORK_BYTES_RECEIVED_SEC"|"NETWORK_BYTES_SENT_SEC"' + + + if ($fileExists) { Set-Content -Path $outputDir\$outputFileName -Value $tempContent -Encoding utf8 @@ -607,13 +622,13 @@ function CollectDMAPerfmonDataSet { #$tempDate = Get-Date -Format "MM/dd/yyyy HH:mm:ss.fff" $tempDate = checkTimestampFormat((Get-Date -Format "MM/dd/yyyy HH:mm:ss.fff")) - $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"' + $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"' Add-Content -Path $outputDir\$outputFileName -Value $tempContent -Encoding utf8 $futureDate = (Get-Date).AddMinutes(1) #$tempDate = $futureDate.ToString("MM/dd/yyyy HH:mm:ss.fff") $tempDate = checkTimestampFormat(($futureDate.ToString("MM/dd/yyyy HH:mm:ss.fff"))) - $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"' + $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"' Add-Content -Path $outputDir\$outputFileName -Value $tempContent -Encoding utf8 } @@ -656,18 +671,18 @@ function CreateEmptyFile { $null = New-Item -ItemType Directory -Path $outputDir } - $tempContent = '"PKEY"|"COLLECTION_TIME"|"AVAILABLE_MBYTES"|"PHYSICALDISK_AVG_DISK_BYTES_READ"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE"|"PHYSICALDISK_AVG_DISK_BYTES_READ_SEC"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE_SEC"|"PHYSICALDISK_DISK_READS_SEC"|"PHYSICALDISK_DISK_WRITES_SEC"|"PROCESSOR_IDLE_TIME_PCT"|"PROCESSOR_TOTAL_TIME_PCT"|"PROCESSOR_FREQUENCY"|"PROCESSOR_QUEUE_LENGTH"|"BUFFER_CACHE_HIT_RATIO"|"CHECKPOINT_PAGES_SEC"|"FREE_LIST_STALLS_SEC"|"PAGE_LIFE_EXPECTANCY"|"PAGE_LOOKUPS_SEC"|"PAGE_READS_SEC"|"PAGE_WRITES_SEC"|"USER_CONNECTION_COUNT"|"MEMORY_GRANTS_PENDING"|"TARGET_SERVER_MEMORY_KB"|"TOTAL_SERVER_MEMORY_KB"|"BATCH_REQUESTS_SEC"|"DMA_SOURCE_ID"|"DMA_MANUAL_ID"|"NUMA_TOTAL_MEMORY_MB"|"NUMA_AVAILABLE_MEMORY_MB"|"PROCESS_IO_READ_OPERATIONS_SEC"|"PROCESS_IO_WRITE_OPERATIONS_SEC"|"PROCESS_IO_READ_BYTES_SEC"|"PROCESS_IO_WRITE_BYTES_SEC"' + $tempContent = '"PKEY"|"COLLECTION_TIME"|"AVAILABLE_MBYTES"|"PHYSICALDISK_AVG_DISK_BYTES_READ"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE"|"PHYSICALDISK_AVG_DISK_BYTES_READ_SEC"|"PHYSICALDISK_AVG_DISK_BYTES_WRITE_SEC"|"PHYSICALDISK_DISK_READS_SEC"|"PHYSICALDISK_DISK_WRITES_SEC"|"PROCESSOR_IDLE_TIME_PCT"|"PROCESSOR_TOTAL_TIME_PCT"|"PROCESSOR_FREQUENCY"|"PROCESSOR_QUEUE_LENGTH"|"BUFFER_CACHE_HIT_RATIO"|"CHECKPOINT_PAGES_SEC"|"FREE_LIST_STALLS_SEC"|"PAGE_LIFE_EXPECTANCY"|"PAGE_LOOKUPS_SEC"|"PAGE_READS_SEC"|"PAGE_WRITES_SEC"|"USER_CONNECTION_COUNT"|"MEMORY_GRANTS_PENDING"|"TARGET_SERVER_MEMORY_KB"|"TOTAL_SERVER_MEMORY_KB"|"BATCH_REQUESTS_SEC"|"DMA_SOURCE_ID"|"DMA_MANUAL_ID"|"NUMA_TOTAL_MEMORY_MB"|"NUMA_AVAILABLE_MEMORY_MB"|"PROCESS_IO_READ_OPERATIONS_SEC"|"PROCESS_IO_WRITE_OPERATIONS_SEC"|"PROCESS_IO_READ_BYTES_SEC"|"PROCESS_IO_WRITE_BYTES_SEC"|"LOG_BYTES_FLUSHED_SEC"|"NETWORK_BYTES_RECEIVED_SEC"|"NETWORK_BYTES_SENT_SEC"' Set-Content $env:TEMP\emptyStrings.csv -Value $tempContent -Encoding utf8 #$tempDate = Get-Date -Format "MM/dd/yyyy HH:mm:ss.fff" $tempDate = checkTimestampFormat((Get-Date -Format "MM/dd/yyyy HH:mm:ss.fff")) - $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"' + $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"' Add-Content $env:TEMP\emptyStrings.csv -Value $tempContent -Encoding utf8 $futureDate = (Get-Date).AddMinutes(1) #$tempDate = $futureDate.ToString("MM/dd/yyyy HH:mm:ss.fff") $tempDate = checkTimestampFormat(($futureDate.ToString("MM/dd/yyyy HH:mm:ss.fff"))) - $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"' + $tempContent = '"' + $pkey + '"|"' + $tempDate + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"' + $dmaSourceId + '"|"' + $dmaManualId + '"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"' Add-Content $env:TEMP\emptyStrings.csv -Value $tempContent -Encoding utf8 WriteLog -logLocation $outputDir\$perfmonLogFile -logMessage "Concatenating and adding header to perfmon files to $outputFileName ..." -logOperation "BOTH" From 0c46626749aef78f077dcdbd195e659750a81c9c Mon Sep 17 00:00:00 2001 From: Warren Puziewicz Date: Tue, 5 May 2026 14:48:00 -0500 Subject: [PATCH 2/5] feat: Add generation of manifest file for SQL Server masking. --- scripts/masker/dma-collection-masker | 29 ++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/masker/dma-collection-masker b/scripts/masker/dma-collection-masker index 83843c7e7..55a639440 100755 --- a/scripts/masker/dma-collection-masker +++ b/scripts/masker/dma-collection-masker @@ -2159,6 +2159,7 @@ def run_masker(input_dir: Path | None = None, output_path: Path | None = None) - sys.exit(1) for collection in collections: + logger.info(msg=f"Found collection {collection}") collection_metadata = _metadata_from_filename(collection) fake.date_time = collection_metadata.date_time fake.set_collection_key_from_date_time( @@ -2183,6 +2184,9 @@ def run_masker(input_dir: Path | None = None, output_path: Path | None = None) - if collection_files: identity_map = _generate_and_apply_identity_map(identity_map, rule, collection_files) + if collection_metadata.database_type == "mssql": + _generate_mssql_manifest(output_path, output_path ) + logger.info("Completed work on %s", collection.stem) _collection_key_file, _new_collection_archive = _package_collection( collection, identity_map, work_dir, output_path @@ -2221,7 +2225,7 @@ def _metadata_from_filename(collection_file: Path) -> FileMetadata: meta_values.append(collection_file.stem.split(sep="_")[1]) # database_type metadata = FileMetadata(*meta_values) except (ValueError, IndexError, TypeError) as e: - msg = f"Could not determine metadata from file {collection_file.stem}" + msg = f"Could not determine metadata from file {collection_file}" raise ApplicationError(msg) from e else: return metadata @@ -2433,6 +2437,27 @@ def _apply_identity_map_to_file(rule: DataMaskRule, collection_file: Path, ident shutil.move(t.name, collection_file) +def _generate_mssql_manifest(directory: str | Path, output_file: str = "manifest.csv") -> None: + """ + Generates a pipe-separated manifest file for MSSQL collection files. + Replicates: for x in *.csv ; do md=$(md5sum $x | cut -d ' ' -f 1); echo '"mssql"|"'${md}'"|"'${x}'"'; done + """ + path = Path(directory) + output_path = Path(output_file).joinpath('manifest.csv') + + with output_path.open("w", encoding="utf-8") as f: + # sorted() ensures the manifest order matches shell globbing behavior + for csv_file in sorted(path.glob("*.csv")): + # Calculate MD5 hash of file content + file_hash = hashlib.md5(csv_file.read_bytes()).hexdigest() + + # Format: "mssql"|"md5_hash"|"filename" + line = f'"mssql"|"{file_hash}"|"{csv_file.name}"\n' + f.write(line) + + for base_name in sorted(path.glob("opdb__ServerProps__*.csv")): + manifest_file_name=base_name.__str__.replace("opdb__ServerProps__", "opdb__manifest__") + def _rewrite_mssql_collector_log(logfile_name: Path, zipfile_name: str) -> None: """Rewrites the collector log file to include only the masked zipfile name. @@ -2486,7 +2511,7 @@ def _package_collection( with zf.ZipFile(archive_file, "w", compression=zf.ZIP_DEFLATED, compresslevel=9) as f: for matched_file in matched_files: # Exclude the Permon log fileq - if "opdb__perfMonLog_" not in str(matched_file): + if ("opdb__perfMonLog_" not in str(matched_file)) and ("Google-DMA-SQLServerDataSet" not in str(object=matched_file)): masked_file = _mask_file_collection_key(matched_file) identity_map[matched_file.name] = masked_file.name From a67351a0a7256e50688336cd0b7945e827459c9c Mon Sep 17 00:00:00 2001 From: Warren Puziewicz Date: Wed, 20 May 2026 10:20:43 -0500 Subject: [PATCH 3/5] fix: Move masker update to another branch. --- scripts/masker/dma-collection-masker | 29 ++-------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/scripts/masker/dma-collection-masker b/scripts/masker/dma-collection-masker index 55a639440..83843c7e7 100755 --- a/scripts/masker/dma-collection-masker +++ b/scripts/masker/dma-collection-masker @@ -2159,7 +2159,6 @@ def run_masker(input_dir: Path | None = None, output_path: Path | None = None) - sys.exit(1) for collection in collections: - logger.info(msg=f"Found collection {collection}") collection_metadata = _metadata_from_filename(collection) fake.date_time = collection_metadata.date_time fake.set_collection_key_from_date_time( @@ -2184,9 +2183,6 @@ def run_masker(input_dir: Path | None = None, output_path: Path | None = None) - if collection_files: identity_map = _generate_and_apply_identity_map(identity_map, rule, collection_files) - if collection_metadata.database_type == "mssql": - _generate_mssql_manifest(output_path, output_path ) - logger.info("Completed work on %s", collection.stem) _collection_key_file, _new_collection_archive = _package_collection( collection, identity_map, work_dir, output_path @@ -2225,7 +2221,7 @@ def _metadata_from_filename(collection_file: Path) -> FileMetadata: meta_values.append(collection_file.stem.split(sep="_")[1]) # database_type metadata = FileMetadata(*meta_values) except (ValueError, IndexError, TypeError) as e: - msg = f"Could not determine metadata from file {collection_file}" + msg = f"Could not determine metadata from file {collection_file.stem}" raise ApplicationError(msg) from e else: return metadata @@ -2437,27 +2433,6 @@ def _apply_identity_map_to_file(rule: DataMaskRule, collection_file: Path, ident shutil.move(t.name, collection_file) -def _generate_mssql_manifest(directory: str | Path, output_file: str = "manifest.csv") -> None: - """ - Generates a pipe-separated manifest file for MSSQL collection files. - Replicates: for x in *.csv ; do md=$(md5sum $x | cut -d ' ' -f 1); echo '"mssql"|"'${md}'"|"'${x}'"'; done - """ - path = Path(directory) - output_path = Path(output_file).joinpath('manifest.csv') - - with output_path.open("w", encoding="utf-8") as f: - # sorted() ensures the manifest order matches shell globbing behavior - for csv_file in sorted(path.glob("*.csv")): - # Calculate MD5 hash of file content - file_hash = hashlib.md5(csv_file.read_bytes()).hexdigest() - - # Format: "mssql"|"md5_hash"|"filename" - line = f'"mssql"|"{file_hash}"|"{csv_file.name}"\n' - f.write(line) - - for base_name in sorted(path.glob("opdb__ServerProps__*.csv")): - manifest_file_name=base_name.__str__.replace("opdb__ServerProps__", "opdb__manifest__") - def _rewrite_mssql_collector_log(logfile_name: Path, zipfile_name: str) -> None: """Rewrites the collector log file to include only the masked zipfile name. @@ -2511,7 +2486,7 @@ def _package_collection( with zf.ZipFile(archive_file, "w", compression=zf.ZIP_DEFLATED, compresslevel=9) as f: for matched_file in matched_files: # Exclude the Permon log fileq - if ("opdb__perfMonLog_" not in str(matched_file)) and ("Google-DMA-SQLServerDataSet" not in str(object=matched_file)): + if "opdb__perfMonLog_" not in str(matched_file): masked_file = _mask_file_collection_key(matched_file) identity_map[matched_file.name] = masked_file.name From f09e5fddf96cc21a700b4998c52bb876099f61b6 Mon Sep 17 00:00:00 2001 From: wpuziewicz <35240389+wpuziewicz@users.noreply.github.com> Date: Wed, 20 May 2026 12:51:25 -0500 Subject: [PATCH 4/5] Apply suggestion from @cofin Co-authored-by: Cody Fincher <204685+cofin@users.noreply.github.com> Signed-off-by: wpuziewicz <35240389+wpuziewicz@users.noreply.github.com> --- scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 b/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 index 17a6255b1..0cd09d289 100644 --- a/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 +++ b/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 @@ -206,9 +206,9 @@ function CreateDMAPerfmonDataSet { \Process(_Total)\IO Write Operations/sec \Process(_Total)\IO Read Bytes/sec \Process(_Total)\IO Write Bytes/sec - \$instance:Log Bytes Flushed/sec - \Network\Bytes Received/sec - \Network\Bytes Sent/sec + \$instance:Log Bytes Flushed/sec + \Network\Bytes Received/sec + \Network\Bytes Sent/sec \Memory\Available MBytes \PhysicalDisk(_Total)\Avg. Disk Bytes/Read \PhysicalDisk(_Total)\Avg. Disk Bytes/Write From 8ffad2d4b6863963799c2da89e805f0cea74d435 Mon Sep 17 00:00:00 2001 From: wpuziewicz <35240389+wpuziewicz@users.noreply.github.com> Date: Wed, 20 May 2026 12:51:44 -0500 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Cody Fincher <204685+cofin@users.noreply.github.com> Signed-off-by: wpuziewicz <35240389+wpuziewicz@users.noreply.github.com> --- .../sqlserver/dmaSQLServerPerfmonDataset.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 b/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 index 0cd09d289..d91ebff72 100644 --- a/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 +++ b/scripts/collector/sqlserver/dmaSQLServerPerfmonDataset.ps1 @@ -238,9 +238,9 @@ function CreateDMAPerfmonDataSet { \IO Write Operations/sec \IO Read Bytes/sec \IO Write Bytes/sec - \$instance:Log Bytes Flushed/sec - \Network Bytes Received/sec - \Network Bytes Sent/sec + \$instance:Log Bytes Flushed/sec + \Network Bytes Received/sec + \Network Bytes Sent/sec 0 @@ -340,9 +340,9 @@ function CreateDMAPerfmonDataSet { \Process(_Total)\IO Write Operations/sec \Process(_Total)\IO Read Bytes/sec \Process(_Total)\IO Write Bytes/sec - \$instance:Log Bytes Flushed/sec - \Network\Bytes Received/sec - \Network\Bytes Sent/sec + \$instance:Log Bytes Flushed/sec + \Network\Bytes Received/sec + \Network\Bytes Sent/sec \Memory\Available MBytes \PhysicalDisk(_Total)\Avg. Disk Bytes/Read \PhysicalDisk(_Total)\Avg. Disk Bytes/Write @@ -372,9 +372,9 @@ function CreateDMAPerfmonDataSet { \IO Write Operations/sec \IO Read Bytes/sec \IO Write Bytes/sec - \SQLServer:Log Bytes Flushed/sec - \Network Bytes Received/sec - \Network Bytes Sent/sec + \SQLServer:Log Bytes Flushed/sec + \Network Bytes Received/sec + \Network Bytes Sent/sec 0