Skip to content

GitHub and cloud integrations

Deploy markers from GitHub webhooks, and metrics pulled from AWS CloudWatch and Google Cloud Monitoring.

GitHub deploy markers

Every time-series chart shows deploys as vertical markers. Versions seen in your telemetry (service.version) are marked automatically; the GitHub integration adds deploys straight from GitHub, with the commit, a link and who deployed.

  1. Connect GitHub

    In Settings › Integrations › GitHub › Connect, enter a random secret of at least 16 characters. Optionally set the service name (default: the repository name), the environment for releases and pushes (default: production) and which events count as deploys.

  2. Add the webhook in GitHub

    Repository (or organization) Settings › Webhooks › Add webhook: paste the payload URL shown on the integration card, set Content type to application/json, enter the same secret, and pick Deployment statuses, Releases and Pushes.

  3. Check deliveries

    GitHub sends a ping when the webhook is added; it appears under the integration with what each delivery became. Test passes once a verified delivery has arrived.

What becomes a deploy marker
GitHub eventMarker
deployment_statusState success only. The deployment’s environment; the ref (or short commit) as the version.
releaseAction published (not drafts). The tag as the version.
pushPushes to the default branch only. The short head commit as the version.
  • Every delivery is verified with HMAC-SHA256 of the raw body (header X-Hub-Signature-256) and the integration’s own secret. Unsigned or wrongly signed requests get 401.
  • Redeliveries (same X-GitHub-Delivery id) are recorded once.
  • If the marker cannot be stored the endpoint answers 503, so GitHub shows the delivery as failed and you can redeliver it.
  • Use either deployment_status or push for a repository that deploys on every push, or you get two markers per deploy.

AWS CloudWatch metrics

Pulls CloudWatch metrics into Metrics every 5 minutes, so you can chart them and alert on them with metric threshold rules. Metrics are named aws.<namespace>.<MetricName> (for example aws.ec2.CPUUtilization) and labelled with their dimensions plus aws_region.

  1. Create a read-only IAM user

    Give it only this policy, then create an access key for it.

    IAM policy
    {
      "Version": "2012-10-17",
      "Statement": [{
        "Effect": "Allow",
        "Action": ["cloudwatch:ListMetrics", "cloudwatch:GetMetricData"],
        "Resource": "*"
      }]
    }
  2. Connect

    Settings › Integrations › AWS CloudWatch › Connect: the access key id and secret (stored encrypted), the region and up to 10 namespaces such as AWS/EC2, AWS/RDS. Test signs a ListMetrics call.

  3. Watch the pulls

    The card shows the last pull and its point count; Pull now runs one immediately.

  • Each pull lists the metrics active in the last 3 hours in the selected namespaces and reads them with GetMetricData (Average). At most 500 metrics per pull: narrow the namespaces if the card says the limit was reached.
  • Period: 300 seconds (basic monitoring) or 60 (detailed monitoring). Data is read 10 minutes behind real time so CloudWatch has published it.
  • CloudWatch bills GetMetricData per metric requested.

Google Cloud Monitoring metrics

Pulls Cloud Monitoring time series (timeSeries.list, aligned to 1 minute) into Metrics every 5 minutes. Metrics are named gcp.<metric type> (for example gcp.compute.googleapis.com/instance/cpu/utilization) with the resource and metric labels.

  1. Create a service account key

    gcloud
    gcloud iam service-accounts create vitalrix-metrics --project MY_PROJECT
    gcloud projects add-iam-policy-binding MY_PROJECT \
      --member serviceAccount:vitalrix-metrics@MY_PROJECT.iam.gserviceaccount.com --role roles/monitoring.viewer
    gcloud iam service-accounts keys create key.json \
      --iam-account vitalrix-metrics@MY_PROJECT.iam.gserviceaccount.com
  2. Connect

    Settings › Integrations › Google Cloud Monitoring › Connect: paste the JSON key (stored encrypted) and up to 10 metric types. End one with * to match a prefix, for example compute.googleapis.com/instance/cpu/*.

Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.