Skip to content

Deploy the monitoring stack template with OpenTofu

Deployment · Updated Jun 2026

Coming from another cloud?

▸AWS·Cloudwatch

This Quake AI feature maps to AWS’s Cloudwatch.

▸DigitalOcean·Monitoring

This Quake AI feature maps to DigitalOcean’s Monitoring.

▸Google Cloud·Cloud Monitoring

This Quake AI feature maps to Google Cloud’s Cloud Monitoring.

Deploy the monitoring stack template with OpenTofu

Stand up Prometheus and Grafana on a private subnet using the validated OpenTofu template monitoring-stack. Prometheus stays on the private CIDR; Grafana gets one floating IP with a pre-provisioned Prometheus data source.

Monthly cost estimate

Pricing calculator ↗

Sized as a custom package on dedicated vCPU.

Starting template$139.80/mo

Monthly total for the required template above. Use the configurator below to add optional pieces and see the total update.

What each resource is for

Prometheus

m2a.large · 2 dedicated vCPU, 8 GiB RAM, 0.5 Gbps

$66.00/mo

Grafana

m2a.large · 2 dedicated vCPU, 8 GiB RAM, 0.5 Gbps

$66.00/mo

Compute shown per role at custom-package rates ($29/dedicated vCPU, $7.25/shared vCPU, $1/GiB RAM). The headline above is the billed total: the cheaper of a named plan and the custom package, plus add-ons.

Included in baseline

m2a.large

2 dedicated vCPU, 8 GiB RAM, 0.5 Gbps

$66.00

m2a.large

2 dedicated vCPU, 8 GiB RAM, 0.5 Gbps

$66.00

Compute + RAM rate basis

4 vCPU + 16 GiB RAM at $29/dedicated vCPU, $7.25/shared vCPU, $1/GiB RAM (regular). Totals apply the flat −$5/mo package promotion.

—

Block storage (160 GiB)

160 GiB at $0.08/GiB/mo

$12.80

Public IP (included)

1 included with the custom package

$0.00

Package promotional discount

Flat −$5.00/mo on the custom package (same promotion as named plans).

$-5.00

Included at no charge

These line items are zero on Quake AI. Many other providers meter them separately.

Data transfer (inbound and outbound)

Unlimited data transfer on every plan; Quake AI does not meter per-GB egress.

AWS, GCP, and Azure meter outbound transfer per GB. DigitalOcean and Hetzner include an allowance on compute plans, then charge overage.

Learn more
$0.00

Private networking

Private networks, subnets, Neutron routers, and security groups are included with the plan.

VPC objects are usually free to create elsewhere, but NAT gateways bill hourly plus per-GB processed. Quake AI uses router SNAT with no separate NAT line item.

$0.00

Control-plane API requests

OpenStack API calls for provisioning and management are included.

Some managed services on other clouds meter API calls or charge for premium control-plane features.

$0.00

Dev/test vs production

Start on shared CPU for dev/test, then promote to dedicated for production with a flavor resize. The network, storage, and template stay the same.

Dev/test on shared CPU

Burstable s1a flavors; suited to prototyping and low or bursty load.

$40.80/mo

Production on dedicated CPU

The headline estimate above; predictable steady-load performance.

$139.80/mo

Saves $99.00/mo while you build on shared CPU.

Shared flavors carry less RAM (m2a.large (8 GiB RAM) -> s1a.small (2 GiB RAM); m2a.large (8 GiB RAM) -> s1a.small (2 GiB RAM)). A resize reboots the instance; data on attached volumes persists. Size the dedicated flavor for the RAM your production workload needs.

Pricing data last validated: . For current rates, check quake.ai/pricing.

BrowserQuake AIFloating IPGrafana :3000Private network192.168.90.0/24Routerto PublicStaticPrometheus:9090 private onlyGrafanadata source -> prom sign inscrape
Click to zoom
Monitoring stack topology: private subnet, Prometheus and Grafana instances with data volumes, one floating IP on Grafana

Prerequisites#

You need:

  • A Quake AI account with application credentials
  • OpenTofu 1.6.0 or later (installation guide)
  • OpenStack credentials sourced into the shell (source openrc.sh). See the OpenStack CLI guide.
  • An SSH key pair already uploaded to the project. See Add an SSH key.
  • A copy of the monitoring-stack template from the template reference page
  • Enough project quota for two m2a.large instances (defaults), two 20 GB boot volumes, a 100 GB Prometheus data volume, a 20 GB Grafana data volume, one router, one private network, and one floating IP

Step 1: Configure variables#

Copy terraform.tfvars.example to terraform.tfvars and set:

HCL
key_name                 = "YOUR_KEY_NAME"
grafana_admin_password   = "YOUR_STRONG_GRAFANA_PASSWORD"
admin_cidr               = "YOUR_PUBLIC_IP/32"

Replace YOUR_PUBLIC_IP/32 with the address you browse from so Grafana port 3000 and SSH are not open to the entire internet.

Defaults for flavors, volume sizes, retention, and network CIDR are documented on the Monitoring Stack (Prometheus + Grafana) reference page.

Step 2: Apply the template#

From the template directory, run:

bash
tofu init
tofu plan
tofu apply

Type yes when prompted. Provisioning takes several minutes while cloud-init installs Prometheus and Grafana on each instance.

When the run finishes, note grafana_url and prometheus_private_ip from the outputs.

Step 3: Sign in to Grafana and confirm Prometheus#

SSH to Grafana through its floating IP and wait for cloud-init:

bash
GRAFANA_HOST=$(tofu output -raw grafana_url | sed 's|http://||;s|:3000||')
ssh -i ~/.ssh/YOUR_KEY -o StrictHostKeyChecking=accept-new ubuntu@"${GRAFANA_HOST}" 'cloud-init status --wait'

Open grafana_url in your browser. Sign in with username admin and the grafana_admin_password value from terraform.tfvars.

Grafana ships with a provisioned Prometheus data source pointing at http://<prometheus_private_ip>:9090. Go to Connections > Data sources > Prometheus and select Save & test.

Check scrape targets from the Grafana instance:

bash
PROM_IP=$(tofu output -raw prometheus_private_ip)
ssh -i ~/.ssh/YOUR_KEY ubuntu@"${GRAFANA_HOST}" \
  "curl -s http://${PROM_IP}:9090/api/v1/targets | python3 -m json.tool | head -40"

You should see at least the prometheus job scraping localhost:9090 with state up.

In Grafana, open Explore, select the Prometheus data source, and run up. A result with up{job="prometheus"} = 1 confirms metrics are flowing.

Next steps#

Clean up#

Run tofu destroy from the project directory when finished. Type yes to confirm. Verify in the Console that both instances and the floating IP are gone.

Was this page helpful?