HTTP Platform Service

Topics marked with * relate to features available only in vFabric Hyperic.

Monitoring a Remote HTTP Service

Hyperic can monitor an HTTP service over the network. You configure a platform service of type "HTTP" on the operating system platform of your choice. The Hyperic Agent on that platform collects the metrics for the remote service and presents them under the newly created platform service.

Resource Plugin, Functions, and Classes

The "HTTP" service type is managed by Hyperic's netservices plugin.

  • Metric collection is performed by the plugin's HTTPCollector class.

  • Event tracking is performed by the reportEvent method in the org.hyperic.hq.product.Collector class.

Configure the HTTP Service in Hyperic

The "HTTP" service type must be manually configured.

  1. Navigate to the platform whose Agent will monitor the service.

  2. Select New Platform Service from the Tools menu.

  3. On New Service page, enter a name for the service and select "HTTP" from the Service Type pull-down.

  4. Supply all required values on the Configuration Properties page. Configuration options are defined below in HTTP Configuration Options.

HTTP Configuration Properties Page

The Configuration Properties page for the "HTTP" service type is shown below.

images/download/attachments/79038211/HttpConfigOptions.png

HTTP Configuration Options

The tables below define the options in the configuration schema for the "HTTP" service type. These are the resource attributes that are displayed, and may be edited, on the Configuration Properties page for an HTTP service, shown above.

The first table defines options specified explicitly in the HTTP configuration schema. The other tables document the options included from "building block" schemas. The far right column contains the name of the configuration schema that defines it.

Note: For the HTTP service type, the netservices plugin descriptor sets value of:

  • port to 80

  • sslport to 443

name

description

default

optional

type

Notes

Parent Schema

method

Request Method

HEAD

false

enum

Allowable values: HEAD, GET. Method for checking availability. HEAD results in less network traffic. Use GET to return the body of the request response if you wish to specify a pattern to match in the response.

http

hostheader

Host Header

none

true

Use this option to set a "Host" HTTP header in the request, useful if you use name-based virtual hosting. Specify the host name of the Vhost's host, for example, blog.hyperic.com

http

follow

Follow Redirects

enabled

true

boolean

Enable if the HTTP request that HQ generates will be re-directed. This is important, because an HTTP server returns a different code for a redirect and HQ will assume that the HTTP service check is not available if it is a redirect, unless this redirect configuration is set.

http

pattern

Response Match (substring or regex)

none

true

 

Specify a pattern or substring that HQ will attempt to match against the content in the HTTP response. This allows you to check that in addition to being available, the service is serving the content you expect.

http

proxy

Proxy Connection

none

true

If connection to the HTTP service will go through a proxy server, supply the hostname and port for the proxy server. For example, proxy.myco.com:3128

 

http

path

Path

/

false

Enter a value to monitor a specific page or file on the site. for example:

/Support.html

url

ssl

Use SSL

false

true

boolean

ssl

hostname

Hostname

localhost

false

Hostname of system that hosts the service to monitor. For example: mysite.com

sockaddr

port

Port

A default value for port is usually set for each type of network service by properties in the netservices plugin descriptor.

false

Port where service listens.

sockaddr

sotimeout

Socket Timeout (in seconds)

10

true

int

The maximum amount of time the agent will wait for a response to a request to the remote service.

sockaddr

realm

Realm

true

Supply security realm if target site is password-protected.

basicauth

user

Username

true

Supply if target site is password-protected.

credentials

pass

Password

true

secret

Supply if target site is password-protected.

credentials

HTTP Metrics

  • Availability - An HTTP service is reported to be unavailable if the Hyperic Agent cannot connect to the host configured for the service, or the HTTP response status is one of the following:

    • HTTP_BAD_REQUEST

    • HTTP_FORBIDDEN

    • HTTP_NOT_FOUND

    • HTTP_BAD_METHOD

    • HTTP_CLIENT_TIMEOUT

    • HTTP_CONFLICT

    • HTTP_PRECON_FAILED

    • HTTP_ENTITY_TOO_LARGE

    • HTTP_REQ_TOO_LONG

    • HTTP_INTERNAL_ERROR

    • HTTP_NOT_IMPLEMENTED

    • HTTP_UNAVAILABLE

    • HTTP_VERSION

    • HTTP_BAD_GATEWAY

    • HTTP_GATEWAY_TIMEOUT

    • HTTP_UNAUTHORIZED

  • Response Code - Response code from the HTTP response returned. For HTTP response code definitions, see http://en.wikipedia.org/wiki/List_of_HTTP_status_codes. Note that if the plugin could not reach the host configured for the service, no HTTP response code is reported.

  • Connection Metrics

    • All Inbound Connections - Number of inbound connections of all types to the service.

    • All Outbound Connections - Number of outbound connections of all types from the service.

    • Inbound Connections - Number of inbound TCP connections to the service.

    • Outbound Connections - Number of outbound TCP connections from the service.

  • Response Time - The time it took to determine service availability.

  • TCP connection state metrics - The number of connections in each connection state is reported:

    • CLOSE_WAIT

    • CLOSED

    • ESTABLISHED

    • FIN_WAIT_1

    • FIN_WAIT_2

    • LAST_ACK

    • LISTEN

    • SYN_RECEIVED

    • SYN_SEND

    • TIME_WAIT

For definitions of TCP connection states, see RFC 793.

Http Monitoring Defaults Page

You can enable and disable metrics, select indicator metrics, and change the collection interval for a resource type on its Monitoring Defaults page. To navigate to a resource type's Monitoring Defaults page:

  1. Click the Administration tab.

  2. Click Monitoring Defaults.

  3. Scroll to the resource type and click Edit Metric Template.

The Monitoring Defaults page for the HTTP service type is shown below:

images/download/attachments/79038211/HttpMetrics.png

Event Tracking

You can enable log tracking for a network service. If you do, the agent will log an event for responses that match the criteria you specify.

To enable log tracking, click the Enable Log Tracking box in the Monitoring section of the Configuration Properties page.

For information about Hyperic log tracking functionality and configuration options, and how to view log events, see Set Up Log Tracking for a Resource.