newrelic / nri-perfmon

Windows Perfmon / WMI On-Host Integration for New Relic Infrastructure
Other
13 stars 19 forks source link

New Relic Agent not sending perfmon Metrics #42

Open wildcardlinux opened 2 years ago

wildcardlinux commented 2 years ago

time="2022-09-07T01:12:50-04:00" level=debug msg="Converted relative executable to its absolute path." absolutePath="C:\\Program Files\\New Relic\\newrelic-infra\\custom-integrations\\nri-perfmon\\nri-perfmon.exe" instance=nri-perfmon-metrics integration=com.newrelic.perfmon prefix=integration/nri-perfmon relativePath=".\\nri-perfmon\\nri-perfmon.exe" working-dir="C:\\Program Files\\New Relic\\newrelic-infra\\custom-integrations" time="2022-09-07T01:12:50-04:00" level=debug msg="Running command." args="[C:\\Program Files\\New Relic\\newrelic-infra\\custom-integrations\\nri-perfmon\\nri-perfmon.exe -i 60000 -c config-mssql-jobs.json -n localhost]" env="[COMPUTERNAME=XXXXXXXXX ALLUSERSPROFILE=C:\\ProgramData ProgramW6432=C:\\Program Files APPDATA=C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC CommonProgramFiles=C:\\Program Files\\Common Files VERBOSE=3 SystemRoot=C:\\Windows windir=C:\\Windows ComSpec=C:\\Windows\\system32\\cmd.exe Path=C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Amazon\\cfn-bootstrap\\;C:\\Program Files\\Amazon\\AWSCLIV2\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files\\dotnet\\;C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps TMP=C:\\Windows\\TEMP PATH=C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Amazon\\cfn-bootstrap\\;C:\\Program Files\\Amazon\\AWSCLIV2\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files\\dotnet\\;C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps ProgramData=C:\\ProgramData ProgramFiles(x86)=C:\\Program Files (x86) PSModulePath=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files (x86)\\AWS Tools\\PowerShell\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\PowerShell\\Modules\\;C:\\Program Files\\Microsoft Monitoring Agent\\Agent\\PowerShell\\ ProgramFiles=C:\\Program Files CommonProgramFiles(x86)=C:\\Program Files (x86)\\Common Files CommonProgramW6432=C:\\Program Files\\Common Files LOCALAPPDATA=C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local TEMP=C:\\Windows\\TEMP SystemDrive=C:]" instance=nri-perfmon-metrics integration=com.newrelic.perfmon path="C:\\Program Files\\New Relic\\newrelic-infra\\custom-integrations\\nri-perfmon\\nri-perfmon.exe" prefix=integration/nri-perfmon working-dir="C:\\Program Files\\New Relic\\newrelic-infra\\custom-integrations" time="2022-09-07T01:12:50-04:00" level=debug msg="Integration returned no output." instance=nri-perfmon-metrics integration=com.newrelic.perfmon prefix=integration/nri-perfmon working-dir="C:\\Program Files\\New Relic\\newrelic-infra\\custom-integrations" time="2022-09-07T01:12:50-04:00" level=error msg="Integration command failed" error="exit status 1" instance=nri-perfmon-metrics integration=com.newrelic.perfmon prefix=integration/nri-perfmon std

Does exit status 1 point to a powershell environment issue?

wildcardlinux commented 2 years ago

Storage counters look to have weird behaivor.

time="2022-09-09T14:56:53Z" level=debug msg="Received sampler payload" component=StorageSampler location=raw structure=Partition supported=true time="2022-09-09T14:56:53Z" level=debug msg="Received sampler payload" component=StorageSampler location=raw structure=PartitionUsage time="2022-09-09T14:56:53Z" level=debug msg="Creating new PDH query." component=StorageSampler time="2022-09-09T14:56:53Z" level=debug msg="Creating partition queries." component=StorageSampler partition="storage.PartitionStat{Device:\"C:\", Mountpoint:\"C:\", Fstype:\"NTFS\", Opts:\"rw.compress\"}" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Disk Reads/sec (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Disk Read Bytes/sec (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Disk Writes/sec (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Disk Write Bytes/sec (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\% Disk Time (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\% Disk Read Time (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\% Disk Write Time (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Avg. Disk Queue Length (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Avg. Disk Read Queue Length (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Error getting counter value for \\LogicalDisk(C:)\\Avg. Disk Write Queue Length (error 0xc0000bc6)" time="2022-09-09T14:56:53Z" level=debug msg="Received sampler payload" component=StorageSampler location=raw structure=DiskIOCounters time="2022-09-09T14:56:53Z" level=debug msg="Received sampler payload" component=StorageSampler location=final structure=StorageSample

wildcardlinux commented 2 years ago

Potential work arounds to C:\Program Files\New Relic\newrelic-infra\custom-integrations\nri-perfmon-definition.yml file:

name: com.newrelic.perfmon
description: Perfmon On-Host Integration
protocol_version: 1
os: windows
shell: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe
commands:
  metrics:
    command:
      - .\nri-perfmon\nri-perfmon.exe
    prefix: integration/nri-perfmon
    interval: 15
name: com.newrelic.perfmon
description: Perfmon On-Host Integration
protocol_version: 1
os: windows
shell: powershell
commands:
  metrics:
    command:
      - .\nri-perfmon\nri-perfmon.exe
    prefix: integration/nri-perfmon
    interval: 15