HTTP default checks and policies

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of HTTP Default Checks and Policies

    The Agent Client Collector in ServiceNow provides policies for HTTP health monitoring, enabling customers to verify the reliability and performance of their HTTP endpoints through specific checks and metrics. This functionality is essential for maintaining service availability and responsiveness.

    Show full answer Show less

    Key Features

    • HTTP Entry Point Events Policy: Includes checks for verifying the ability to follow redirection links and response times.
    • Check Head Redirect: Confirms that redirect links can be followed within a designated number of requests, with options for basic authentication and AWS integration.
    • Check HTTP Response: Monitors URL response times, raising alerts based on defined critical and warning thresholds.
    • HTTP Entry Point Metrics Policy: Utilizes curl to retrieve detailed metrics on HTTP endpoints, requiring a proxy agent for execution.

    Key Outcomes

    By implementing these policies, ServiceNow customers can:

    • Ensure seamless navigation through redirect links and measure the performance of HTTP endpoints.
    • Receive alerts for performance issues, allowing for prompt troubleshooting and maintenance.
    • Gather detailed metrics that aid in understanding response times and overall endpoint health.

    As a result, customers can enhance the reliability and efficiency of their services, ultimately improving user satisfaction and operational effectiveness.

    Agent Client Collector provides the following policies for HTTP health monitoring. Policies come with the checks specified in the tables below.

    Table 1. HTTP entry point events policy
    Type Check Description Usage and Usage Example Output
    Event util.check-http-follow-redirect Verifies that redirection links can be followed in a set number of requests.
    Usage check-head-redirect.rb (options):
    • -A, --auth-first-only: Use basic auth on first request only.
    • -aws-access-key-id: AWS Access Key. Either set ENV["AWS_ACCESS_KEY_ID"] or provide it as an option on agent.
    • -r -aws-region: AWS Region (defaults to us-east-1).
    • --aws-secret-access-key: AWS Secret Access Key. Either set ENV["AWS_SECRET_ACCESS_KEY"] or provide it as an option on agent.
    • -R --redirect: Follow first <N> redirects
    • -g --get-redirects: Follow first <N> redirects with GET requests.
    • -s, --s3-config-bucket: S3 config bucket to get configuration.
    • -k, --s3-config-key: S3 config key to get configuration.
    • -u, --url: URL needs to be updated in Monitoring HTTP Entrypoint/cmdb_ci_endpoint_http_list.do for the CI.
    The Aws-region, aws-secret-key, aws-access-key ,s3-config, s3-config-key parameters are useful if you do not want to configure connection information in other check parameters. If a bucket and key have access to the environment in which the Sensu check executes in, provide an AWS key and token and the checks pull the specified JSON file from S3 and merge the JSON config into the current check configuration.

    Usage example: command: check-head-redirect.rb -R 10 -u 'https://servicenow.com'

    Check Head Redirect OK
    Event util.check-http-response Verifies URL response time and raises a CRITICAL/WARNING event if elapsed time exceeds provided CRITICAL/WARNING thresholds. Otherwise, it raises an OK event.

    Usage: check-head-redirect.rb (options)

    • -R, --redirect: Follow first <N> redirects.
    • -w --timeout_warning: Set the timeout threshold for warning in milliseconds.
    • -c --timeout_critical: Set the timeout threshold for critical in milliseconds.
    • -u, --url URL needs to be updated in Monitoring HTTP Entrypoint/cmdb_ci_endpoint_http_list.do for the CI.

    Usage example: command: check-head-redirect.rb -R 10 -u 'https://servicenow.com' -w 3000 -c 5000

    Check Head Redirect OK
    Table 2. HTTP entry point metrics policy
    Type Check Description Usage and Usage Example Output
    Metric util.metrics-http-curl Retrieves metrics on HTTP endpoints using curl.

    This check requires a proxy agent.

    Usage:
    • -a, --curl_args "CURL ARGS": Additional arguments to pass to curl.
    • s, --scheme SCHEME: Metric naming scheme, text to append to metric (Default: hostname).
    • -u, --url: URL needs to be updated in Monitoring HTTP Entrypoint/cmdb_ci_endpoint_http_list.do for the CI.

    Usage example: metrics-curl.rb -u myURL.com -a -Lk

    Check run successfully. Output:

    ws10.curl_timings.time_total 0.219622 1642749209

    ws10.curl_timings.time_namelookup 0.145494 1642749209

    ws10.curl_timings.time_connect 0.151103 1642749209

    ws10.curl_timings.time_pretransfer 0.168569 1642749209

    ws10.curl_timings.time_redirect 0.095899 1642749209

    ws10.curl_timings.time_starttransfer 0.219351 1642749209

    ws10.curl_timings.http_code 200 1642749209