systemd-report-geoip@.service
systemd
systemd-report-geoip@.service
8
systemd-report-geoip@.service
systemd-report-geoip.socket
systemd-report-geoip
Report the approximate geographic location of the system as a metric
systemd-report-geoip@.service
systemd-report-geoip.socket
/usr/lib/systemd/systemd-report-geoip
Description
systemd-report-geoip@.service is a metrics source for
systemd-report1. It
reports the approximate geographic location of the system, as determined by a public IP geolocation
web service from the public IP address the system connects to it with. It implements the
io.systemd.Metrics Varlink interface on a socket linked into the
/run/systemd/report/ directory.
The geolocation data is acquired via HTTP from the endpoint configured in
report-geoip.conf5. The
acquired data is cached, and only refreshed once the cache is older than the configured
RefreshSec= interval. If the endpoint cannot be reached, the cached data is reported
even if it is older than that. If no data is available at all, no metrics are reported.
Metrics
The following metrics are reported, all in the io.systemd.GeoIP. namespace. Fields
the geolocation service does not provide are not reported.
io.systemd.GeoIP.PublicAddress
The public IP address of the system, as seen by the geolocation service. The address
is validated and reported in normalized form.
io.systemd.GeoIP.ASN
io.systemd.GeoIP.ASName
io.systemd.GeoIP.ASDomain
The Autonomous System Number (e.g. AS3320) of the network the public
IP address belongs to, and the name and domain of the organization operating it.
io.systemd.GeoIP.ContinentCode
io.systemd.GeoIP.ContinentName
The code (e.g. EU) and the name of the continent the system is
located in.
io.systemd.GeoIP.CountryCode
io.systemd.GeoIP.CountryName
The ISO 3166-1 alpha-2 code and the name of the country the system is located
in.
io.systemd.GeoIP.RegionCode
io.systemd.GeoIP.RegionName
The code and name of the region (state, province, …) the system is located
in.
io.systemd.GeoIP.City
io.systemd.GeoIP.ZipCode
The city and postal code of the area the system is located in.
io.systemd.GeoIP.Timezone
The IANA time zone name of the area the system is located in.
io.systemd.GeoIP.Latitude
io.systemd.GeoIP.Longitude
The geographic coordinates of the system's location, in decimal degrees.
io.systemd.GeoIP.Timestamp
The time at which the reported data was acquired from the geolocation service, in
microseconds since the UNIX epoch (CLOCK_REALTIME). When the data is served from
the cache this is the time the cache was last refreshed, not the time of the report.
Privacy
Note that refreshing the geolocation data means contacting a third party web service, which
thereby learns the public IP address of the system. The reported metrics identify the system's public IP
address and approximate location, and hence are sensitive. Only enable this service if this is acceptable
for the systems the reports are collected from.
See Also
systemd1
systemd-report1
report-geoip.conf5