hi all,
need some help again...
I'm running the following and getting the undefined error. I cant seem to figure out why. running the query outputs ok from SQL.
I have the latest versions of all the wizards and all the pre-reqs.
[root@nagiosxi libexec]# /usr/local/nagios/libexec/check_mssql -H HOSTNAME -U user -P password -d DATABASE -q "select count(*) from [commonspot-site-hasbro-enus].[dbo].[FileActionQueue]" -r "0" -w 100 -c 5000
PHP Notice: Undefined variable: exit_code in /usr/local/nagios/libexec/check_mssql on line 315
OK: Query duration=0.00057 seconds.|query_duration=0.00057s;100;5000;0;
CentOS 6.3
Manual install of NagiosXI 2012R1.3
No special configs
check_mssql PHP problem
Re: check_mssql PHP problem
What do you get when you run
grep '^display_errors =' /etc/php.ini
This error is just raising a notice, which isn't an error, and the developer may be defaulting that to 0 on OK status.
grep '^display_errors =' /etc/php.ini
This error is just raising a notice, which isn't an error, and the developer may be defaulting that to 0 on OK status.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: check_mssql PHP problem
output is
display_errors = Off
display_errors = Off
Re: check_mssql PHP problem
blariv,
Also, which version of the plugin are you using?
grep "Version" check_mssql.php
-Yancy
Also, which version of the plugin are you using?
grep "Version" check_mssql.php
-Yancy
Re: check_mssql PHP problem
# Version 0.6.6, Copyright (c) 2008 Gary Danko <[email protected]>
# Version 0.6.7,0.6.8 2012 Nicholas Scott <[email protected]>
# Version 0.1.0 - 2008/08/14
# Version 0.2.0 - 2008/08/15
# Version 0.2.2 - 2008/08/18
# Version 0.5.0 - 2008/09/29
# Version 0.6.0 - 2008/10/23
# Version 0.6.3 - 2008/10/26
# Version 0.6.4 - 2008/10/31
# Version 0.6.5 - 2008/10/31
# Version 0.6.6 - 2008/10/31
# Version 0.6.7 - 2012/07/05
# Version 0.6.8 - 2012/08/30
# Version 0.6.7,0.6.8 2012 Nicholas Scott <[email protected]>
# Version 0.1.0 - 2008/08/14
# Version 0.2.0 - 2008/08/15
# Version 0.2.2 - 2008/08/18
# Version 0.5.0 - 2008/09/29
# Version 0.6.0 - 2008/10/23
# Version 0.6.3 - 2008/10/26
# Version 0.6.4 - 2008/10/31
# Version 0.6.5 - 2008/10/31
# Version 0.6.6 - 2008/10/31
# Version 0.6.7 - 2012/07/05
# Version 0.6.8 - 2012/08/30
Re: check_mssql PHP problem
I attached a potential fix, let me know if this fixes your issue.
Please note the attached file should be renamed check_mssql when you download it to your Nagios server.
Please note the attached file should be renamed check_mssql when you download it to your Nagios server.
You do not have the required permissions to view the files attached to this post.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: check_mssql PHP problem
looks like that did it, awesome job as usual, thank you!
Re: check_mssql PHP problem
Thanks for bringing that bug to my attention, I'll get this committed.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: check_mssql PHP problem
Just had to manually update this check_mssql as well. Has it not been updated in a release yet?
Fixed my problem same as OP.
Fixed my problem same as OP.
Andrew J. - Do you even grok?
Re: check_mssql PHP problem
Thanks nscott for providing this. I know this thread is so old, but I just had this fix my issue as well. It seems that even as 2015-Sep-15th, the fix in this thread has not been merged with the download for check_mssql. Just giving a heads up, so that hopefully someone can resolve it.nscott wrote:I attached a potential fix, let me know if this fixes your issue.
Please note the attached file should be renamed check_mssql when you download it to your Nagios server.