Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server Case Sensitive Input plugin issue #3329

Closed
valerian1978 opened this issue Oct 12, 2017 · 0 comments · Fixed by #3336
Closed

SQL Server Case Sensitive Input plugin issue #3329

valerian1978 opened this issue Oct 12, 2017 · 0 comments · Fixed by #3336
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@valerian1978
Copy link

Bug report

No BufferPoolRate information when running sql server input against a case sensitive instance

System info:

SQL Server Collation: Latin1_General_BIN (Case sensitive)
Telegraf Version: Telegraf v1.4.2
OS: Windows

Steps to reproduce:

  1. Add a connection to a case sensitive sql server
  2. Run telegraf

Expected behavior:

Rretrieve information on specified query below

Actual behavior:

Following query returns no rows on a case sensitive sql server:

SELECT 'Buffer pool rate (bytes/sec)', BufferPoolRate = (1.0cntr_value * 8 * 1024) /
(SELECT 1.0
cntr_value FROM sys.dm_os_performance_counters WHERE object_name like '%Buffer Manager%' AND lower(counter_name) = 'Page life expectancy')
FROM sys.dm_os_performance_counters
WHERE object_name like '%Buffer Manager%'
AND counter_name = 'database pages'

Additional info:

Problem with lower and 'database pages' syntax.
This query is contained in sql server input plugin between rows 247 and 251

Proposal:

Replace this query:

SELECT 'Buffer pool rate (bytes/sec)', BufferPoolRate = (1.0cntr_value * 8 * 1024) /
(SELECT 1.0
cntr_value FROM sys.dm_os_performance_counters WHERE object_name like '%Buffer Manager%' AND lower(counter_name) = 'Page life expectancy')
FROM sys.dm_os_performance_counters
WHERE object_name like '%Buffer Manager%'
AND counter_name = 'database pages'

By this one:

SELECT 'Buffer pool rate (bytes/sec)', BufferPoolRate = (1.0cntr_value * 8 * 1024) /
(SELECT 1.0
cntr_value FROM sys.dm_os_performance_counters WHERE object_name like '%Buffer Manager%' AND counter_name = 'Page life expectancy')
FROM sys.dm_os_performance_counters
WHERE object_name like '%Buffer Manager%'
AND counter_name = 'Database pages'

Regards,
Valérian

@danielnelson danielnelson added this to the 1.4.3 milestone Oct 12, 2017
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Oct 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants