Skip to content
Go/GAE app to monitor Web latency
Go HTML Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

WebMon - Monitor your Web Pages with Go/GAE


Since Oct 1 2019 GAE for Go changed significantly. See for overview of so many incompatibilites between go 1.9 and current 1.11)


According to

Make sure billing is enabled for your project. A billing account needs to be linked to your project in order for the application to be deployed to App Engine.

I have no plan to enable billing (it was main reason to use GAE, even when there is strong vendor-locking). Therefore I no longer can verify that this project still works. Sorry.

Here is a simple application to monitor latency and or errors of your web pages.

The app is written in Go for GAE.

STATUS: Basic functionality (including monitoring with cron job) implemented.

NOTE: Monitored Urls are configurable at Deployment Time (using shell variable MON_URLS)

Live demo is available at:


To properly checkout source you must obey following structure:

mkdir -p src/
cd src/
git clone

REMEMBER! You must have parent directory structure exactly set to src/ otherwise all local go imports like:

import (

Would fail!!! Please see discussion at

Install required components:

  • Tested OS: Ubuntu 16.04.3 LTS, x86_64

  • Now you need to install go 1.11 manually using these commands:

wget sudo tar -C /usr/local -xzf go1.11.linux-amd64.tar.gz

* Install python 2.7 (or later 2.x) using:

sudo apt-get install python2.7
sudo mkdir /opt/gae
sudo chown $USER /opt/gae
tar xzf google-cloud-sdk-171.0.0-linux-x86_64.tar.gz -C /opt/gae
  • Add newly created /opt/google-cloud-sdk/ to your PATH, for example add this to your ~/.bashrc:
export PATH=/usr/local/go/bin:$PATH
export PATH=/opt/gae/google-cloud-sdk/bin:$PATH
  • and reload environment using:
source ~/.bashrc
  • add Go GAE plugin to your Google Cloud SDK:
gcloud components install app-engine-go

Create new application in GAE Dashboard:

Developing app

  • you can define your own list of monitored apps defining environment variable in your shell, for example:

    export MON_URLS=""
  • to run this app locally use:

  • to gather monitoring data (and see results), run cron task using:

  • and go to URL: http://localhost:8080/

  • to view cute Admin interface (something like "Dashboard Lite") use: http://localhost:8000

To really monitor Urls you need to call /cron path, for example:

curl http://localhost:8080/cron

Deploying app

For the first time you must register your Google Account to deploy app:

  • configure your project ID (in my case hp-webmon) in you shell set variable WEBMON_APP_ID to your Project ID you created in your GAE Dashboard. For example I added to my ~/.bashrc

    export WEBMON_APP_ID=hp-webmon

    For the first time set app id manually:

    gcloud config set project $WEBMON_APP_ID
  • then create your App (for the 1st time only):

    gcloud app create
  • configure your Google Account for GAE:

    gcloud config set account YOUR_GOOGLE_ACCOUNT
  • login with your GAE account:

    gcloud auth login
  • new browser window should appear:

    • login or confirm selected account
    • allow required permissions for Google Cloud SDK
  • you should see page with title "You are now authenticated with the Google Cloud SDK!"

And finally:

  • to deploy app run script:


Misc tips

How to view traces:

  • Go to Dashboard of your GAE project
  • click on "View Traces" on interested URL in list
  • than click on point in trace graph
  • you should now see detailed profile of your request


Interative mode may miss last entries from datastore (eventual constistency). This bug would be automatically fixed when using cron job.


I used many resources to write this program including (but no guarantee to be comprehensive!):

Most of them come from my own App (see ot ZoList for Resources):

You can’t perform that action at this time.