This document shows you how to get a list of IP addresses used by uptime-check servers, and how you can identify traffic from the uptime-check servers in your logs.
List IP addresses
When you're checking a service that is behind a firewall, you can configure your service's firewall to accept traffic from the current set of IP addresses used for uptime checking. To get these IP addresses, use the following instructions:
Console
-
In the Google Cloud console, go to the Uptime checks page:
If you use the search bar to find this page, then select the result whose subheading is Monitoring.
- In the Uptime checks menu, click get_app Download.
A file
uptime-source-ips.txt
is downloaded and contains the IP addresses.
gcloud
Run the gcloud monitoring uptime list-ips
command:
gcloud monitoring uptime list-ips
The method returns the following information for each IP address:
- The IP address, not a range, in IPv4 or IPv6 format.
- The region:
USA
,EUROPE
,SOUTH_AMERICA
, orASIA_PACIFIC
. - The location within the region.
API
Call the
uptimeCheckIps.list
method of the Monitoring API.
The method returns the following information for each IP address:
- The region:
USA
,EUROPE
,SOUTH_AMERICA
, orASIA_PACIFIC
. - A more specific location within the region.
- The IP address, not a range, in IPv4 or IPv6 format.
C#
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Go
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Node.js
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
PHP
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Ruby
To authenticate to Monitoring, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Uptime checks can come from any of the IP addresses, but only one address from each geographic location is used for each time interval. The geographic locations are listed in the uptime checks dashboard, as shown in the previous section. You can also use free, web-based services to identify the registered locations of the IP addresses you downloaded.
Identify uptime-check traffic in logs
You can identify requests from the uptime-check servers by the following information in your service's request logs:
- ip: The
ip
field contains one of the addresses used by the uptime-check servers. For information about how to list all IP addresses, see List IP addresses. User-Agent: The
User-Agent
header value is always the following:GoogleStackdriverMonitoring-UptimeChecks(https://cloud.google.com/monitoring)
Specifying a
User-Agent
custom header results in a form validation error and prevents the check configuration from being saved.