Created
June 17, 2022 08:55
-
-
Save timogoosen/41057a9834703abf5ffe458d23b692e8 to your computer and use it in GitHub Desktop.
List Google Cloud Uptime Check IPs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python3 | |
from google.cloud import monitoring_v3 | |
client = monitoring_v3.UptimeCheckServiceClient() | |
ips = client.list_uptime_check_ips() | |
for ip in ips: | |
print(ip.ip_address) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can quickly set this up in a virtualenv like this: | |
$ virtualenv .venv | |
venv) $ source .venv/bin/activate | |
venv) $ pip3 install -r requirements.txt | |
venv) $ python3 get-uptime-check-ips.py | |
146.148.59.114 | |
23.251.144.62 | |
146.148.41.163 | |
35.239.194.85 | |
104.197.30.241 | |
35.192.92.84 | |
35.238.3.7 | |
35.224.249.156 | |
35.238.118.210 | |
35.197.117.125 | |
35.203.157.42 | |
35.199.157.7 | |
35.233.206.171 | |
35.197.32.224 | |
35.233.167.246 | |
35.203.129.73 | |
35.185.252.44 | |
35.233.165.146 | |
35.186.164.184 | |
35.188.230.101 | |
35.199.27.30 | |
35.186.176.31 | |
35.236.207.68 | |
35.236.221.2 | |
35.221.55.249 | |
35.199.12.162 | |
35.186.167.85 | |
104.155.77.122 | |
104.155.110.139 | |
146.148.119.250 | |
35.195.128.75 | |
35.240.124.58 | |
35.205.234.10 | |
35.205.72.231 | |
35.187.114.193 | |
35.205.205.242 | |
35.187.242.246 | |
35.186.144.97 | |
35.198.221.49 | |
35.198.194.122 | |
35.198.248.66 | |
35.185.178.105 | |
35.198.224.104 | |
35.240.151.105 | |
35.186.159.51 | |
35.199.66.47 | |
35.198.18.224 | |
35.199.67.79 | |
35.198.36.209 | |
35.199.90.14 | |
35.199.123.150 | |
35.198.39.162 | |
35.199.77.186 | |
35.199.126.168 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
google-api-python-client | |
google-cloud-monitoring | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment