Help Docs

Data Lake - REST API Metric monitor

The REST API Metric monitor option in Data Lake  is used to check the availability and performance of your APIs. It helps manage and analyze the metrics of your REST API, and provides a comprehensive analysis of the field values available in the API endpoint. With this monitor, you can receive instant alerts and visualize your data clearly, making it easier to track and respond to critical changes. This basic monitoring tool provides insights into every field available in the REST API, ensuring you have detailed visibility into your API's performance. 

How does it work?

  1. Specify the REST API endpoint URL and data fields:
    • Define the URL of the REST API endpoint from which you will fetch data.
    • Select the specific data fields from the API response that you want to monitor.
  2. Save the Data Lake with REST API as a data source monitor:
    • Save the monitor configurations. This action enables continuous monitoring of the specified data fields.
  3. Create a Custom Attribute monitor:
    • Set up a Custom Attribute monitor for your REST API Metric monitor.
    • Specify the data source and the parent monitor.
    • Choose a Custom Attribute Threshold profile for your monitor and save the configurations.
  4. Generate alerts and visualize data:
    • When a threshold is breached, immediate alerts are triggered to notify users.
    • The data is visually presented, often in the form of charts or graphs, allowing users to analyze trends and deviations quickly.

Use case

Consider a use case where a business is facing challenges like low productivity, delayed tasks, or inefficiencies in operations. The organization decides to implement a system for monitoring key metrics to improve performance.

The team begins by collecting data on various operational aspects, such as equipment, staff performance, and workflow processes. They establish KPIs for each month and integrate this data through an API. By using REST API metrics, they continuously monitor the collected data and set thresholds to trigger alerts whenever a metric exceeds or falls below the defined range.

Customized dashboards are created to visualize key metrics, such as machine performance, productivity rates, and employee efficiency. These dashboards help the team identify any anomalies or areas for improvement. With this data, the team can take corrective actions to optimize operations, resulting in increased productivity, cost savings, and fewer errors.

Now, with real-time dashboards displaying critical metrics, the business can consistently monitor and enhance its operational efficiency, keeping everything on track.

Benefits

  • Data visualization: Analyze and explore data through various visualization tools, such as graphs and charts displayed on interactive dashboards, to enable users to explore the data of particular fields.
  • Instant alerts: Set up custom alerts based on your requirements.
  • Real-time data updates: Compare the data based on particular intervals. Visualizations are updated in real time, providing an up-to-the-minute view of the metric's status.
  • Drill-down capabilities: Examine specific details by applying filters to drill down into the data.

