Uptime Monitoring Made Easy: SSL and URL Checks with OpenTelemetry
Whether you're running an e-commerce platform, a SaaS product, or an informational website, ensuring your services remain operational is critical. This is where uptime monitoring comes into play, and when paired with SSL checks, it becomes a comprehensive approach to maintaining a secure and reliable web presence.
What is Uptime Monitoring?
Uptime monitoring involves tracking the availability and performance of your services, such as websites or APIs, to ensure they are operational for users. By regularly checking the status and response time of endpoints, it helps identify outages or performance degradation before users are affected. The key components of uptime monitoring include:
- Service Availability: Verifying if the service is up and running.
- Response Time: Measuring how quickly the service responds.
- Downtime Tracking: Monitoring periods when the service is unavailable.
Why is Uptime Monitoring Important?
Downtime can have severe consequences for businesses:
- Revenue Loss: Even a few minutes of downtime can lead to lost sales.
- User Frustration: Poor reliability erodes user trust and drives them to competitors.
- Reputation Damage: Downtime can tarnish your brand's image.
- SLA Compliance: Failure to meet uptime commitments in Service Level Agreements (SLAs) can lead to penalties.
Proactive monitoring minimizes these risks by providing early alerts and actionable insights to address issues promptly.
Using OpenTelemetry Collector for Uptime Monitoring
The OpenTelemetry Collector is a versatile tool for collecting and processing observability data. The httpcheckreceiver
in the Collector’s contrib repository simplifies uptime monitoring by performing HTTP checks for specified endpoints.
Setting Up the HTTP Check Receiver
- Install the OpenTelemetry Collector Contrib: Download and install the Collector
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.116.1/otelcol-contrib_0.116.1_linux_amd64.deb.
- Configure the HTTP Check Receiver: Create a configuration file (
/etc/otelcol-contrib/config.yaml
) with the following example:
receivers:
httpcheck:
targets:
- endpoint: https://netflix.com
method: GET
- endpoint: https://expired.badssl.com
method: GET
- endpoint: https://self-signed.badssl.com
method: GET
- endpoint: https://untrusted-root.badssl.com
method: GET
collection_interval: 30s
exporters:
otlphttp/openobserve:
endpoint: OPENOBSERVE_ENDPOINT
headers:
Authorization: OPENOBSERVE_TOKEN
stream-name: OPENOBSERVE_STREAM
service:
pipelines:
metrics:
receivers: [httpcheck]
exporters: [otlphttp/openobserve]
Make sure to replace OPENOBSERVE_ENDPOINT, OPENOBSERVE_TOKEN and OPENOBSERVE_STREAM with your platform's details that are found within OpenObserve data sources section and adjust collection_interval: 30s
as needed.
- Restart the Collector:
systemctl restart otelcol-contrib
This configuration will check the availability of all the added URLs and send metrics to OpenObserve.
- Verify the Metrics
Make sure the streams are created and you are able to see them in the dashboard.
Building Dashboards in OpenObserve
With data ingested from the OpenTelemetry Collector and the Go program, you can create insightful dashboards in OpenObserve:
- Status Overview: Display the uptime and SSL status of all monitored endpoints.
- Response Time Trends: Graph average and peak response times over time.
- SSL Alerts: Highlight certificates nearing expiry.
Additionally, you can download our pre built dashboards from here.
Example Panels:
- Table listing top 10 status codes.
- Bar chart for downtime occurrences.
- Table listing SSL expiry details.
- Status indicator such as 🔴🟢.
Conclusion
Combining uptime monitoring with SSL checks ensures your services are not only available but also secure. By leveraging the OpenTelemetry Collector, you can create a robust monitoring system that integrates seamlessly with OpenObserve. Start implementing these tools today to proactively address issues and maintain a reliable web presence.
Get started with our cloud version to monitor your applications and their SSL validity checks.