| 668 | } |
| 669 | |
| 670 | func (r *Ruler) ServeHTTP(w http.ResponseWriter, req *http.Request) { |
| 671 | if r.cfg.EnableSharding { |
| 672 | r.ring.ServeHTTP(w, req) |
| 673 | } else { |
| 674 | var unshardedPage = ` |
| 675 | <!DOCTYPE html> |
| 676 | <html> |
| 677 | <head> |
| 678 | <meta charset="UTF-8"> |
| 679 | <title>Cortex Ruler Status</title> |
| 680 | </head> |
| 681 | <body> |
| 682 | <h1>Cortex Ruler Status</h1> |
| 683 | <p>Ruler running with shards disabled</p> |
| 684 | </body> |
| 685 | </html>` |
| 686 | util.WriteHTMLResponse(w, unshardedPage) |
| 687 | } |
| 688 | } |
| 689 | |
| 690 | func (r *Ruler) run(ctx context.Context) error { |
| 691 | level.Info(r.logger).Log("msg", "ruler up and running") |