What version of MSSQL are you running on the your server?
Newer versions of MSSQL do not have the sys.sysperfinfo table from what I heard so that is why it is failing for you.
Monitor database query
Re: Monitor database query
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor database query
Microsoft SQL Server 2014 - 12.0.4213.0 (X64)
Jun 9 2015 12:06:16
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
check_xi_mssql_query!--username Udbread --password "u!Dutch2016." --database master --port 1433 --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200 --querywarning 50 --querycritical 200
Jun 9 2015 12:06:16
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
check_xi_mssql_query!--username Udbread --password "u!Dutch2016." --database master --port 1433 --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200 --querywarning 50 --querycritical 200
Re: Monitor database query
That table was removed after MSSQL 2008 so that query will not work for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor database query
Kindly just validate it what I understand from all this.
Nagios XI does not support to monitor database query in MSSQL 2014 version.
Thank you!
Nagios XI does not support to monitor database query in MSSQL 2014 version.
Thank you!
Re: Monitor database query
No. The table 'sys.sysperfinfo' was removed from every version after MSSQL 2008, not monitoring completely.
Former Nagios Employee
Re: Monitor database query
Most probably the plugin needs to be upgraded/patched. Unfortunately we don't have MSSQL 2014 server to test this in house. I found a post, explaining that the "sys.sysperfinfo" has been replaced with "sys.dm_os_performance_counters".
http://www.jasonstrate.com/2012/11/lost ... sperfinfo/
I am not sure if this is going to work - this is an old post, but you could try changing this:
to this:
to see if this is going to fix the issue. Hope this helps.
http://www.jasonstrate.com/2012/11/lost ... sperfinfo/
I am not sure if this is going to work - this is an old post, but you could try changing this:
Code: Select all
--query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo"Code: Select all
--query "SELECT+COUNT%28%2A%29+FROM+sys.dm_os_performance_counters"Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor database query
Hello,
I was away, thats why could not respond it timely.
I am still having error message on it.
Database query is as follows:
check_xi_mssql_query!--username abcd --password "u!1234" --database master --port 1433 --query "SELECT+COUNT%28%2A%29+FROM+sys.dm_os_performance_counters" --result "Expected result" --decode --warning 50 --critical 200 --querywarning 50 --querycritical 200
I was away, thats why could not respond it timely.
I am still having error message on it.
Database query is as follows:
check_xi_mssql_query!--username abcd --password "u!1234" --database master --port 1433 --query "SELECT+COUNT%28%2A%29+FROM+sys.dm_os_performance_counters" --result "Expected result" --decode --warning 50 --critical 200 --querywarning 50 --querycritical 200
You do not have the required permissions to view the files attached to this post.
Re: Monitor database query
If that is not working either, then it is most likely deprecated. I would speak with your MSSQL administrator to confirm the query works on that end, before attempting it on XI.
Former Nagios Employee
Re: Monitor database query
In addition to this, can you check if you have an "extra" double quote somewhere? Mismatching quotes can produce these type of errors. Example:
Code: Select all
[root@localhost tmp]# cat test.sh
#!/bin/bash
echo "test"
[root@localhost tmp]# ./test.sh
test
[root@localhost tmp]# cat test.sh
#!/bin/bash
echo "test""
[root@localhost tmp]# ./test.sh
./test.sh: line 2: unexpected EOF while looking for matching `"'
./test.sh: line 3: syntax error: unexpected end of fileBe sure to check out our Knowledgebase for helpful articles and solutions!