- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Re: monitoring HTTP GET and HTTPS - 200
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2009 08:03 AM
тАО07-06-2009 08:03 AM
Re: monitoring HTTP GET and HTTPS - 200
> The following, a local site with no security restrictions, came back successfully.
So it appears that you may need to consider firewall settings. My Perl script has no problems in UNIX or Windows (as one might expect).
You might need to set your 'http_proxy' environment variable to enable the Perl script to offer its service.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 05:44 AM
тАО07-08-2009 05:44 AM
Re: monitoring HTTP GET and HTTPS - 200
Found LWP quite interesting.
Following the script modified to include the proxy setting, as adding the http_proxy environent variable had no impact on this script.
---------------
# cat ./probeurl
use strict;
use warnings;
use LWP::UserAgent;
my $wsr = LWP::UserAgent -> new;
$wsr -> timeout( 20 );
$wsr->proxy(['http', 'ftp','https'], 'http://192.168.5.39:8080/');
my $url = shift or die "URL expected\n";
my $useragent = LWP::UserAgent->new;
my $request = HTTP::Request->new( HEAD => $url );
my $response = $useragent->request($request);
print $response->status_line, "\n";
print $response->is_success, "\n";
-------------
Had some limited success but still getting the timeout errors for most websites. There was success as before for the internal websites.
The thing is that the external websites (behind proxy) are givign time outs and not authenitcation or forbidden messages.
C:\SCRIPTING>urltestv4.pl http://www.google.com
500 Can't connect to www.google.com:80 (connect: timeout)
Lookin forward to your support
Thanks and regards,
-Alvi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2009 05:51 AM
тАО07-08-2009 05:51 AM
Re: monitoring HTTP GET and HTTPS - 200
Using Options without quotes
C:\Program Files\GnuWin32\bin>wget http://www.google.com --proxy-user=oalvi --pr
oxy-passwd=xxxxxx
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
--2009-07-08 16:14:00-- http://www.google.com/
Connecting to 192.168.5.39:8080... connected.
Proxy request sent, awaiting response... 407 Proxy Authentication Required
2009-07-08 16:14:00 ERROR 407: Proxy Authentication Required.
Using Options with quotes
C:\Program Files\GnuWin32\bin>wget http://www.google.com --proxy-user="domain\oalvi
" --proxy-passwd="xxxxxx"
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
--2009-07-08 16:15:22-- http://www.google.com/
Connecting to 192.168.5.39:8080... connected.
Proxy request sent, awaiting response... 403 Forbidden
2009-07-08 16:15:22 ERROR 403: Forbidden.
Some suiccess with LWP in that the followingg was successful. Here, I have success whether proxy is set or not.
C:\SCRIPTING>urltestv4.pl ftp://www.hp.com
200 OK
1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2009 04:49 AM
тАО07-09-2009 04:49 AM
Re: monitoring HTTP GET and HTTPS - 200
> Had some limited success but still getting the timeout errors for most websites. There was success as before for the internal websites.
The default timeout is 180 (seconds). You might try increasing your value of 20 and see if you have better success.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2009 08:42 AM
тАО07-09-2009 08:42 AM
Re: monitoring HTTP GET and HTTPS - 200
Appreciate your persistence in assistance.
I ran it mostly with the 180 default timeout - it was still timing out. I put it to 20 only to reduce my troubleshooting time when I was trying out different stuff.
I've tried the proxy, by hardcoding as well as by passing from the environment - but no success.
Regards,
-Alvi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2009 12:16 AM
тАО07-20-2009 12:16 AM
Re: monitoring HTTP GET and HTTPS - 200
The proxy was needed, but I had a variable too many and wasn't using the variable I had defined with the proxy.
Below the correct code with proxy
---------
# !C:\Perl\bin
use strict;
use warnings;
use LWP::UserAgent;
my $url = shift or die "URL expected\n";
my $useragent = LWP::UserAgent->new;
$useragent->proxy(['http', 'ftp','https'], 'http://192.168.5.39:8080/');
$useragent -> timeout( 20 );
my $request = HTTP::Request->new( HEAD => $url );
my $response = $useragent->request($request);
print $response->status_line, "\n";
print $response->is_success, "\n";
print $useragent->proxy('http'),"\n";
---------
Regards,
-Alvi
- « Previous
-
- 1
- 2
- Next »