-
Notifications
You must be signed in to change notification settings - Fork 183
IP Geo EN
likaia edited this page Jan 24, 2026
·
2 revisions
- DB cache (
ip_geo_cache) - Local ip2region (v4/v6)
- Remote
ip-api.com(batch)
If local lookup fails or returns "unknown", remote lookup is used.
You can configure a custom endpoint via system.ipGeoApiUrl or IP_GEO_API_URL.
Note: when implementing a custom API service, follow the contract in this section strictly; otherwise the parser will not work correctly.
Request:
-
POSTJSON withContent-Type: application/json - Body is an array; each item contains:
-
query: IP string -
fields: requested fields (can be ignored) -
lang: language (zh-CN/en, can be ignored)
-
Response:
- JSON array (same order as request, or match by
query) - Each item must include the fields below:
-
status:successfor success, other values treated as failure -
message: error details (optional) -
query: IP string (used to match results) -
country: country name (global dimension) -
countryCode: country code (e.g.CN,US) -
region: region code (optional) -
regionName: state/province name -
city: city name -
isp: ISP name (optional)
-
If status != success or location fields are empty, the result is stored as "unknown".
- Parsing writes IPs into
ip_geo_pending. - A background task processes pending in batches (default 500).
- Results are stored in
ip_geo_cacheand backfilled into log tables. - Cache is trimmed when exceeding
system.ipGeoCacheLimit.
Endpoint: GET /api/status
ip_geo_parsingip_geo_pendingip_geo_progressip_geo_estimated_remaining_seconds
- Private IPs: "内网" / "本地网络".
- Unresolved: "未知".
- During parsing: may show "待解析" or "未知".
- Remote API depends on network availability.
- IPv6 also uses local first and falls back to remote only when needed.
- Improve hit rate by keeping ip2region (v4/v6) updated.
- Home
- 快速开始
- 部署方式
- SQLite -> PostgreSQL 迁移
- 配置说明
- 完整字段参考
- 日志来源配置
- 支持的日志格式
- Agent 采集
- 日志解析机制
- IP 归属地解析
- 数据库结构
- 常见问题
- Home (EN)
- Quick Start (EN)
- Deployment (EN)
- Migration (EN)
- Configuration (EN)
- Config Reference (EN)
- Log Sources (EN)
- Supported Log Formats (EN)
- Agent Collection (EN)
- Log Parsing (EN)
- IP Geo (EN)
- Database Schema (EN)
- FAQ (EN)