Enhanced API Monitoring with Expected HTTP Header Verification

May 17, 2023

Verify your application's availability and configuration correctness more precisely with HTTP response header checks.

Mike Robbins

We're excited to announce a powerful new feature in Heii On-Call: the ability to specify an "Expected Header Name" and an "Expected Header Value Contains" string on our outbound probes. This advanced monitoring capability lets you ensure not only the availability but also the correct configuration of your applications' HTTP endpoints.

Enter Expected Header Name and Expected Header Value Contains

Deeper Insight with Expected Header Name

With the introduction of the "Expected Header Name" feature, you can now instruct our outbound probes to expect a specific header in the HTTP response from your monitored endpoints. If the specified header isn't found, the probe will be considered unsuccessful. This allows you to ensure that specific HTTP headers, often used for carrying metadata, are correctly configured and returned from your website or API endpoints.

Precision Monitoring with Expected Header Value Contains

For an even more granular check, you can specify a "Expected Header Value Contains" value. If you specify this optional parameter, the probe will expect the HTTP response header's value to contain the given substring. If the substring is not found, the probe will be marked as unsuccessful. This ensures that not only the correct headers are present, but they also carry the expected values.

Real-World Application: Detecting Production Misconfigurations

These new features can be especially useful for confirming that your intended controller code is running when monitoring a website or health check endpoint. By expecting a specific header and its value, you can effectively check for potential misconfigurations at various levels of your production deployment stack, including the load balancer, web server, routing, and more.

Imagine you have a health check endpoint /healthcheck which returns a header in the form of X-Controller: HealthCheckController/{ENVIRONMENT}/{COMMIT_ID}. You can set the "Expected Header Name" to X-Controller and the "Expected Header Value Contains" to HealthCheckController/production. Our probe will then verify these conditions, providing a deeper layer of assurance for the correct configuration and operation of your services.

Get Started Today for Free

In combination with our recently announced Expected HTTP Status Code feature, we believe that these new checks take just a minute to configure, and provide you with even more assurance in monitoring your application's health so you can sleep well at night!

If you have any questions or feedback, don't hesitate to reach out to our support team. We're here to help you ensure your services are being monitored smoothly and correctly. Happy monitoring!