Plugin to monitor MSSQL DB Mirroring- not working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sannatar16
Posts: 8
Joined: Thu Jun 28, 2018 2:03 am

Re: Plugin to monitor MSSQL DB Mirroring- not working

Post by sannatar16 »

Thanks @mcapra, @cdienger

I already tried the steps you mentioned, I ran the query and it seems to be working fine. I also modified the script by substituting the dbname in the query, and also print the fetched row value.

When I ran query against the db, it returned one row with the values, But the same is not returning any rows when running from this script.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Plugin to monitor MSSQL DB Mirroring- not working

Post by cdienger »

When you manually run the command, are you doing that on the sql server? Is there any logging on the sql server you can enable to see why it would be failing? At this point I think it's likely making a connection but for some reason it doesn't like when the request is made from the XI machine.

Was the dumptrace you refereed to earlier a tcpdump? I'd be curious to see the request/response. You can run one with:

yum -y install tcpdump
tcpdump -s 0 -i any port 1433 -w output.pcap


Run the script a couple times when this is running and then use CTRL+C to stop it. PM me the file since it can contain sensitive info.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked