pcp-geolocate - Man Page

discover collector system geographical labels

Synopsis

pcp geolocate

Description

pcp-geolocate reports the latitude and longitude for the local Performance Co-Pilot collector host in JSON format. This geolocation information is sourced from the cache file $PCP_SYSCONF_DIR/labels/optional/geolocate if it exists, else an attempt is made to perform geolocation based on the host IP address, via several online sources (REST APIs).

The output from this command is suited for storing as metric labels by saving it to the cache file mentioned above.

The opt-in systemd(1) service unit file for this command provides an automated location discovery for PCP metric labels.

Metric Labels

The JSON output is the preferred format for storing geographical location as PCP metric labels. Every PCP metric available from this host will be tagged with the labels for latitude and longitude, enabling tools that make use of this such as the Grafana geomap panel.

For more information about metric labels refer to the pmcd(1), pminfo(1), pmlogger(1) and pmLookupLabels(3) manual entries.

PCP Environment

Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).

See Also

PCPIntro(1), pmcd(1), pminfo(1), pmseries(1), pmlogger(1), systemd(1), pmLookupLabels(3), pcp.conf(5) and pcp.env(5).

Info

PCP Performance Co-Pilot