#37784 - 2003-03-12 08:01 AM
Checking if a particular web-page is open on remote machine
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi,
I am running a script which monitors the status of a web-page on five different machines. If an error is reported by the web-page, I send a mail to the concerned persons. The script is working fine but what happens is that since all the five machines are continuously monitoring the status of the same page, if an error is reported by the web-page, mails from five different machines are sent to the same person.
I would like to avoid this. I can check for an active process like IExplore.exe on a remote machine by using tools like PStools etc. but how do I check if the particular web-page is open on a remote machine ?
A reply would be greatly appreciated.
Regards
Onlinegames
|
|
Top
|
|
|
|
#37786 - 2003-03-12 09:30 AM
Re: Checking if a particular web-page is open on remote machine
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi Lonkero,
01. Earlier, we used to monitor the web-page only from one machine but we faced the problem of users closing the script or the IE window. This used to happen repeatedly inspite of specific instructions to the users not to do so ( One reason for the instructions not being followed was that the users manning the machines were constantly changing.. )
We decided to have the monitoring on all the five machines so that at any given point of time, we have atleast one machine actively monitoring the site ( I agree this is the not the best approach and would appreciate if an alternative could be suggested ).
02. In addition to the mail being sent, the script does use "net send" to intimate local admins on the LAN. However, the servers which are being monitored are at a remote location and the only way we can alert the admins of that network is by mailing / SMS / paging them.
I hope I have clarified the situation properly.
Regards
Onlinegames
|
|
Top
|
|
|
|
#37788 - 2003-03-12 03:47 PM
Re: Checking if a particular web-page is open on remote machine
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi Lonkero,
Frankly speaking, I didn't fully understand the script as COM is totally Greek / Latin to me...
I did run the script as given by you ( with the required modifications like URL change, looping etc. ). The output is "Page is fine" if it is a valid URL and "Page is unavailable" otherwise even if there is no IE window open in my machine ( I understand this is the correct behaviour as per the script ).
Please correct me if I have understood the script wrongly.. It is only checking if the machine can get a valid response from the specified web-page. If yes, then, it outputs "Page is fine" and for some reason, if it cannot ( either a network problem or the server itself is down ), then it outputs "Page not unreachable".
The script is not actually checking if an IE window is open with the specified web-page or not on the machine, is it ?
Also, could you please add the portion of the scriptlet which does the same check on a remote machine also ? As I said, I am totally at sea when it comes to COM scripting.
Regards
Onlinegames
|
|
Top
|
|
|
|
#37790 - 2003-03-12 05:12 PM
Re: Checking if a particular web-page is open on remote machine
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi Lonkero,
Assume that machine no.1 already has an IE window open with the particular web-page open ( Google, for example ).
I want the script which is running on this machine to monitor if Google web-page is open on machine nos. 2,3,4 and 5. If yes, I want the script to just keep quiet even if there is an error in the Google web-page. If no other machine has this web-page open and there is an error in the web-page, I want a mail sent from this machine to the concerned persons.
This logic would be applied on all machines. This way, I avoid the same mail being sent from different machines for a problem.
"Remote" means the location where the server is physically located ( continents apart ). This web-page just monitors the status of the servers and if there is any anomaly, it reports accordingly. ( We are using Big Brother software for monitoring of the servers ). So, when there is a problem in the servers, we need to inform our counterpart at the other end so that they can work on the servers and get it up and running again.
Hope this clarifies the situation.
Regards
Onlinegames
|
|
Top
|
|
|
|
#37792 - 2003-03-13 09:28 AM
Re: Checking if a particular web-page is open on remote machine
|
onlinrgames
Fresh Scripter
Registered: 2002-07-23
Posts: 27
|
Hi Lonkero,
Ok, I guess I will have do some changes in my logic ( maybe check for the presence of the script rather than the IE page itself and take required action).
In any case, thanks for your help.
Regards
Onlinegames
|
|
Top
|
|
|
|
#37795 - 2003-03-13 07:45 PM
Re: Checking if a particular web-page is open on remote machine
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Lonkero,
That is quite similar to the code I have here.
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000354;p=
However, I think I will pull my UDF as I have confirmed that it does not work.
When site is down, IE Window will quickly timeout and give me default error message. With my UDF it retrieves cache so the page is still there, and thus no SITE DOWN message.
Is your code doing something different that allows it to bypass the cache server?
|
|
Top
|
|
|
|
#37797 - 2003-03-13 10:18 PM
Re: Checking if a particular web-page is open on remote machine
|
Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
My 2 cents...
onlinrgames,
You say, quote: ( We are using Big Brother software for monitoring of the servers ).
Found this on Big Brother site... quote: Notification
Big Brother has a sophisticated notification ruleset, not for the faint of heart (blame Rob). You can notify based on time-of-day, machine, or the test that failed. In addition we support an initial delay before paging (useful to cut down on late night false alarms), page-only-every defined amount of time, paging groups, acknowledgement, and escalation. Built in support for e-mail paging, alphanumeric paging via Qpage or Sendpage, or numeric and SMS pages via Kermit for the BB Unix/Linux server platform while the NT/Win2K server platform only supports e-mail for now. Under the Unix/Linux server platform, you can even create your own custom notification procedure.
So question would be = Why not use the built in notification capability?
Rocco
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 731 anonymous users online.
|
|
|