k8s-alerts/eks and k8s-alerts/gke) that give EKS and GKE deployments operational and security alert coverage aligned with Runlayer’s managed ECS fleet:
Both modules read the structured JSON telemetry that Runlayer backend, worker, and consumer pods write to
stdout (no OTEL collector sidecar or consent flag required). The one exception is database health on EKS, which the worker publishes with cloudwatch:PutMetricData (see the IAM permission section below).
The modules are not published to a module registry or download bucket yet. Ask Runlayer Support for the module source that matches your Runlayer release, unpack it next to your Terraform, and point
source at the unpacked directory (the examples below assume ./modules/k8s-alerts/eks and ./modules/k8s-alerts/gke).audit-spool-no-data (the API spool tailer reports SpoolOldestAgeSeconds every 10 seconds, even when idle) and db-health-no-data (the worker’s database health job runs every 15 minutes). A heartbeat page means the telemetry path broke (log shipping, metric filters, IAM, LOG_LEVEL), so the other alarms in that group cannot see problems until it clears.
Amazon EKS (k8s-alerts/eks)
Why metric filters are required on EKS
Runlayer pods write single-line CloudWatch Embedded Metric Format (EMF) JSON tostdout. On EKS with the default amazon-cloudwatch-observability add-on (Fluent Bit), container stdout JSON is nested inside a log_processed field:
_aws is nested under log_processed instead of top-level, CloudWatch Logs does not extract EMF metrics automatically. By default (create_metric_filters = true), the EKS module creates aws_cloudwatch_log_metric_filter resources that extract $.log_processed.* into the exact Runlayer/* namespaces and dimension schemas expected by the alarms.
If your cluster uses a custom log shipper that emits raw top-level EMF into CloudWatch Logs, set
create_metric_filters = false to avoid double-counting.Terraform example (EKS)
Shared multi-tenant EKS clusters
CloudWatch Logs caps each log group at 100 metric filters. On a shared multi-tenant EKS cluster where multipleRunlayerInstance tenants log to the same /aws/containerinsights/<cluster>/application log group:
- Deploy one cluster-wide filter-only module instance with
create_metric_filters = true,scope_metric_filters_to_customer_id = false, andcreate_alarms = false(enabling the union of component flags used on the cluster). Its filters emit metrics keyed dynamically by$.log_processed.CustomerId. - Set
create_metric_filters = falseand a distinctname_prefix(for example the tenant name) on every per-tenant alarm module instance targeting that cluster, since alarm names are<name_prefix>-<alarm>and must be unique per account and region, and enable the optional component flags (for exampleenable_siem_export_alarms,enable_audit_consumer_alarms,enable_session_materializer_alarms) matching the components that tenant runs—optional flags default tofalseon tenant instances too. Leavingcreate_metric_filters = trueon tenant instances alongside an unscoped filter instance publishes every matching log event twice and double-countsSum/SampleCountmetrics.
IAM permission for enable_db_health_alarms on EKS
Database health signals (InvalidIndexCount, AuditlogDefaultPartitionRows, PartmanMaintenanceFailedRuns, PartmanRunwayDays) are published by the worker via cloudwatch:PutMetricData rather than stdout EMF. Grant your worker IRSA role permission scoped to the Runlayer/DatabaseHealth namespace:
Google GKE (k8s-alerts/gke)
GKE’s Cloud Logging agent parses single-line stdout JSON directly into jsonPayload. The GKE module creates Cloud Logging user-defined metrics (google_logging_metric) scoped to your cluster, namespace, and CUSTOMER_ID, paired with google_monitoring_alert_policy resources.
- Database health on GKE: the worker logs
db_health_metrics_completedatINFOlevel withinvalid_index_count,auditlog_default_rows,partman_failed_runs, andpartman_runway_dayson every 15-minute run even without AWS credentials, soenable_db_health_alarms = trueworks natively from Cloud Logging. Keep the worker atLOG_LEVEL=INFO(orDEBUG)—settingLOG_LEVEL=WARNINGor higher suppressesdb_health_metrics_completedand silences all four GKE database-health policies (db-health-no-datathen pages). Unlike the fleet’s consecutive-period alarms, GKE counts breaching runs in a single jitter-tolerant window (2100sfor 2 runs /3000sfor 3 runs) so 1s of cron jitter cannot reset the alert; this intentionally also pages on intermittent failures within that window (for example1, 0, 1at minutes0, 15, 30). - SIEM export on GKE:
audit-log-siem-export-failedalerts ongcs_upload,export_prepare,dead_letter, andorganization_pinfaults,audit-log-siem-export-orgrecalerts hourly onorganization_recordfaults, andaudit-log-siem-export-dead-lettersalerts on per-recordvalidateandenrichdead letters. - Confirming heartbeats armed on GKE: Cloud Monitoring only arms metric-absence policies (
condition_absent) after the backing metric writes at least one point following policy creation or modification—unlike EKS (treat_missing_data = "breaching"), a misconfiguredcluster_name,namespace_name, orcustomer_idfilter will leave a heartbeat unarmed instead of paging. After applying or modifying the module, check Cloud Monitoring Metrics Explorer and confirm bothlogging.googleapis.com/user/<name_prefix>-audit-spool-no-dataandlogging.googleapis.com/user/<name_prefix>-db-health-no-data(allow up to 15 minutes for the first worker run) report datapoints.
Terraform example (GKE)
Alert coverage by component flag
Minimum backend release for spool loss and fallback alarms:
audit-spool-dead-letters-pruned (SpoolDeadPruned) and audit-spool-fallback-sustained (SpoolFallback) filter on the backend emitter’s top-level Rollup: true EMF property so excluded reasons (such as retention_exported and spool_closed) stay owned by the backend. Both alarms need a backend image that emits Rollup: true, which ships in the same Runlayer release as these modules: use the module source Support gives you for your release, and ask Support if you are unsure whether your backend image is new enough. Against older backend images that do not emit Rollup, those two filters match no events and their notBreaching alarms stay silent even while every other alarm in the module functions normally.Multi-org SIEM export reader scope (ReaderScope)
When components.siemExport.enabled is true, the Runlayer Operator automatically sets AUDIT_LOG_SIEM_EXPORT_DEPLOYED=true on the worker so ExportOrganizations is emitted hourly. By default, AUDIT_LOG_SIEM_EXPORT_READER_SCOPE is unset and reports ReaderScope=bucket, which causes audit-log-siem-export-multi-org-shared-readers and audit-log-siem-export-multi-org-batch-shared-readers to alert whenever more than one organization exports into the same bucket.
To clear those alarms on a multi-org deployment:
- Either pin export to a single organization via
AUDIT_LOG_SIEM_EXPORT_ORGANIZATION_ID, or - Switch
AUDIT_LOG_SIEM_EXPORT_KEY_LAYOUT=org_partitioned, verify every S3/GCS reader is restricted to a singleorganization_id=<uuid>/prefix (never the bucket root), and then setAUDIT_LOG_SIEM_EXPORT_READER_SCOPE=organizationviaspec.extraEnvon yourRunlayerInstance.
Related docs
Operator deployment guide
Install the Runlayer Operator and configure components
Monitoring
Platform observability and alerting overview
Shared responsibility
Operational ownership split for self-hosted deployments
Workload identity
IRSA and GKE Workload Identity permissions