Skip to content

Commit 41d5bda

Browse files
committed
update: REadme
1 parent 90cc46c commit 41d5bda

1 file changed

Lines changed: 57 additions & 51 deletions

File tree

README.md

Lines changed: 57 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,86 @@
1-
# Steampipe Plugin IPGeolocation.io
1+
# Steampipe Plugin for IPGeolocation.io
22

3-
Query IP geolocation, network, security, timezone, company, abuse, and hostname data using SQL via the [IPGeolocation.io](https://ipgeolocation.io) v3 API.
3+
Use SQL to query IP geolocation, threat intelligence, ASN details, and abuse contacts from [IPGeolocation.io](https://ipgeolocation.io).
4+
5+
```sql
6+
select
7+
ip,
8+
country_name,
9+
city,
10+
isp,
11+
timezone_name
12+
from
13+
ipgeolocation_ip
14+
where
15+
ip = '8.8.8.8';
16+
```
417

518
## Quick Start
619

7-
### 1. Install the plugin
20+
Install the plugin:
821

922
```sh
10-
steampipe plugin install ipgeolocation
23+
steampipe plugin install ipgeolocation/ipgeolocation
1124
```
1225

13-
### 2. Configure credentials
26+
Configure your API key in `~/.steampipe/config/ipgeolocation.spc`:
1427

15-
```sh
16-
cp config/ipgeolocation.spc ~/.steampipe/config/ipgeolocation.spc
17-
# edit the file and set your api_key
28+
```hcl
29+
connection "ipgeolocation" {
30+
plugin = "ipgeolocation/ipgeolocation"
31+
32+
# Get your free API key at https://app.ipgeolocation.io/dashboard
33+
# Can also be set with the IPGEOLOCATION_API_KEY environment variable.
34+
# api_key = "a1b2c3d4e5f6..."
35+
}
1836
```
1937

20-
### 3. Query away
38+
Run a query:
2139

22-
```sql
23-
-- Where is 8.8.8.8?
24-
select ip, country_name, city, isp
25-
from ipgeolocation_ip
26-
where ip = '8.8.8.8';
27-
28-
-- Is it a VPN/proxy/Tor?
29-
select ip, is_vpn, is_proxy, is_tor, threat_score
30-
from ipgeolocation_ip
31-
where ip = '185.220.101.45';
40+
```sh
41+
steampipe query "select ip, country_name, city from ipgeolocation_ip where ip = '8.8.8.8'"
3242
```
3343

34-
## Requirements
44+
## Developing
3545

36-
| Requirement | Version |
37-
|---|---|
38-
| Steampipe | ≥ 0.20 |
39-
| Steampipe Plugin SDK | v5 |
40-
| Go | ≥ 1.21 |
46+
Prerequisites:
4147

42-
## Building from Source
48+
- [Steampipe](https://steampipe.io/downloads) ≥ 0.20
49+
- [Go](https://golang.org/dl/) 1.26+
50+
51+
Clone the repo, build, and install:
4352

4453
```sh
45-
git clone https://github.com/turbot/steampipe-plugin-ipgeolocation
54+
git clone https://github.com/IPGeolocation/steampipe-plugin-ipgeolocation
4655
cd steampipe-plugin-ipgeolocation
47-
make
56+
make setup
4857
```
4958

50-
## Configuration Reference
59+
`make setup` runs `go mod tidy`, builds the plugin binary, and installs both the binary and the sample config file.
5160

52-
```hcl
53-
connection "ipgeolocation" {
54-
plugin = "ipgeolocation"
61+
To rebuild after making changes:
5562

56-
# Required for most modules. Free tier covers basic location data.
57-
# Sign up at https://app.ipgeolocation.io/
58-
api_key = "YOUR_API_KEY_HERE"
59-
}
63+
```sh
64+
make install
65+
```
66+
67+
Run tests:
68+
69+
```sh
70+
make test
6071
```
6172

62-
## Tables
73+
## Documentation
6374

64-
| Table | Description |
65-
|---|---|
66-
| [ipgeolocation_ip](docs/tables/ipgeolocation_ip.md) | Geolocation data for a given IP address or domain |
75+
Full table documentation is available on [Steampipe Hub](https://hub.steampipe.io/plugins/ipgeolocation/ipgeolocation/tables) and in the [`docs/`](docs/tables) directory.
6776

68-
## API Plan Notes
77+
| Table | Endpoint | Description | Credits |
78+
|---|---|---|---|
79+
| [ipgeolocation_ip](docs/tables/ipgeolocation_ip.md) | `/v3/ipgeo` | Geolocation, network, timezone, security, company, abuse, hostname | 1–4 |
80+
| [ipgeolocation_security](docs/tables/ipgeolocation_security.md) | `/v3/security` | VPN, proxy, Tor, relay, bot, spam, and threat score | 2 |
81+
| [ipgeolocation_abuse](docs/tables/ipgeolocation_abuse.md) | `/v3/abuse` | Abuse contact emails, phone numbers, org, and CIDR route | 1 |
82+
| [ipgeolocation_asn](docs/tables/ipgeolocation_asn.md) | `/v3/asn` | ASN details, routes, peers, upstreams, downstreams, WHOIS | 1 |
6983

70-
| Module | Free | Paid |
71-
|---|---|---|
72-
| Location (country, city, lat/lon) |||
73-
| Timezone |||
74-
| Network / ASN |||
75-
| Hostname |||
76-
| Security (VPN, proxy, threat score) |||
77-
| Company |||
78-
| Abuse contact |||
84+
## License
7985

80-
Free-plan columns will return `null` when the field is not available on your subscription tier.
86+
This plugin is licensed under the [Apache 2.0 License](LICENSE).

0 commit comments

Comments
 (0)