Ops Overview
Tutorial
Ops Overview
Platform operations and configuration management
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 — ParametersUSERNAME = "_FILL_ME_IN_" # Set your email before running# Cell 2 — Connectfrom graph_olap import GraphOLAPClientclient = GraphOLAPClient(username=USERNAME)
# Cell 3 — Provisionfrom notebook_setup import provisionpersonas, conn = provision(USERNAME)analyst = personas["analyst"]admin = personas["admin"]ops = personas["ops"]
client = opsprint(f"Connected to: {ops._config.api_url}")
1
Lifecycle Configuration
Instance and snapshot TTL settings
# View current lifecycle configurationlifecycle = 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 breakdownhealth = 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 statusinstances = 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 previewfor line in metrics_text.strip().splitlines()[:5]: print(line)Key Takeaways
- Use
get_lifecycle_config()andget_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 statusget_metrics()returns raw Prometheus text for scraping or ad-hoc inspection