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

database-*file-auto-growths not working #26

Open
ltjessem opened this issue Dec 8, 2016 · 0 comments
Open

database-*file-auto-growths not working #26

ltjessem opened this issue Dec 8, 2016 · 0 comments

Comments

@ltjessem
Copy link

ltjessem commented Dec 8, 2016

It's reporting 0 regardless of autogrowth events happening. Here's an example using database-logfile-auto-growths, tempdb has had 11 log file growth events in the time period, the output is showing 0, but you can see the 11 count in the debugging output:

Thu Dec  8 10:48:44 2016: SQL:
 SELECT @@VERSION 
ARGS:
$VAR1 = [];


Thu Dec  8 10:48:44 2016: RESULT:
$VAR1 = [
          'Microsoft SQL Server 2014 (SP2-CU2-GDR) (KB3194718) - 12.0.5532.0 (X64) 
	Oct  5 2016 20:28:25 
	Copyright (c) Microsoft Corporation
	Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
'
        ];


Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::override_opt

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::check_messages

Thu Dec  8 10:48:44 2016: SQL:
 SELECT SYSTEM_USER 
ARGS:
$VAR1 = [];


Thu Dec  8 10:48:44 2016: RESULT:
$VAR1 = [
          'adm\\nagios'
        ];


Thu Dec  8 10:48:44 2016: SQL:
 SELECT @@SERVICENAME 
ARGS:
$VAR1 = [];


Thu Dec  8 10:48:44 2016: RESULT:
$VAR1 = [
          'MSSQLSERVER'
        ];


Thu Dec  8 10:48:44 2016: SQL:
 SELECT CAST(COALESCE(SERVERPROPERTY('IsHadrEnabled'), 0) as int) 
ARGS:
$VAR1 = [];


Thu Dec  8 10:48:44 2016: RESULT:
$VAR1 = [
          0
        ];


Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::analyze_and_check_database_subsystem

Thu Dec  8 10:48:44 2016: SQL:

        SELECT name FROM master.sys.databases
      
ARGS:
$VAR1 = [];


Thu Dec  8 10:48:44 2016: RESULT:
$VAR1 = [
          [
            'master'
          ],
          [
            'tempdb'
          ],
          [
            'model'
          ],
          [
            'msdb'
          ],
          [
            'DB_service'
          ],
          [
            'DB_service_test2'
          ]
        ];


Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::override_opt

Thu Dec  8 10:48:44 2016: SQL:

          DECLARE @path NVARCHAR(1000)
          SELECT
              @path = Substring(PATH, 1, Len(PATH) - Charindex('\', Reverse(PATH))) + '\log.trc'
          FROM
              sys.traces
          WHERE
              id = 1
          SELECT
              databasename, COUNT(*)
          FROM
              ::fn_trace_gettable(@path, 0)
          INNER JOIN
              sys.trace_events e
          ON
              eventclass = trace_event_id
          -- INNER JOIN
          --    sys.trace_categories AS cat
          -- ON
          --     e.category_id = cat.category_id
          WHERE
              e.name IN( 'Log File Auto Grow' ) AND datediff(Minute, starttime, current_timestamp) < ?
          GROUP BY
              databasename
      
ARGS:
$VAR1 = [
          '10000'
        ];


Thu Dec  8 10:48:44 2016: RESULT:
$VAR1 = [
          [
            'tempdb',
            11
          ]
        ];


Thu Dec  8 10:48:44 2016: $self->{components}->{database_subsystem} = Classes::MSSQL::Component::DatabaseSubsystem->new()
Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::check_database_subsystem

Thu Dec  8 10:48:44 2016: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::check_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::check_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::check_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::check_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::check_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Monitoring::GLPlugin::DB::SUPER::set_thresholds

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::Component::DatabaseSubsystem::Database::check_thresholds

[DATABASESUBSYSTEM]
info: checking databases

[DATABASE]
autogrowshrink: 0
full_name: tempdb
growshrinkinterval: 10000
name: tempdb

[DATABASE]
autogrowshrink: 0
full_name: msdb
growshrinkinterval: 10000
name: msdb

[DATABASE]
autogrowshrink: 0
full_name: model
growshrinkinterval: 10000
name: model

[DATABASE]
autogrowshrink: 0
full_name: master
growshrinkinterval: 10000
name: master

[DATABASE]
autogrowshrink: 0
full_name: DB_service_test2
growshrinkinterval: 10000
name: DB_service_test2

[DATABASE]
autogrowshrink: 0
full_name: DB_service
growshrinkinterval: 10000
name: DB_service

[DATABASE]
count: 11
full_name: tempdb
name: tempdb

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::reduce_messages_short

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::check_messages

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::check_messages

Thu Dec  8 10:48:44 2016: AUTOLOAD Classes::MSSQL::DBI::nagios_exit

OK - tempdb had 0 log file auto grow events in the last 10000 minutes, msdb had 0 log file auto grow events in the last 10000 minutes, model had 0 log file auto grow events in the last 10000 minutes, master had 0 log file auto grow events in the last 10000 minutes, DB_service_test2 had 0 log file auto grow events in the last 10000 minutes, DB_service had 0 log file auto grow events in the last 10000 minutes
checking databases
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files
Thu Dec  8 10:48:44 2016: try to clean up command and result files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant