Keyword Sensor
Overview
The Keyword Sensor in Onagre allows users to monitor the presence of specific words or phrases in an HTTP response. This is particularly useful for ensuring that a webpage or API returns expected content, detecting unauthorized changes, or verifying that critical information is present in a response.
Configuration Options
When setting up a Keyword Sensor, the following parameters can be configured:
- URL: The target endpoint to check for the specified keyword.
- HTTP Method: The request method to use (GET, POST, etc.).
- Request Payload (optional): Data to send with POST or PUT requests.
- Headers (optional): Custom headers to include in the request.
- Timeout: Maximum time to wait for a response before considering the request as failed.
- Expected HTTP Status Codes: Define acceptable response codes (e.g., 200 OK).
- Authentication (optional): Supports Basic Authentication and Bearer Token authentication.
- Keyword: The specific word or phrase that must be present in the response.
- Case Sensitivity: Option to make the keyword search case-sensitive or case-insensitive.
- Check Interval: Defines how often the request should be sent (e.g., every minute, every five minutes).
Response Validation
The Keyword Sensor validates responses based on:
- Exact Keyword Match: The response must contain the specified word or phrase.
- Case Sensitivity Settings: Ensures that keyword matching follows the configured case rules.
Alerts and Notifications
If the keyword is missing from the response or if the request fails, the sensor can trigger alerts via:
- Slack, Microsoft Teams, Discord, Google Chat, Webhooks, Pushover
- Email Notifications
- Onagre’s Dashboard for Incident Tracking
Use Cases
- Verifying that a website’s homepage contains expected content.
- Monitoring API responses to ensure they include necessary information.
- Detecting unauthorized changes in webpage content.
- Ensuring system-generated messages or status indicators are present.
Deployment
The Keyword Sensor can be used with both public and private resources. For internal monitoring, Onagre’s private agent can be deployed to check endpoints that are not accessible from the internet.
Summary
The Keyword Sensor is a valuable tool for ensuring that critical content is present in HTTP responses. With flexible configuration options and integration with modern communication tools, it helps teams detect issues in real-time and maintain content integrity.