What Discovery Shows
Discovery lists hostnames that are not registered in ApiRuler yet. It is meant for onboarding: a company points an existing API domain at ApiRuler, the domain appears on the page, and one form turns it into a Service and a host-based Route.
Two sources feed the list. Traffic: requests that reached the gateway but matched no Route (the gateway answered 404), grouped by host from the request log. Certificate: SNI hostnames that exist in Certificates but that no Route serves.
Its DNS must point at ApiRuler and the edge proxy must forward unknown hosts to the gateway. A single request such as curl http://api.example.com/ is enough; the page refreshes from the log on demand.
Read the List
- Choose the period (last 24 hours, 7 days or 30 days). Requests and Last seen are computed for that period.
- Review Host, Seen in (Traffic, Certificate or both), Requests without a route and Last seen.
- Expand a row to see the most requested paths of that host and to open its raw log lines in Grafana.
- Turn on Show IP addresses to include requests whose Host header was a bare IP; these are hidden by default because they are usually scanners.
- Use Ignore host on noise you do not plan to register; Show ignored brings it back. Ignoring is stored only in the current browser.
A host that received traffic in the period but now has a matching Route is not listed; the page shows how many were hidden for this reason.
Register a Domain
- Select Register on the host row. The dialog pre-fills the host and suggests a Service and Route name from it.
- Enter the Upstream URL: the origin server that should receive the traffic, for example https://origin.example.com:8443/api.
- Check the DNS hint. The dialog resolves the domain and lists its current A, AAAA and CNAME records; if one of them is still the origin server, click it to use it as the upstream.
- Optionally restrict the Route with Paths, choose HTTPS only, or change Preserve Host and Strip Path.
- Select Register. ApiRuler creates the Service first and then the host Route. Both carry the tag discovery.
- Select Open Service to add authentication, rate limiting or other Plugins.
The Service is kept. Fix the Route fields and select Retry Route; only the Route is created on the retry, so nothing is duplicated.
Field Defaults
| Alan | Varsayılan | Why |
|---|---|---|
| Service and Route name | Derived from the host, for example api-example-com | Unique, readable and easy to find later. |
| Hostlar | The discovered host | More hosts or a wildcard such as *.example.com can be added, comma separated. |
| Yollar | Boş | The Route serves every path of the host; add paths to restrict it. |
| Protokoller | HTTP ve HTTPS | Choose HTTPS only when plain HTTP must be rejected. |
| Ana Bilgisayarı Koru | Açık | The origin served this domain before and usually expects its own Host header. |
| Yolu Kaldır | Off (shown when Paths are set) | The upstream receives the same path the client requested. |
Discovery Troubleshooting
| Sorun | Olası neden | Yapılması gereken |
|---|---|---|
| The page says traffic discovery is off. | No Grafana API token (or direct Loki URL) is configured for the Manager. | Set NEXT_PUBLIC_GRAFANA_API_TOKEN; the request log is read from Loki through Grafana. Certificate hostnames are listed regardless. |
| A domain that is pointed at ApiRuler does not appear. | The edge proxy only forwards known hosts, or no request has been made yet. | Allow unknown hosts to reach the gateway and send one request to the domain, then Refresh. |
| Gateway traffic could not be loaded. | Loki rejected the query (period too long for retention, series limit) or Grafana is unreachable. | Choose a shorter period and check the Grafana URL and token. |
| Many random hostnames or IP addresses are listed. | Internet scanners send requests with arbitrary Host headers. | Keep Show IP addresses off and use Ignore host for the rest. |
| Register fails with a name conflict. | A Service or Route with the suggested name already exists. | Change the name in the dialog and retry. |