Status Report
The platform’s health now, in one report: everything that the status services read, and what looks wrong.
platform_status()reads the environment’s pods and the cluster’s nodes, with their CPU and memory use, the namespace’s warning events (cluster), the dashboard’s health checks, the Celery queues and the database’s load (platform), and the status pages of the AI providers and of AWS (feeds). Its report starts with its observations: what looks wrong, in plain sentences, fromobservations().eks_status()reads the cluster as the cloud provider sees it: the control plane, the node groups, the add-ons and their available updates, and the provider’s insights, fromget_kubernetes_cluster_health(), and the recent AWS events of the platform’s region.
The MCPServer’s staff-only tools platform_status and eks_status
(smarter.apps.mcpserver.protocol.tools.status) format these reports as Markdown. Nothing
adds cloud monitoring costs: the data comes from Kubernetes, metrics-server, the platform’s own
services, the EKS api, and public status pages.
Note
Experimental. The MCPServer was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental, and will be documented.
- smarter.apps.mcpserver.services.status.report.DATABASE_BUSY_PERCENT = 80
The share of the database’s connection limit in use at which the database is an observation.
- class smarter.apps.mcpserver.services.status.report.EksStatus(health, region, aws_events, unread_feeds)[source]
Bases:
objectThe cluster, as the cloud provider sees it, as
eks_status()returns it.- __init__(health, region, aws_events, unread_feeds)
- health: ClusterHealth
The cluster’s control plane, node groups, add-ons and insights.
- region: str
The platform’s AWS region, from
platform_region().
- smarter.apps.mcpserver.services.status.report.HIGH_USE_PERCENT = 90
The use, as a percentage of what is allowed, at which a pod’s memory, or a node’s CPU or memory, is an observation.
A pod above its memory limit is killed (
OOMKilled), and a node that is full cannot take new pods.
- class smarter.apps.mcpserver.services.status.report.PlatformStatus(namespace, region, snapshot, checks, depths, database, providers, aws_events, unread_feeds, observations)[source]
Bases:
objectThe platform’s health now, as
platform_status()returns it.- __init__(namespace, region, snapshot, checks, depths, database, providers, aws_events, unread_feeds, observations)
- checks: list[tuple[str, bool]]
each one’s name, and whether it passed.
- Type:
The dashboard’s health checks
- database: DatabaseLoad | None
The database’s load, or None if it could not be read.
- depths: dict[str, int | None]
The number of tasks waiting in each Celery queue, or None for a queue that could not be read.
- observations: list[str]
What looks wrong, in plain sentences, from
observations().
- providers: list[ProviderStatus]
The AI providers’ status pages.
- region: str
The platform’s AWS region, from
platform_region().
- snapshot: ClusterSnapshot
The environment’s pods, the cluster’s nodes, and the namespace’s warning events.
- smarter.apps.mcpserver.services.status.report.QUEUE_BACKLOG = 50
the workers are behind.
- Type:
The number of tasks waiting in a Celery queue at which the queue is an observation
- smarter.apps.mcpserver.services.status.report.eks_status()[source]
Read the cluster’s health from the cloud provider, and the recent AWS events of its region.
Side effects: read-only calls to the EKS api (
DescribeCluster,ListNodegroups,DescribeNodegroup,ListAddons,DescribeAddon,DescribeAddonVersionsandListInsights), and up to two HTTPS GETs of AWS status feeds, which are cached for a minute.- Return type:
- Returns:
The cluster’s health, and the region’s AWS events.
- Raises:
InfrastructureNotReadyError – If the cloud provider is not ready.
SmarterInfrastructureError – If the cluster cannot be described.
- smarter.apps.mcpserver.services.status.report.node_observations(nodes)[source]
Describe what is wrong with the cluster’s nodes.
A node is an observation when it is not ready, reports a pressure condition, e.g.
MemoryPressure, is cordoned, or uses at leastHIGH_USE_PERCENTof its CPU or memory.- Parameters:
nodes (
list[NodeStatus]) – The nodes, fromcluster_snapshot().- Return type:
- Returns:
One sentence per problem, or an empty list if there is none.
- smarter.apps.mcpserver.services.status.report.observations(snapshot, checks, depths, database, providers, aws_events)[source]
Describe everything that looks wrong, for the top of the platform’s status report.
It gathers the observations of the pods, the nodes, the warning events, the backing services and the upstream status pages, and the parts of the cluster that could not be read.
- Parameters:
snapshot (
ClusterSnapshot) – The pods, nodes and warning events, fromcluster_snapshot().checks (
list[tuple[str,bool]]) – The dashboard’s health checks.database (
DatabaseLoad|None) – The database’s load, or None if it could not be read.providers (
list[ProviderStatus]) – The AI providers’ status.
- Return type:
- Returns:
One sentence per problem, or an empty list if nothing looks wrong.
- smarter.apps.mcpserver.services.status.report.platform_region()[source]
Return the platform’s AWS region, for the AWS status feeds and the report.
smarter_settings.aws_regionis None when no region is configured. It is then reported, and put in the feeds’ urls, asNone, as the tools have always done. No AWS feed exists for a region of that name.- Return type:
- Returns:
The region, e.g.
us-east-2, or"None"if none is configured.
- smarter.apps.mcpserver.services.status.report.platform_status(minutes)[source]
Read the platform’s health now, and what looks wrong.
Side effects: five
kubectl getcalls, aSELECT 1and twoSHOWqueries on the database, a value written to and deleted from the cache, a ping of the Celery workers, a connection to the Celery broker, and up to five HTTPS GETs of public status pages, which are cached for a minute. Nothing in the cluster, the database or the queues is changed.- Parameters:
minutes (
int) – How far back to read Kubernetes warning events.- Return type:
- Returns:
Everything that was read, and the observations. A part that cannot be read is named in the observations, and the others are still read.
- smarter.apps.mcpserver.services.status.report.pod_observations(pods)[source]
Describe what is wrong with the environment’s pods.
A pod is an observation when it is not ready, reports a problem, e.g.
CrashLoopBackOff, has restarted, or uses at leastHIGH_USE_PERCENTof its memory limit.- Parameters:
pods (
list[PodStatus]) – The pods, fromcluster_snapshot().- Return type:
- Returns:
One sentence per problem, or an empty list if there is none.
- smarter.apps.mcpserver.services.status.report.read_database()[source]
Read the database’s load, or report that it could not be read.
- Return type:
- Returns:
The load, or None if the database could not be queried. The failure is logged, and becomes an observation.
- smarter.apps.mcpserver.services.status.report.service_observations(checks, depths, database)[source]
Describe what is wrong with the platform’s backing services.
A failed health check is an observation, and so is a Celery queue that could not be read or has at least
QUEUE_BACKLOGwaiting tasks, and a database with at leastDATABASE_BUSY_PERCENTof its connections in use.- Parameters:
checks (
list[tuple[str,bool]]) – The dashboard’s health checks, fromhealth_checks().depths (
dict[str,int|None]) – The Celery queues’ depths, fromqueue_depths().database (
DatabaseLoad|None) – The database’s load, or None if it could not be read.
- Return type:
- Returns:
One sentence per problem, or an empty list if there is none.
- smarter.apps.mcpserver.services.status.report.upstream_observations(providers, aws_events)[source]
Describe the problems that the AI providers and AWS report on their status pages.
A provider whose page could not be read is not an observation: its status is unknown, not bad, and the report’s upstream section says so.
- Parameters:
providers (
list[ProviderStatus]) – The AI providers’ status, fromprovider_statuses().aws_events (
list[AwsEvent]) – The recent AWS events, fromaws_service_events().
- Return type:
- Returns:
One sentence per problem, or an empty list if there is none.