Nagios NPRE: Directory File Count
Re: Nagios NPRE: Directory File Count
Attached are the screenshots for check_mssql config files.
You do not have the required permissions to view the files attached to this post.
Re: Nagios NPRE: Directory File Count
Lamin,
There is one missing piece of information that I'd like to see and thats the actual query that Nagios XI is running. It would probably be quickest to go to the CCM, select the MSSQL service and take a screenshot of the bottom part where it shows which command you've selected and all the ARGS that its placing inside of it. This sounds like its possibly an ARGX in the wrong spot.
There is one missing piece of information that I'd like to see and thats the actual query that Nagios XI is running. It would probably be quickest to go to the CCM, select the MSSQL service and take a screenshot of the bottom part where it shows which command you've selected and all the ARGS that its placing inside of it. This sounds like its possibly an ARGX in the wrong spot.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Nagios NPRE: Directory File Count
see attachment.
You do not have the required permissions to view the files attached to this post.
Re: Nagios NPRE: Directory File Count
Lamin,
That service definition strange. I don't even the -r part where it is expecting 0. Are you positive that this is the actual instructions to be used by the service?
That service definition strange. I don't even the -r part where it is expecting 0. Are you positive that this is the actual instructions to be used by the service?
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Nagios NPRE: Directory File Count
Here is the edited code, and you can validate it by yourself. All I need is the actual result from the sql query that runs.
Here is the query
define service {
host_name DTW-SQL15
service_description Changepoint HDOC
use generic-service
check_command check_mssql!-H 10.10.0.44 -U vantage -P vantage09 -q "select count(*) from (detail inner join calllog on detail.callid = calllog.callid) inner join asgnmnt on calllog.callid = asgnmnt.callid where Asgnmnt.Resolution not in ('Reassigned','Resolved','User Canceled','Duplicate','Workaround','Rejected') and CallLog.Priority != 'R'and cpwbusappsct ='changepoint'" -r "50" -d heat
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
contact_groups VantageGroup
_xiwizard windowsserver
register 1
}
Here is the query
define service {
host_name DTW-SQL15
service_description Changepoint HDOC
use generic-service
check_command check_mssql!-H 10.10.0.44 -U vantage -P vantage09 -q "select count(*) from (detail inner join calllog on detail.callid = calllog.callid) inner join asgnmnt on calllog.callid = asgnmnt.callid where Asgnmnt.Resolution not in ('Reassigned','Resolved','User Canceled','Duplicate','Workaround','Rejected') and CallLog.Priority != 'R'and cpwbusappsct ='changepoint'" -r "50" -d heat
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
contact_groups VantageGroup
_xiwizard windowsserver
register 1
}
You do not have the required permissions to view the files attached to this post.
Re: Nagios NPRE: Directory File Count
lamin,
I updated the check_mssql plugin, all you should have to do now is add the -e flag to your argument and it will print the first result of the query, give it a try. Obviously you'll have to take the .txt off the end of it.
I updated the check_mssql plugin, all you should have to do now is add the -e flag to your argument and it will print the first result of the query, give it a try. Obviously you'll have to take the .txt off the end of it.
You do not have the required permissions to view the files attached to this post.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Nagios NPRE: Directory File Count
still not getting the right value in nagios web interace. however, the command line displays correct result. I think the variable ($expected_result) is causing this issue. Also even your change that you suggest, i am still not seeing the correct result on nagios.
You do not have the required permissions to view the files attached to this post.
Re: Nagios NPRE: Directory File Count
Lamin,
Can you swap the positioning of the " and ' in your command definition? I wonder if the ! in your SQL is getting interpreted by Nagios XI. Using single quotes around the entire SQL should fix that problem.
Can you swap the positioning of the " and ' in your command definition? I wonder if the ! in your SQL is getting interpreted by Nagios XI. Using single quotes around the entire SQL should fix that problem.
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: Nagios NPRE: Directory File Count
Using single quote in the entire query display error in nagios.
You do not have the required permissions to view the files attached to this post.
Re: Nagios NPRE: Directory File Count
Did you change the in the the SQL query to doubles? Or escape the singles that were actually part of the SQL query?
Nicholas Scott
Former Nagios employee
Former Nagios employee