9
Monitoring Web Sites With Monitoring Web Sites With Openview Operations Openview Operations Utilizing Perl within Openview Utilizing Perl within Openview

Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

Embed Size (px)

DESCRIPTION

Getting Started With Perl OVOW And Perl (If you upgraded your perl install to 5.8.7, even better) OVOW And Perl (If you upgraded your perl install to 5.8.7, even better) You will need to add some Perl modules to your current Perl installation. You will need to add some Perl modules to your current Perl installation. The extra modules will allow you to retrieve Webpage content. The extra modules will allow you to retrieve Webpage content module/HTML/HTML-Parser-2.25.tar.gz module/HTML/HTML-Parser-2.25.tar.gz module/HTML/HTML-Parser-2.25.tar.gz module/HTML/HTML-Parser-2.25.tar.gz If you are using Perl you must use HTML Parser 2.25, if you are using you can use the latest version of HTML Parser just fine. If you are using Perl you must use HTML Parser 2.25, if you are using you can use the latest version of HTML Parser just fine.

Citation preview

Page 1: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

Monitoring Web Sites With Monitoring Web Sites With Openview OperationsOpenview Operations

Utilizing Perl within OpenviewUtilizing Perl within Openview

Page 2: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

The Reasons Behind Our In The Reasons Behind Our In House DevelopmentHouse Development

Some of our web sites were Some of our web sites were becoming unresponsive, but all becoming unresponsive, but all necessary services were running.necessary services were running.

No need to purchase another No need to purchase another product from an outside vendor.product from an outside vendor.

Simple to implement.Simple to implement. Large amount of expandability. Large amount of expandability.

Page 3: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

Getting Started With PerlGetting Started With Perl OVOW And Perl 5.6.1 (If you upgraded OVOW And Perl 5.6.1 (If you upgraded

your perl install to 5.8.7, even better)your perl install to 5.8.7, even better) You will need to add some Perl modules to You will need to add some Perl modules to

your current Perl installation.your current Perl installation. The extra modules will allow you to The extra modules will allow you to

retrieve Webpage content.retrieve Webpage content. http://search.cpan.org/dist/libwww-perl/lib/LWPhttp://search.cpan.org/dist/libwww-perl/lib/LWP.pm.pm http://search.cpan.org/~gaas/URI-1.35/URI.pmhttp://search.cpan.org/~gaas/URI-1.35/URI.pm http://www.cpan.org/modules/by-module/http://www.cpan.org/modules/by-module/

HTML/HTML-Parser-2.25.tar.gzHTML/HTML-Parser-2.25.tar.gz If you are using Perl 5.6.1 you must use If you are using Perl 5.6.1 you must use

HTML Parser 2.25, if you are using 5.8.7 HTML Parser 2.25, if you are using 5.8.7 you can use the latest version of HTML you can use the latest version of HTML Parser just fine.Parser just fine.

Page 4: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

Where To Put The ModulesWhere To Put The Modules In a standard OVOW installation…In a standard OVOW installation…

C:\Program Files\HP OpenView\C:\Program Files\HP OpenView\Installed Packages\{790C06B4-844E-Installed Packages\{790C06B4-844E-11D2-972B-080009EF8C2A}\lib\perl11D2-972B-080009EF8C2A}\lib\perl

Page 5: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

What To Look For…What To Look For… Perl Pattern MatchingPerl Pattern Matching

Make sure your WebPages contain the Make sure your WebPages contain the information you expect them to.information you expect them to. http://http://

webdevelopment.developersnetwork.com/webdevelopment.developersnetwork.com/Articles.asp?Article=143Articles.asp?Article=143

You can even get http request header You can even get http request header information and status codes.information and status codes. http://www.w3.org/Protocols/rfc2616/rfc2616-http://www.w3.org/Protocols/rfc2616/rfc2616-

sec10.htmlsec10.html http://search.cpan.org/~gaas/libwww-perl-http://search.cpan.org/~gaas/libwww-perl-

5.800/lib/LWP.pm5.800/lib/LWP.pm

Page 6: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

Sample OutputSample OutputHTTP HEADERS:HTTP HEADERS:Connection: closeConnection: closeDate: Wed, 05 Apr 2006 15:40:42 GMTDate: Wed, 05 Apr 2006 15:40:42 GMTServer: Microsoft-IIS/6.0Server: Microsoft-IIS/6.0Content-Type: text/html; charset=UTF-8Content-Type: text/html; charset=UTF-8Client-Date: Wed, 05 Apr 2006 15:40:42 GMTClient-Date: Wed, 05 Apr 2006 15:40:42 GMTClient-Peer: 140.106.224.210:80Client-Peer: 140.106.224.210:80Client-Response-Num: 1Client-Response-Num: 1Link: </common/css/ns/default.css>; /="/"; Link: </common/css/ns/default.css>; /="/";

rel="stylesheet"; type="text/css"rel="stylesheet"; type="text/css"Set-Cookie: Set-Cookie:

CFID=66578;domain=.sinclair.edu;expires=FriCFID=66578;domain=.sinclair.edu;expires=Fri, 28-Mar-2036 15:40:42 GM, 28-Mar-2036 15:40:42 GM

T;path=/T;path=/Set-Cookie: Set-Cookie:

CFTOKEN=88266879;domain=.sinclair.edu;exCFTOKEN=88266879;domain=.sinclair.edu;expires=Fri, 28-Mar-2036 15:40pires=Fri, 28-Mar-2036 15:40

:42 GMT;path=/:42 GMT;path=/Title: Sinclair Community CollegeTitle: Sinclair Community College

Response Status:Response Status: 200 OK 200 OK

Response Time:Response Time: 0.0964939594268799 0.0964939594268799Response Time:Response Time: 0.127905130386353 0.127905130386353Response Time:Response Time: 0.0744428634643555 0.0744428634643555

Pattern Matching:Pattern Matching: JRUN Error Found! JRUN Error Found!

0

0.05

0.1

0.15

0.2

Hour1

Hour2

Hour3

Hour4

Website Response Time

our.sinclaircmt.sinclairwww.sinclair

Page 7: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

Forwarding The Information Forwarding The Information On To OVOWOn To OVOW

Use OPCMSG in a standalone Perl Use OPCMSG in a standalone Perl Script.Script.

Or ConsoleMessage->Send() From Or ConsoleMessage->Send() From within an Openview Policy within an Openview Policy (Measurement Threshold or (Measurement Threshold or Scheduled Task).Scheduled Task).

Page 8: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

OVOW Scheduled Task OVOW Scheduled Task PolicyPolicy

Page 9: Monitoring Web Sites With Openview Operations Utilizing Perl within Openview

The Possibilities Are The Possibilities Are EndlessEndless

Be Creative. What we have shown Be Creative. What we have shown you today is only the framework for you today is only the framework for you to start with.you to start with.

Sample Code Handout.Sample Code Handout.