Anonymous_User Absent Member.
Absent Member.
1405 views

DNS Monitoring Script


Greetings All,
I've been tasked with coming up with a way to monitor our Web
Applications that have a fail over capability between two or more
networks. The fail over is done by simply changing the IP on the FQDN
which points it to it's sister servers on another network. I am looking
for a script that I could run to check what IP the FQDN is using and
record that as data in the data table so I can build an SSRS dashboard
for it. The DNS Connectivity script would be perfect but it does
collect the IP address of the monitored domain name. Is there another
possible way I could accomplish this?

Very Respectfully,
Chris


--
abel5405
------------------------------------------------------------------------
abel5405's Profile: https://forums.netiq.com/member.php?userid=5035
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
6 Replies
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: DNS Monitoring Script


abel5405;264128 Wrote:
> Greetings All,
> I've been tasked with coming up with a way to monitor our Web
> Applications that have a fail over capability between two or more
> networks. The fail over is done by simply changing the IP on the FQDN
> which points it to it's sister servers on another network. I am looking
> for a script that I could run to check what IP the FQDN is using and
> record that as data in the data table so I can build an SSRS dashboard
> for it. The DNS Connectivity script would be perfect but it does
> collect the IP address of the monitored domain name. Is there another
> possible way I could accomplish this?
>
> Very Respectfully,
> Chris


Hi Chris,

You can use the RunDOS KS to do the nslookup for the given FQDN. You can
use the following command:
nslookup -type=soa "domain name" "server name" > "file path to save
output" 2>&1"

This should return you the multiple IP's associated with FQDN. Do let me
know if this helps.

Regards,
Anmol Rastogi


--
rastogia1
------------------------------------------------------------------------
rastogia1's Profile: https://forums.netiq.com/member.php?userid=10304
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DNS Monitoring Script


Hey Anmol,
Many thanks for the help! The output of the nslookup commands is pasted
in below. I ran the following command, "nslookup -type=soa blue.com
WebSite > test-results.txt 2>&1". Not sure if I am doing something
wrong. The site I am trying to monitor is https://WebSite.Blue.Com.
Your help is very much appreciated.

_____________________

*** Request to UnKnown timed-out
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.255.255 (A record Address Of Web Application)

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.


--
abel5405
------------------------------------------------------------------------
abel5405's Profile: https://forums.netiq.com/member.php?userid=5035
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: DNS Monitoring Script


abel5405;264162 Wrote:
> Hey Anmol,
> Many thanks for the help! The output of the nslookup commands is pasted
> in below. I ran the following command, "nslookup -type=soa blue.com
> WebSite > test-results.txt 2>&1". Not sure if I am doing something
> wrong. The site I am trying to monitor is https://WebSite.Blue.Com.
> Your help is very much appreciated.
>
> _____________________
>
> *** Request to UnKnown timed-out
> DNS request timed out.
> timeout was 2 seconds.
> Server: UnKnown
> Address: 192.168.255.255 (A record Address Of Web Application)
>
> DNS request timed out.
> timeout was 2 seconds.
> DNS request timed out.
> timeout was 2 seconds.


Chris,
Do the following to understand more on this:
1. Open command line and type nslookup. Hit enter.
2. After that type set d2 and hit enter
3. After that type "WebSite" and hit enter.
4. Verify at the end if all the records are showing the correct IP's.
5. Send me the output.

Also, it will be good if you can just describe your problem in more
details.

Thanks,
Anmol Rastogi


--
rastogia1
------------------------------------------------------------------------
rastogia1's Profile: https://forums.netiq.com/member.php?userid=10304
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DNS Monitoring Script


Hey Anmol,
Many apologize for not replying sooner, I was out of pocket for a bit so
to speak. I have gotten it to work. I have a script do a NSLookup then
I scrape it with a modified ASCII log script. I really apologize for
not responding sooner this and many thanks again for your help.


--
abel5405
------------------------------------------------------------------------
abel5405's Profile: https://forums.netiq.com/member.php?userid=5035
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: DNS Monitoring Script


abel5405;265114 Wrote:
> Hey Anmol,
> Many apologize for not replying sooner, I was out of pocket for a bit so
> to speak. I have gotten it to work. I have a script do a NSLookup then
> I scrape it with a modified ASCII log script. I really apologize for
> not responding sooner this and many thanks again for your help.


Hello Abel,
Glad that you got your stuff working. Share the script with us in case
if you want.


--
rastogia1
------------------------------------------------------------------------
rastogia1's Profile: https://forums.netiq.com/member.php?userid=10304
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DNS Monitoring Script


Hey Anmol,
Basically I have a RUNDos script execute the NSLOOKUP to a text file
then have a modified ASCII log script to scrape the text. Bellow is
what TS sent me on modifying the General_ASCIILog script. The event
details are gathered in the data stream and then I run a SQL query to
get the data out of the QDB, or run a report.

___________

If you want to remove these "extra" lines from both the event and the
DetailData, then do this:
In the KS, there are several calls to the GetConfigFooter routine, on
lines 1437, 1622, 1654, and 1685. [Line numbers are based on the KS
shipped in WinOS 8.0.80.0.] Commenting out these four calls will remove
most of the unwanted rows from the output. If you also want to get rid
of the "Total" row, comment out the AddFooterRow calls that occur
immediately before the GetConfigFooter calls. Please keep in mind that
in order to do this you will need to check out the KS, make the above
mentioned modifications and then check it back in. Anytime you make
update the WinOS module or install a hotfix your changes may be
overwritten and you would need to reappy them, I would suggest giving
it a new name like Custom_AsciiLog or something like that to keep you
changes safe.


--
abel5405
------------------------------------------------------------------------
abel5405's Profile: https://forums.netiq.com/member.php?userid=5035
View this thread: https://forums.netiq.com/showthread.php?t=55126

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.