bosun-monitor / bosun

Time Series Alerting Framework
http://bosun.org
MIT License
3.4k stars 495 forks source link

Bug: Invalid X-Bosun-Server header in bosun's http queries #2464

Closed svagner closed 3 years ago

svagner commented 4 years ago

Expected behavior

"X-Bosun-Server" header in bosun's HTTP requests should contain real hostname even if we set Hostname in configuration (it was such way before https://github.com/bosun-monitor/bosun/pull/2439)

Please see also https://github.com/bosun-monitor/bosun/issues/422 for some historical details

Current behavior

Before changes with the hostname, we've used hostname in the templates, internal stats and for special "X-Bosun-Server" header. For us it was like:

We've set the hostname to bosun.domain.com to have the right links in templates. But we also used HTTP header "X-Bosun-Server" as the real hostname of bosun servers for delivery service. Now we can have the only hostname in the configuration for templates, stats and for the header. Header "X-Bosun-Server" contains "bosun.domain.com" in our case.

Steps to reproduce

  1. Set Hostname in configuration equal bosun.domain.com
  2. Add notification:
    notification default{
    post = http://127.0.0.1:8000/
    bodyTemplate = body
    next = default
    timeout = 1m
    }
  3. Check headers

Context

Build commit - https://github.com/bosun-monitor/bosun/commit/e0547ae91c6169facf7621e63c3e79da464cbde8

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.