Skip to content

Ops Overview

Tutorial

Ops Overview

Platform operations and configuration management

15 min Intermediate
OpsPlatformConfiguration

What You'll Learn

  • Lifecycle Config — View instance and snapshot TTL settings
  • Cluster Health — Check component-level platform health
  • Cluster Metrics — Instance counts and Prometheus metrics
# Cell 1 — Parameters
USERNAME = "_FILL_ME_IN_" # Set your email before running
# Cell 2 — Connect
from graph_olap import GraphOLAPClient
client = GraphOLAPClient(username=USERNAME)
# Cell 3 — Provision
from notebook_setup import provision
personas, conn = provision(USERNAME)
analyst = personas["analyst"]
admin = personas["admin"]
ops = personas["ops"]
client = ops
print(f"Connected to: {ops._config.api_url}")
1

Lifecycle Configuration

Instance and snapshot TTL settings

# View current lifecycle configuration
lifecycle = client.ops.get_lifecycle_config()
print("Instance settings:")
print(f" Default TTL: {lifecycle.instance.default_ttl}")
print(f" Max TTL: {lifecycle.instance.max_ttl}")
print("\nSnapshot settings:")
print(f" Default TTL: {lifecycle.snapshot.default_ttl}")
# Concurrency settings (separate endpoint)
concurrency = client.ops.get_concurrency_config()
print("\nConcurrency limits:")
print(f" Per analyst: {concurrency.per_analyst}")
print(f" Cluster total: {concurrency.cluster_total}")
2

Cluster Health

Component-level health checks

# Cluster health — returns overall status plus per-component breakdown
health = client.ops.get_cluster_health()
print(f"Overall status: {health.status}")
print("\nComponents:")
for name, comp in health.components.items():
print(f" {name}: {comp.status}")
3

Cluster Metrics

Instance counts and Prometheus metrics

# Instance summary — structured counts by status
instances = client.ops.get_cluster_instances()
print(f"Total instances: {instances.total}")
print(f"By status: {instances.by_status}")
# Prometheus metrics — raw text format (for scraping or ad-hoc inspection)
metrics_text = client.ops.get_metrics()
# Show first 5 lines as a preview
for line in metrics_text.strip().splitlines()[:5]:
print(line)

Key Takeaways

  • Use get_lifecycle_config() and get_concurrency_config() to inspect platform settings
  • get_cluster_health() returns per-component status (control-plane, database, etc.)
  • get_cluster_instances() gives structured instance counts by status
  • get_metrics() returns raw Prometheus text for scraping or ad-hoc inspection