Skip to content
Development
Command

/monitor

Comprehensive monitoring and observability orchestrator with parallel deployment automation

From plugin
claude-cmd
313180 skills180 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/monitor

Context preview

What this command does when you run it.

Comprehensive monitoring and observability orchestrator with parallel deployment automation

Command definition

monitor.md
allowed-tools: Task, Bash(kubectl:*), Bash(docker:*), Bash(helm:*), Bash(rg:*), Bash(fd:*), Bash(jq:*), Bash(gdate:*), Bash(curl:*), Bash(nc:*), Read, Write, Edit
name: "Monitor"
description: "Comprehensive monitoring and observability orchestrator with parallel deployment automation"
author: "wcygan"
tags: ["ops","monitor"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"

Context

  • Session ID: !`gdate +%s%N 2>/dev/null || date +%s%N 2>/dev/null || echo "$(date +%s)$(jot -r 1 100000 999999 2>/dev/null || shuf -i 100000-999999 -n 1 2>/dev/null || echo $RANDOM$RANDOM)"`
  • Target system: $ARGUMENTS
  • Current directory: !`pwd`
  • Infrastructure type: !`kubectl cluster-info 2>/dev/null | head -1 || docker info --format '{{.ServerVersion}}' 2>/dev/null | head -1 || echo "Local development"`
  • Existing monitoring: !`kubectl get pods -A | rg "(prometheus|grafana|jaeger|loki)" 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
  • Available storage classes: !`kubectl get storageclass 2>/dev/null | tail -n +2 | head -3 || echo "No Kubernetes detected"`
  • Helm repositories: !`helm repo list 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
  • System resources: !`docker stats --no-stream --format "{{.Container}}: {{.CPUPerc}} CPU, {{.MemUsage}}" 2>/dev/null | head -3 || echo "No containers running"`

Your Task

STEP 1: Initialize comprehensive monitoring deployment session

TRY:

  • CREATE monitoring deployment session state: `/tmp/monitoring-deployment-$SESSION_ID.json`
  • ANALYZE current infrastructure from Context section
  • DETERMINE optimal monitoring architecture based on environment
  • VALIDATE prerequisite tools and access permissions
# Initialize monitoring deployment session
echo '{
  "sessionId": "'$SESSION_ID'",
  "targetSystem": "'$ARGUMENTS'",
  "infrastructureType": "auto-detect",
  "monitoringStack": {
    "metrics": "prometheus",
    "logs": "loki",
    "traces": "jaeger",
    "visualization": "grafana"
  },
  "deploymentPhase": "initialization",
  "components": [],
  "healthChecks": []
}' > /tmp/monitoring-deployment-$SESSION_ID.json

STEP 2: Adaptive monitoring architecture selection with intelligent deployment

CASE infrastructure_type:

WHEN "kubernetes":

  • EXECUTE cloud-native monitoring stack deployment
  • USE Helm charts for production-ready configurations
  • IMPLEMENT operator-based management
  • ENABLE auto-scaling and high availability

WHEN "docker_compose":

  • DEPLOY containerized monitoring stack
  • USE Docker Compose orchestration
  • CONFIGURE volume mounts for persistence
  • ENABLE service discovery

WHEN "local_development":

  • SETUP lightweight monitoring for development
  • USE single-node configurations
  • MINIMIZE resource requirements
  • ENABLE quick iteration cycles

**Cloud-Native Monitoring Stack (Kubernetes):**

# Production-Ready Observability Stack
metrics:
  collection: Prometheus Operator + OpenTelemetry
  storage: Prometheus + Thanos (long-term retention)
  visualization: Grafana with unified dashboards
  alerting: AlertManager with multi-channel routing

logs:
  collection: Vector + Fluent Bit (lightweight)
  storage: Loki + S3-compatible object storage
  visualization: Grafana with log correlation
  retention: 30d hot, 1y cold storage

traces:
  collection: OpenTelemetry Collector (distributed)
  storage: Jaeger + Elasticsearch/S3
  visualization: Jaeger UI + Grafana tracing panels
  sampling: Adaptive sampling for high-throughput

infrastructure:
  node_monitoring: Node Exporter DaemonSet
  kubernetes_monitoring: kube-state-metrics
  service_discovery: Prometheus ServiceMonitor CRDs
  ingress_monitoring: NGINX/Istio metrics integration

**Alternative SaaS Solutions:**

# Managed Observability Options
saas_options:
  grafana_cloud:
    benefits: "Fully managed, integrated stack"
    use_case: "Teams wanting zero ops overhead"
    cost_model: "Usage-based pricing"

  datadog:
    benefits: "Enterprise APM, ML-powered insights"
    use_case: "Large-scale applications, advanced analytics"
    cost_model: "Per-host pricing"

  new_relic:
    benefits: "Full-stack observability, AI insights"
    use_case: "Modern applications, developer-focused"
    cost_model: "Data ingestion pricing"

  honeycomb:
    benefits: "High-cardinality observability"
    use_case: "Complex distributed systems, debugging"
    cost_model: "Event-based pricing"

STEP 3: Parallel monitoring component deployment using sub-agent architecture

IF infrastructure_complexity > "simple" OR component_count > 5:

LAUNCH parallel sub-agents for simultaneous monitoring stack deployment:

  • **Agent 1: Metrics Infrastructure**: Deploy Prometheus ecosystem with storage and alerting
  • Focus: Prometheus Operator, AlertManager, Thanos for long-term storage
  • Tools: Helm charts, Kubernetes manifests, storage configuration
  • Output: Metrics collection infrastructure ready for instrumentation
  • **Agent 2: Logging Pipeline**: Deploy centralized logging with Loki and Vector
  • Focus: Log aggregation, parsing, storage, and retention policies
  • Tools: Vector configuration, Loki deployment, S3 integration
  • Output: Centralized logging pipeline with structured log processing
  • **Agent 3: Distributed Tracing**: Deploy Jaeger with OpenTelemetry collectors
  • Focus: Trace collection, sampling, storage, and correlation
  • Tools: OpenTelemetry Operator, Jaeger deployment, trace backends
  • Output: Distributed tracing infrastructure for request flow analysis
  • **Agent 4: Visualization Platform**: Deploy Grafana with comprehensive dashboards
  • Focus: Dashboard provisioning, data source configuration, alerting UI
  • Tools: Grafana Helm chart, dashboard-as-code, plugin management
  • Output: Unified visualization platform with pre-configured dashboards
  • **Agent 5: Infrastructure Monitoring**: Deploy node and Kubernetes monitoring
  • Focus: Node Exporter, kube-state-metrics, service discovery
  • Tools: DaemonSets, ServiceMonitors,
Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin