All MSSQL instance monitoring
Re: All MSSQL instance monitoring
Please find attached the screen shot from Studio Express. Studio express is not a problem. When I run the same query in Nagios XI then its an issue
You do not have the required permissions to view the files attached to this post.
Re: All MSSQL instance monitoring
Edit this file:
Change line 104 from:
To:
Then run it again and post the entire output.
Thank you
Code: Select all
/usr/local/nagios/libexec/check_mssqlCode: Select all
if (!$query_data = @mssql_query("$query")) {Code: Select all
var_dump(mssql_query("$query"));
if (!$query_data = @mssql_query("$query")) {Thank you
Re: All MSSQL instance monitoring
Hi SSAX,
Are you sure is it at line 104? in my code its at line 326. Anyways I have updated the code which you have advised and please find the output from CLI:
Any thoughts!
Thanks
Are you sure is it at line 104? in my code its at line 326. Anyways I have updated the code which you have advised and please find the output from CLI:
Code: Select all
libexec]# ./check_mssql -H xx.xx.xx.xx --username sa --password "xxxx" --database master --port 1433 --query "SELECT+name+%2B+%27%2C+%27+AS+%5Btext%28%29%5D+FROM+sys.databases+WHERE+state+%21%3D+0+FOR+XML+PATH%28%27%27%29%3B" --result "" --decode
PHP Warning: mssql_query(): message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16) in /usr/local/nagios/libexec/check_mssql on line 326
PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 16) in /usr/local/nagios/libexec/check_mssql on line 326
PHP Warning: mssql_query(): Query failed in /usr/local/nagios/libexec/check_mssql on line 326
bool(false)
CRITICAL: Could not execute the query.Thanks
Last edited by tmcdonald on Wed Apr 06, 2016 4:50 pm, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: All MSSQL instance monitoring
Looking around at those errors, I found some references to querying the wrong DB/schema:
http://stackoverflow.com/questions/2958 ... ry-failing
Beyond that, the Unicode might be something to look into as well.
http://stackoverflow.com/questions/2958 ... ry-failing
Beyond that, the Unicode might be something to look into as well.
Former Nagios employee