Add REST API Metrics monitor

  1. Log in to the Site24x7 web client.
  2. Navigate to Metrics > Data Lake > Add Data Source. In the window that opens, click the Integrate Now button next to the REST API Metric to add the REST API Metric monitor.
    You can also add the monitor from the Admin > Add Monitor > REST API Metric.
  3. Specify the following details to configure the metrics for the REST API Metric monitor:
    • Display Name: Provide an appropriate name, which will be the name of your monitor.
    • Check Frequency: Choose the required poll frequency. The frequency can be set from five minutes to one day.
    • Monitoring Locations: Choose the global monitoring locations from the drop-down list to monitor your website from these locations. You must configure at least one primary location for monitoring. You can either choose IPv6/IPv4 locations, or set up an On-Premise Poller to serve as a monitoring station. To add or edit the location profile, refer to this Location Profile.
      Note

      REST API Metric monitor is available only for primary locations. 

  4. Specify the following details under Endpoint URLs
    • HTTP Method: Select a method for connecting the endpoint URL from the drop-down menu. You can also provide methods not listed by choosing Custom from the drop-down menu.
      Note

      POST: To submit parameters for accessing the URL. It supports sending requests in FORM, Text, XML, or JSON formats.
      HEAD: To check the availability of the URL.
      GET: To fetch the entire HTML response and check for the presence of your configured keywords.

    • Enter the URL of the REST API endpoint which needs to be monitored.
      Note

      The response received will be populated once you click the Fetch API Response button field.

  5. Click the down arrow icon (^) to specify the details under HTTP Configuration:
    • Parameter Type: Choose None or GraphQL. If you choose GraphQL, specify the following parameters:
      • GraphQL Query: Provide the GraphQL query to obtain specific fields in response from the GraphQL-based API service.
      • GraphQL Variables: Specify the values of the variables referenced in the GraphQL query in JSON format.
    • HTTP Request Headers: Sometimes, you might want to customize the default HTTP request header information. In such cases, the additional header names and header values can be added here. This will override the default headers.
    • User Agent: Set a customized user agent (metrics monitor) for sending your request and the HTTP headers. You can choose from the available user agents.
    • Authentication Method:
      Choose None or any of the authentication methods and update the credentials accordingly.
      • Basic/NTLM Credentials: Choose Basic/NTLM-based authorization if you're monitoring a resource that is secured by the Basic/NTLM-based authorization. Windows NTLM is the authentication protocol used on systems running on Windows OS.
        • Web Credentials: You can select the web credentials for URLs requiring Basic/NTLM-based authentication from the drop-down menu. 
          Note

          Learn how to add/ edit credentials.

      • Kerberos/Negotiation: If you are monitoring a resource secured by Kerberos authentication, select the Kerberos/Negotiation radio button.
        • Kerberos Authentication: Select the Kerberos credential profile from your preconfigured list or create a new Kerberos authentication profile by clicking the (+) button.
          Note
      • OAuth: Choose OAuth if you're monitoring a resource that is secured by the OAuth framework.
        • Provider name: You can select the OAuth provider name from your preconfigured list or create a new OAuth profile by clicking the (+) button. 
      • Web Token: Choose Web Token if you're monitoring a resource that uses a web token for authentication.
        • Web Token Name: You can select the Web Token Name from your preconfigured list or create a new web token by clicking the (+) button.
      • AWS Signature: Choose an appropriate Amazon account from the drop-down that is already integrated with Site24x7. This helps when signing the API request using HMAC to authenticate the API hosted on the AWS API Gateway. 
  6. Specify the following under Advanced Configuration:
    • Connection Timeout: Specify the time in seconds needed to establish a connection with the target server. If the connection is not established within the specified time, the website will be reported as down with Could not establish connection as the reason.
    • Prefer IPv6: If you want to monitor your endpoint URL over IPv6 enabled locations, enable this option to Yes when creating or editing a monitor.
      Note
      • Site24x7 lets you monitor your dual-stacked IPv4/IPv6 based infrastructure as per your need. IPv4 will be enabled as the default protocol. You'll be able to monitor your IPv6 infrastructure once you enable the toggle button to IPv6. If the connectivity over IPv6 fails, it will not fall back to IPv4 automatically. Read more about monitoring IPv4 and IPv6 enabled internet facing resources.
      • Enabling IPv6 while creating the monitor does not make it compatible with IPv4 monitoring by default. If you want to monitor a resource that is compatible with both IPv4 and IPv6, you'll have to set up two separate monitor checks for this.
    • Query Authoritative Name Server: Toggle to Yes if you want to resolve your domain name using an authoritative name server.
    • Accepted HTTP Status Codes: Provide a comma-separated list of HTTP status codes that indicate a successful response. You can specify individual status codes, as well as ranges separated with a colon. Learn more about Accepted HTTP Status Codes.
    • SSL Protocol: Specify the version number of the TLS/SSL protocol (TLSv1.3, TLSv1.2, TLSv1.1, TLSv1, or SSLv3) to validate proper SSL handshake. Select Auto mode from the drop-down menu to enable automatic detection and negotiation.
      Note

      SSL Protocol validation is applicable only for HTTPS domains. If you've specified a different SSL protocol version than the actual one, the monitor status will fail during polling.

    • HTTP Protocol: Choose the preferred version of the application-layer protocol (HTTP/1.1 or HTTP/2) to be used for negotiation.
    • Enable ALPN:
      • Set this option to No if you do not wish to send the protocols that are sent as a part of the TLS handshake.
      • Set this option to Yes to ensure that only the supported application protocols are sent as part of the TLS handshake, reducing the round-trip time. By default, it is already set to Yes
        Note

        The Enable ALPN option is not compatible with the On-Premise Poller. 

  7.  Parameter Forwarding: This feature allows you to pass data and validate it between chained requests. You can extract individual values from responses using methods such as XPath, JSONPath, or regular expressions and save them as custom parameters. Additionally, you can use regular expressions to extract values from headers. 

    These parameters can then be used to build custom query strings or POST data for the response. Based on your selection of Response Format drop-down: Text, XML, or JSON, you can build custom Regex expressions, XPath expressions, or JSON Path expressions. When you invoke the ${Parameter} in the HTTP requests of your successive steps, the output value of the invoked expression assertion will be used in these steps for various step validation use cases.
    • Response Format: Depending on the format you've chosen, values can be extracted using regular expressions, JSONPath expressions, or XPath expressions. Learn more about response format.
    • Response Header/Cookie Format: Specify the values that can be extracted from Header/Cookie using regular expressions.
  8. Check Availability: Once you provide all the mandatory details related to the configuration, you can use this option to test the configurations you have created.
  9.  Specify the following details under Metric Configuration:
    • Response Received: The response received is a set of JSON values obtained from the REST API endpoint URL provided in Step 5 above. Click Fetch API Response, and your response will be populated as the JSON responses. Choosing the JSON response will automatically fill in the fields for the metric configuration below. You can also manually update them. 
      • Fields Name: Name of the metric/field that can be modified. A metric in a JSON response refers to a measurable value or data point extracted from the JSON response.
      • JSON Path: A JSON Path is a query language that allows you to select or extract specific data from the JSON response.
      • Unit: The unit is the metric's data type. This can be a numeric or a string data type.
      • Fields Value: The value of the metric.
        Note
        • The metric configuration can contain a maximum of 50 fields.
        • A REST API Metric monitor must contain at least one numeric field.
        • Users can add a maximum of five numeric fields.
  10. Click Check and Save to validate and save the REST API Metrics, or click Save to save the REST API Metric monitor.
    Note

    Configure Custom Attributes to receive alerts for your metrics. Learn more about how to add a custom attribute.

Next Step:
  1. Once you've successfully added a REST API Metric monitor, you'll be directed to the Data Lake dashboard.
  2. Click the monitor to view the performance metrics of a REST API metric monitor.

Related articles

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!