跳转到主要内容

report-geoip.conf

systemd

report-geoip.conf

5

report-geoip.conf

report-geoip.conf.d

GeoIP report metrics configuration file

/etc/systemd/report-geoip.conf, /run/systemd/report-geoip.conf, /usr/local/lib/systemd/report-geoip.conf, /usr/lib/systemd/report-geoip.conf, /etc/systemd/report-geoip.conf.d/*.conf, /run/systemd/report-geoip.conf.d/*.conf, /usr/local/lib/systemd/report-geoip.conf.d/*.conf, /usr/lib/systemd/report-geoip.conf.d/*.conf

Description

This file configures the behavior of systemd-report-geoip@.service(8), a metrics source for systemd-report(1) reporting the approximate geographic location of the system.

Options

All options are configured in the [GeoIP] section:

Endpoint=
The HTTP or HTTPS URL of the geolocation web service to query. The service must answer a GET request with a JSON object in the format of the reallyfreegeoip.org service, describing the location of the address the request originates from. The field names used by ipinfo.io (i.e. country, region, continent in place of country_name, region_name, continent_name) are understood too. Fields the service does not provide are not reported. If assigned the empty string, the default is restored. The default is chosen at compile time.

RefreshSec=
Controls how often the geolocation data is refreshed from the endpoint, at most. Takes a time span, see systemd.time(7) for details. The acquired data is cached locally, and the endpoint is only contacted again once the cached data is older than the specified time. If set to zero, the endpoint is contacted on every request. If set to infinity, the endpoint is contacted only once, and the cached data is used from then on. Defaults to 30min.

Use

systemd-analyze cat-config systemd/report-geoip.conf

to display the full config.

See Also

systemd-report-geoip@.service(8), systemd-report(1)