Wizard MSSQL Database (monitoring LogFileUsage)
Wizard MSSQL Database (monitoring LogFileUsage)
When using the wizard for "MSSQL Database" I am presented with the option to monitor LogFileUsage.
The result is always unsuccessful. The reason for this i think is the fact that the information is gathered from sysperfinfo.
The sysperfinfo table is only available in the master database, so using this on an individual database (other than master) results in failure.
I hope i am wrong and someone can tell me what i am doing wrong, because we would like to see this info for individual databases.
If i am right, can someone recommend an other method to do this?
If I am in the wrong place for this question please let me know where i should go.
Hoping for a response (and a solution),
Regards,
detronict
Rik Lijkendijk
The result is always unsuccessful. The reason for this i think is the fact that the information is gathered from sysperfinfo.
The sysperfinfo table is only available in the master database, so using this on an individual database (other than master) results in failure.
I hope i am wrong and someone can tell me what i am doing wrong, because we would like to see this info for individual databases.
If i am right, can someone recommend an other method to do this?
If I am in the wrong place for this question please let me know where i should go.
Hoping for a response (and a solution),
Regards,
detronict
Rik Lijkendijk
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Wizard MSSQL Database (monitoring LogFileUsage)
This is correct, however the sysperfinfo table in master contains the logfiles sized of the databases you are looking at
Re: Wizard MSSQL Database (monitoring LogFileUsage)
That sounds logical.
However......
I try monitoring log wait using the wizard for MSSQL Database. This time I choose LoWait and see here what happens:
COMMAND: /usr/local/nagios/libexec/check_mssql_database.py -H 172.16.1.51 -U 'xxxxx' -P 'XXXXXX' -T 'msdb' -I ni01 --logwait --warning 100 --critical 300
OUTPUT: SQL Server message 208, severity 16, state 1, line 1:
Invalid object name 'sysperfinfo'.
DB-Lib error message 208, severity 16:
General SQL Server error: Check messages from the SQL Server
Is the check_mssql_database.py no working, or am i doing something wrong.
It is kind of frustrating. Am i the only one with this problem? Is anyone using this function?
Please enlighten me!!!
Regards,
detronict
Rik Lijkendijk
However......
I try monitoring log wait using the wizard for MSSQL Database. This time I choose LoWait and see here what happens:
COMMAND: /usr/local/nagios/libexec/check_mssql_database.py -H 172.16.1.51 -U 'xxxxx' -P 'XXXXXX' -T 'msdb' -I ni01 --logwait --warning 100 --critical 300
OUTPUT: SQL Server message 208, severity 16, state 1, line 1:
Invalid object name 'sysperfinfo'.
DB-Lib error message 208, severity 16:
General SQL Server error: Check messages from the SQL Server
Is the check_mssql_database.py no working, or am i doing something wrong.
It is kind of frustrating. Am i the only one with this problem? Is anyone using this function?
Please enlighten me!!!
Regards,
detronict
Rik Lijkendijk
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Wizard MSSQL Database (monitoring LogFileUsage)
Can you run this manually, filling out the blanked out portions, from your XI server's command line:
What is the output? It is likely to be the same, but it's good to double check. What version of mssql on what version of windows are you running this against?
Also, I'm moving this to the XI general support section as it does not pertain to plugin development directly.
Code: Select all
/usr/local/nagios/libexec/check_mssql_database.py -H 172.16.1.51 -U 'xxxxx' -P 'XXXXXX' -T 'msdb' -I ni01 --logwait --warning 100 --critical 300Also, I'm moving this to the XI general support section as it does not pertain to plugin development directly.
Re: Wizard MSSQL Database (monitoring LogFileUsage)
The result is the same from commandline.
Both server OS and MSSQL versions are 2008R2
Both server OS and MSSQL versions are 2008R2
Re: Wizard MSSQL Database (monitoring LogFileUsage)
Can you try running the check and then post the last 20 or so lines from the log file? Be sure to censor any sensitive information.
Former Nagios employee
Re: Wizard MSSQL Database (monitoring LogFileUsage)
Which log do you mean?
Re: Wizard MSSQL Database (monitoring LogFileUsage)
The MSSQL log file: http://technet.microsoft.com/en-us/libr ... 05%29.aspx
Former Nagios employee
Re: Wizard MSSQL Database (monitoring LogFileUsage)
Not much success there!!
The error is not written to the errorlog.
What i did :
- recycled errorlog so that i started with a clean errorlog.
- To be sure that the errorlog was accessable i did three executions of the command:
- first with wrong password
- second with right password
- third with wrong password again.
This resulted in the errorlog writing only the first and the last attempt!!
The error is not written to the errorlog.
What i did :
- recycled errorlog so that i started with a clean errorlog.
- To be sure that the errorlog was accessable i did three executions of the command:
- first with wrong password
- second with right password
- third with wrong password again.
[root@arlnij-rhn01 ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 172.16.1.51 -U 'XXXXX' -P 'XXXXX' -T 'databaseX' -I ni01 --logwait --warning 100 --critical 300
SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'nagios'.
DB-Lib error message 18456, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed
[root@arlnij-rhn01 ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 172.16.1.51 -U 'XXXXX' -P 'XXXXX' -T 'databaseX' -I ni01 --logwait --warning 100 --critical 300
SQL Server message 208, severity 16, state 1, line 1:
Invalid object name 'sysperfinfo'.
DB-Lib error message 208, severity 16:
General SQL Server error: Check messages from the SQL Server
[root@arlnij-rhn01 ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 172.16.1.51 -U 'XXXXX' -P 'XXXXX' -T 'databaseX' -I ni01 --logwait --warning 100 --critical 300
SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'nagios'.
DB-Lib error message 18456, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed
This resulted in the errorlog writing only the first and the last attempt!!
Apperently MSSQL does'nt know what to fo with the error!!2014-04-08 09:44:29.00 spid56 Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
2014-04-08 09:44:29.00 spid56 (c) Microsoft Corporation.
2014-04-08 09:44:29.00 spid56 All rights reserved.
2014-04-08 09:44:29.00 spid56 Server process ID is 1336.
2014-04-08 09:44:29.00 spid56 System Manufacturer: 'VMware, Inc.', System Model: 'VMware Virtual Platform'.
2014-04-08 09:44:29.01 spid56 Authentication mode is MIXED.
2014-04-08 09:44:29.01 spid56 Logging SQL Server messages in file 'K:\MSSQL10_50.NI01\MSSQL\Log\ERRORLOG'.
2014-04-08 09:44:29.01 spid56 The error log has been reinitialized. See the previous log for older entries.
2014-04-08 09:50:51.51 Logon Error: 18456, Severity: 14, State: 8.
2014-04-08 09:50:51.51 Logon Login failed for user 'nagios'. Reason: Password did not match that for the login provided. [CLIENT: 172.16.118.75]
2014-04-08 09:51:36.39 Logon Error: 18456, Severity: 14, State: 8.
2014-04-08 09:51:36.39 Logon Login failed for user 'nagios'. Reason: Password did not match that for the login provided. [CLIENT: 172.16.118.75]
Re: Wizard MSSQL Database (monitoring LogFileUsage)
Couple of thoughts:
1) Your db user needs to have rights to the master table.
2) You may need to remove the table "-T" from the command as tables other than "master" will not include "sysperfinfo".
1) Your db user needs to have rights to the master table.
2) You may need to remove the table "-T" from the command as tables other than "master" will not include "sysperfinfo".
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.