diff --git a/docs/examples.md b/docs/examples.md index 9d329ce..0b34020 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -91,14 +91,16 @@ FROM ipgeolocation_abuse_contact WHERE emails != ''; ``` -### Mobile traffic by operating system +### Mobile user agents by operating system + +The table holds one row per distinct user agent string, so this counts distinct strings, not requests. For request counts, join the table to your access log on `user_agent_string`. ```sql -SELECT os_name, os_version_major, device_brand, COUNT(*) AS hits +SELECT os_name, os_version_major, device_brand, COUNT(*) AS distinct_user_agents FROM ipgeolocation_user_agent WHERE device_type = 'Mobile' GROUP BY os_name, os_version_major, device_brand -ORDER BY hits DESC; +ORDER BY distinct_user_agents DESC; ``` ### Country breakdown diff --git a/docs/overview.md b/docs/overview.md index 2fd5e5f..8515633 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -21,7 +21,7 @@ The plugin is built for batch enrichment on a schedule rather than for per reque - Auditing which countries and networks your known IPs resolve to, for compliance reporting - Mapping ASN ownership and transit relationships for a group of prefixes you care about -If you need a lookup inside a request handler, call the [IP Geolocation API](https://ipgeolocation.io/documentation/ip-geolocation-api.html) directly or use one of the [official SDKs](https://ipgeolocation.io/documentation.html#api-sdks) instead. CloudQuery is a batch tool and the sync runs on your schedule, not on your traffic. +If you need a lookup inside a request handler, call the [IP Geolocation API](https://ipgeolocation.io/documentation/ip-location-api.html) directly or use one of the [official SDKs](https://ipgeolocation.io/documentation.html#api-sdks) instead. CloudQuery is a batch tool and the sync runs on your schedule, not on your traffic. ## Tables diff --git a/docs/tables.md b/docs/tables.md index 0cee00b..0653192 100644 --- a/docs/tables.md +++ b/docs/tables.md @@ -14,7 +14,7 @@ Every table also carries the CloudQuery system columns `_cq_id` and `_cq_parent_ ## ipgeolocation_ip_geolocation -One row per entry in `ips`, or a single row for the caller's public IP when `ips` is empty. Source: [IP Geolocation API](https://ipgeolocation.io/documentation/ip-geolocation-api.html). +One row per entry in `ips`, or a single row for the caller's public IP when `ips` is empty. Works on the free plan; columns marked Paid below need a paid plan. Source: [IP Geolocation API](https://ipgeolocation.io/documentation/ip-location-api.html). ### Identity @@ -66,11 +66,11 @@ Latitude, longitude and accuracy radius come back from the API as strings and ar | Column | Type | Description | |---|---|---| -| `connection_type` | text | Connection type reported for the network | -| `route` | text | CIDR block the IP belongs to | -| `is_anycast` | boolean | True when the prefix is anycast | -| `is_cdn` | boolean | True when the IP belongs to a CDN | -| `cdn_provider_name` | text | CDN operator name | +| `connection_type` | text | Connection type reported for the network. Paid | +| `route` | text | CIDR block the IP belongs to. Paid | +| `is_anycast` | boolean | True when the prefix is anycast. Paid | +| `is_cdn` | boolean | True when the IP belongs to a CDN. Paid | +| `cdn_provider_name` | text | CDN operator name. Paid | ### ASN and company @@ -79,21 +79,21 @@ Latitude, longitude and accuracy radius come back from the API as strings and ar | `as_number` | text | AS number, for example `AS15169` | | `asn_organization` | text | Organization that holds the AS number | | `asn_country` | text | Country of registration | -| `asn_type` | text | ASN type, such as ISP, HOSTING, EDUCATION, GOVERNMENT or BUSINESS | -| `asn_domain` | text | Primary domain of the organization | -| `asn_date_allocated` | text | Allocation date | -| `asn_rir` | text | Regional Internet Registry: ARIN, RIPE, APNIC, LACNIC or AFRINIC | -| `company_name` | text | Company operating the IP | -| `company_type` | text | Company type | -| `company_domain` | text | Company domain | +| `asn_type` | text | ASN type, such as ISP, HOSTING, EDUCATION, GOVERNMENT or BUSINESS. Paid | +| `asn_domain` | text | Primary domain of the organization. Paid | +| `asn_date_allocated` | text | Allocation date. Paid | +| `asn_rir` | text | Regional Internet Registry: ARIN, RIPE, APNIC, LACNIC or AFRINIC. Paid | +| `company_name` | text | Company operating the IP. Paid | +| `company_type` | text | Company type. Paid | +| `company_domain` | text | Company domain. Paid | ### Timezone | Column | Type | Description | |---|---|---| | `timezone_name` | text | IANA timezone name, for example `America/New_York` | -| `timezone_offset` | double | UTC offset in seconds, ignoring DST | -| `timezone_offset_with_dst` | double | UTC offset in seconds, including DST | +| `timezone_offset` | double | UTC offset in hours, ignoring DST; fractional values are possible, for example `5.5` | +| `timezone_offset_with_dst` | double | UTC offset in hours, including DST; fractional values are possible | | `timezone_current_time` | text | Local time at the moment of the lookup | | `timezone_current_time_unix` | double | Same moment as a Unix timestamp | | `timezone_abbreviation` | text | Timezone abbreviation, for example EST | diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 78cfe19..64fcf57 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -105,10 +105,10 @@ spec: ```bash cloudquery sync check.yml -sqlite3 check.db "SELECT ip, country_name, city, company_name FROM ipgeolocation_ip_geolocation;" +sqlite3 check.db "SELECT ip, country_name, city, asn_organization FROM ipgeolocation_ip_geolocation;" ``` -A row naming the United States and Google confirms the key, the plugin and the destination are all working. +A row naming the United States and Google confirms the key, the plugin and the destination are all working. `asn_organization` is part of the free response; `company_name` needs a paid plan, so it is left out of this check. ## Getting Help