Track Microservice Health with OpsLevel Custom Checks
Maintaining consistent software quality requires more than just surface-level insights—it demands a deep, tailored understanding of what success looks like for every service and component in your ecosystem. OpsLevel helps keep your services consistent and healthy through the use of various pre-built checks. But what if you want to write your own checks from scratch? OpsLevel’s Custom Event Checks (CECs) unlock unparalleled flexibility by allowing teams to integrate data from any source, assess it against organizational standards, and act on the results in real-time.
Why Custom Event Checks Are Essential
True Customization: CECs adapt to your specific use cases, enabling you to enforce unique standards and policies tailored to your business goals. Whether you’re measuring deployment frequency or tracking adherence to security policies, the possibilities are virtually limitless.
Unified Visibility: By aggregating and evaluating diverse metrics—security compliance, error rates, SLA adherence—across tools you already use, CECs transform fragmented data into actionable insights. This not only saves time but ensures teams can focus on improving the services that matter most.
Proactive Risk Mitigation: CECs provide a way to surface problems before they become customer-facing issues. By connecting real-time operational metrics to your service maturity model, your team can prioritize fixes and optimizations that improve uptime, security, and overall performance.
Driving a Culture of Excellence: When teams can see exactly where their services stand against custom benchmarks, they are more empowered to take ownership of improvements. CECs foster accountability, aligning every service owner with your organization’s strategic goals.
Understanding Custom Event Checks
Custom Event Checks allow teams to send arbitrary JSON payloads to OpsLevel, which are then evaluated to determine the compliance of services with predefined criteria. By leveraging tools like jq for parsing JSON and Liquid templating for crafting result messages, CECs offer a flexible framework to incorporate data from virtually any source into OpsLevel’s service maturity model.
Real-World Use Cases
Monitoring Error Rates with Sentry
A team integrates Sentry with OpsLevel to monitor unresolved issues. A CEC is configured to evaluate the number of unresolved Sentry issues for each service. If a service exceeds a predefined threshold, the check fails, alerting the service owner to address the backlog.
Validating Kubernetes Best Practices
By sending Kubernetes resource payloads to OpsLevel, a CEC can verify adherence to best practices, such as ensuring all deployments have resource limits set. This integration helps maintain optimal performance and resource utilization across the cluster.
Ensuring Security Compliance with Snyk
Integrating Snyk’s vulnerability scanner with OpsLevel allows a CEC to assess whether services have known vulnerabilities. Services failing this check can be flagged for immediate remediation, maintaining the organization’s security posture.
Tracking Deployment Frequencies
By connecting CI/CD pipelines to OpsLevel, teams can implement a CEC that monitors deployment frequencies. This ensures services are being updated regularly, aligning with continuous delivery practices.
Implementing Custom Event Checks
Create a Custom Event Integration
Navigate to the Integrations tab in OpsLevel and add a new Custom Event integration. This setup provides a unique endpoint to which JSON payloads can be sent.
Define the Check Parameters
In the Rubrics section, add a new check and select the Custom Event type. Specify the integration created earlier, and define the service identifier using a jq expression to map the payload to the correct service.
Set Success Conditions
Use a jq expression to establish the criteria that determine whether the check passes or fails. This could involve evaluating specific fields in the JSON payload.
Craft Result Messages
Utilize Liquid templating to create informative messages that provide context on the check’s outcome, guiding service owners on necessary actions.
Test and Deploy
Before finalizing, test the check with sample payloads to ensure accurate evaluations. Once validated, enable the check to integrate it into the service maturity rubric.
Learn more about Custom Event Checks in our documentation.
While other internal developer portals offer integrations and monitoring capabilities, OpsLevel’s CECs stand out due to their flexibility and extensibility. The ability to incorporate data from any JSON-emitting source, combined with powerful parsing and templating tools, allows organizations to tailor checks precisely to their unique requirements. This adaptability ensures that OpsLevel can evolve alongside an organization’s tooling and standards, providing a future-proof solution for service maturity management.
Moreover, OpsLevel’s focus on service ownership and maturity, complemented by features like rubrics and scorecards, offers a comprehensive framework that extends beyond mere monitoring. This holistic approach fosters a culture of continuous improvement and accountability, aligning engineering practices with business objectives.
OpsLevel’s Custom Event Checks are a pivotal tool for organizations aiming to maintain high standards across their services. By facilitating the integration of diverse data sources into a unified service maturity model, CECs empower teams to proactively manage service health, ensure compliance with best practices, and drive continuous improvement.
Book some time with our team to learn more about Custom Event Checks and the rest of the features within OpsLevel.