You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or create `~/.steampipe/config/ipgeolocation.spc` manually:
57
+
Edit `~/.steampipe/config/ipgeolocation.spc`
65
58
66
59
```hcl
67
60
connection "ipgeolocation" {
68
61
plugin = "ipgeolocation/ipgeolocation"
69
62
70
63
# Get your API key at https://app.ipgeolocation.io/dashboard
71
-
# Free tier works without a key for basic geolocation.
64
+
# Can also be set with the IPGEOLOCATION_API_KEY environment variable
72
65
# api_key = "YOUR_API_KEY_HERE"
73
66
}
74
67
```
@@ -79,12 +72,19 @@ You can also set the key via environment variable:
79
72
export IPGEOLOCATION_API_KEY="YOUR_API_KEY_HERE"
80
73
```
81
74
82
-
### Run your first query
75
+
##Multiple Connections
83
76
84
-
```sh
85
-
steampipe query "select ip, country_name, city from ipgeolocation_ip where ip = '1.1.1.1'"
77
+
You can create multiple connections and combine them using an [aggregator connection](https://steampipe.io/docs/managing/connections#using-aggregators):
Copy file name to clipboardExpand all lines: docs/tables/ipgeolocation_asn.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ ASN lookup using the [IPGeolocation.io](https://ipgeolocation.io) `/v3/asn` endp
4
4
5
5
Look up by IP address **or** ASN number. Returns the owning organisation, registration metadata (RIR, allocation date, status), announced route counts, and optionally the full list of routes, peers, upstreams, downstreams, and raw WHOIS text.
6
6
7
-
> **Note:**Costs **1 credit** per request.
7
+
> **Note:**This endpoint requires a **paid plan**API key and costs **1 credits per request**.
8
8
9
9
---
10
10
@@ -15,7 +15,7 @@ Look up by IP address **or** ASN number. Returns the owning organisation, regist
15
15
```sql
16
16
select
17
17
ip,
18
-
asn_number,
18
+
as_number,
19
19
asn_name,
20
20
organization,
21
21
country,
@@ -31,7 +31,7 @@ where
31
31
32
32
```sql
33
33
select
34
-
asn_number,
34
+
as_number,
35
35
asn_name,
36
36
organization,
37
37
country,
@@ -42,54 +42,54 @@ select
42
42
from
43
43
ipgeolocation_asn
44
44
where
45
-
asn_number='AS15169';
45
+
asn='AS15169';
46
46
```
47
47
48
48
### Check how many routes an ASN announces
49
49
50
50
```sql
51
51
select
52
-
asn_number,
52
+
as_number,
53
53
organization,
54
54
num_of_ipv4_routes,
55
55
num_of_ipv6_routes
56
56
from
57
57
ipgeolocation_asn
58
58
where
59
-
asn_number='AS13335';
59
+
asn='AS13335';
60
60
```
61
61
62
62
### List all announced IP prefixes (routes)
63
63
64
64
```sql
65
65
select
66
-
asn_number,
66
+
as_number,
67
67
organization,
68
68
jsonb_array_elements_text(routes) as prefix
69
69
from
70
70
ipgeolocation_asn
71
71
where
72
-
asn_number='AS15169';
72
+
asn='AS15169';
73
73
```
74
74
75
75
### Explore peering relationships
76
76
77
77
```sql
78
78
select
79
-
asn_number,
79
+
as_number,
80
80
organization,
81
81
peers
82
82
from
83
83
ipgeolocation_asn
84
84
where
85
-
asn_number='AS12';
85
+
asn='AS12';
86
86
```
87
87
88
88
### Expand peers into individual rows
89
89
90
90
```sql
91
91
select
92
-
asn_number,
92
+
as_number,
93
93
organization,
94
94
peer ->>'as_number'as peer_asn,
95
95
peer ->>'description'as peer_name,
@@ -98,14 +98,14 @@ from
98
98
ipgeolocation_asn,
99
99
jsonb_array_elements(peers) as peer
100
100
where
101
-
asn_number='AS12';
101
+
asn='AS12';
102
102
```
103
103
104
104
### Show upstream transit providers
105
105
106
106
```sql
107
107
select
108
-
asn_number,
108
+
as_number,
109
109
organization,
110
110
upstream ->>'as_number'as upstream_asn,
111
111
upstream ->>'description'as upstream_name,
@@ -114,19 +114,19 @@ from
114
114
ipgeolocation_asn,
115
115
jsonb_array_elements(upstreams) as upstream
116
116
where
117
-
asn_number='AS12';
117
+
asn='AS12';
118
118
```
119
119
120
120
### Get raw WHOIS text
121
121
122
122
```sql
123
123
select
124
-
asn_number,
124
+
as_number,
125
125
whois_response
126
126
from
127
127
ipgeolocation_asn
128
128
where
129
-
asn_number='AS15169';
129
+
asn='AS15169';
130
130
```
131
131
132
132
---
@@ -136,7 +136,8 @@ where
136
136
| Column | Type | Description |
137
137
|---|---|---|
138
138
| ip | text | IP used for lookup (when queried by IP) |
139
-
| asn_number | text | AS number e.g. "AS15169" |
139
+
| asn | text | ASN used for lookup (when queried by ASN) |
140
+
| as_number | text | AS number e.g. "AS15169" |
140
141
| asn_name | text | Short registered ASN name |
141
142
| organization | text | Organisation owning the ASN |
142
143
| country | text | ISO alpha-2 country of registration |
@@ -152,4 +153,3 @@ where
152
153
| upstreams | jsonb | Array of upstream/transit ASNs |
Copy file name to clipboardExpand all lines: docs/tables/ipgeolocation_ip.md
+11-23Lines changed: 11 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,21 @@
1
1
# Table: ipgeolocation_ip
2
2
3
-
Look up geolocation, network, timezone, security, company, abuse, and hostname data for any IPv4, IPv6, or domain using the [IPGeolocation.io](https://ipgeolocation.io) v3 API.
3
+
Look up geolocation, network, timezone, security, company, abuse, and hostname data for any IPv4, IPv6, or domain (paid only) using the [IPGeolocation.io](https://ipgeolocation.io) v3 API.
4
4
5
5
## Configuration
6
6
7
7
Configure your API key in `~/.steampipe/config/ipgeolocation.spc`:
8
8
9
9
```hcl
10
10
connection "ipgeolocation" {
11
-
plugin = "ipgeolocation"
11
+
plugin = "ipgeolocation/ipgeolocation"
12
+
13
+
# API key from https://app.ipgeolocation.io/dashboard (Required)
12
14
api_key = "YOUR_API_KEY_HERE"
13
15
}
14
16
```
15
17
16
-
A free-tier key from [ipgeolocation.io](https://app.ipgeolocation.io/dashboard) covers basic location data. Paid plans unlock security, hostname, company, and abuse modules.
18
+
A free-tier key from [ipgeolocation.io](https://app.ipgeolocation.io/dashboard) covers basic location data. Paid plans unlock security, hostname, company, abuse data.
17
19
18
20
---
19
21
@@ -48,7 +50,7 @@ from
48
50
ipgeolocation_ip;
49
51
```
50
52
51
-
### Check security signals for a suspicious IP
53
+
### Check security signals for a suspicious IP (paid plan)
52
54
53
55
```sql
54
56
select
@@ -71,7 +73,6 @@ where
71
73
select
72
74
ip,
73
75
asn,
74
-
isp,
75
76
organization,
76
77
connection_type
77
78
from
@@ -111,18 +112,6 @@ where
111
112
ip ='104.21.0.1';
112
113
```
113
114
114
-
### Inspect the full raw JSON response
115
-
116
-
```sql
117
-
select
118
-
ip,
119
-
raw
120
-
from
121
-
ipgeolocation_ip
122
-
where
123
-
ip ='8.8.4.4';
124
-
```
125
-
126
115
---
127
116
128
117
## Column Reference
@@ -142,19 +131,19 @@ where
142
131
| state_code | text | ISO 3166-2 state code |
143
132
| district | text | District / county |
144
133
| city | text | City |
145
-
| locality | text | Locality |
134
+
| locality | text | Locality (Paid) |
146
135
| zipcode | text | ZIP / postal code |
147
136
| latitude | text | Latitude |
148
137
| longitude | text | Longitude |
149
-
| accuracy_radius | text | Accuracy radius (km) |
138
+
| accuracy_radius | text | Accuracy radius (km) (Paid) |
0 commit comments