Reads
Mimir (PromQL) and Loki (LogQL), each with its tenants, over an in-cluster service or HTTPS.
Catalog
The rules Fleetscope adds with Add recommended rules, for each tenant you pick. They come turned off: backtest one, then turn it on. Every query below is the one the app runs.
| Group | Watches | Needs in Mimir or Loki | Rules |
|---|---|---|---|
| Servers | CPU, memory, disks, reboots, clocks and the kernel of every server. | node-exporter (Alloy or Prometheus) on VMs and nodes | 17 |
| Kubernetes | Pods, workloads, volumes, nodes, capacity, routes and certificates. | kube-state-metrics, cAdvisor and the kubelet; cert-manager and Gateway API metrics for their rules | 32 |
| MongoDB | Members, primaries, elections, replication lag, the oplog, tickets and connections. | mongodb_exporter, with replica set metrics for the rules of a replica set | 11 |
| Docker on VMs | Containers that restart, run out of memory or stop. | cAdvisor of the VM (for example in Alloy) | 4 |
| Logs | Connection and crash errors in the logs of a service, 5xx through Envoy and nginx, and logs that stopped. | Loki | 6 |
| Domains and SSL | Domains that fail or answer 5xx, and certificates close to expiry. | the blackbox exporter probing your domains | 3 |
| Argo CD | Applications Missing, Degraded or out of sync. | the metrics of Argo CD | 2 |
Mimir (PromQL) and Loki (LogQL), each with its tenants, over an in-cluster service or HTTPS.
Grafana Explore: every alert links to its query on the data source of its tenant.
Telegram (with topics), Slack and Google Chat, with a backup channel when one fails.
No rule matches.
Warning > 80%, Critical > 90% for 5 min
The CPU of the server has been busy for a quarter of an hour. Find what uses it, look for a runaway or a job that runs too often, or add capacity.
# used
sum by (cluster, node) (1 - rate(node_cpu_seconds_total{mode="idle"}[15m]))
# max (the number is 100 × used ÷ max)
count by (cluster, node) (node_cpu_seconds_total{mode="idle"})Warning > 85%, Critical > 95% for 5 min
The server uses almost all its memory and the kernel will start killing processes. Find the biggest consumers, or add memory.
# used
sum by (cluster, node) (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)
# max (the number is 100 × used ÷ max)
sum by (cluster, node) (node_memory_MemTotal_bytes)Warning > 80%, Critical > 90% for 5 min
A disk of the server is almost full (one alert for each disk, however many places it is mounted on). Clean old logs, images and temporary files, or grow the disk.
# used
max by (cluster, node, device) (node_filesystem_size_bytes{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"} - node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"})
# max (the number is 100 × used ÷ max)
max by (cluster, node, device) (node_filesystem_size_bytes{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"})Fires when the condition holds for 2 min · Critical
Mimir cannot scrape the node-exporter of the VM: it is down, rebooting, or cut off from the network. Check it in the cloud console. A Kubernetes node is watched by "Kubernetes node not ready" instead: a node the autoscaler removed would stay open here.
max by (cluster, node, instance) (up{job=~".*node.?exporter.*", cluster=""})Warning > 90%, Critical > 97% for 5 min
A disk of the server is running out of inodes: new files cannot be created even with free space. Find the directories with many small files (caches, sessions, logs).
# used
max by (cluster, node, device) (node_filesystem_files{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"} - node_filesystem_files_free{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"})
# max (the number is 100 × used ÷ max)
max by (cluster, node, device) (node_filesystem_files{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"})Warning > 50%, Critical > 80% for 10 min
The server swaps: it has run out of memory and is slow. Find what uses the memory, or add memory.
# used
sum by (cluster, node) (node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes)
# max (the number is 100 × used ÷ max)
sum by (cluster, node) (node_memory_SwapTotal_bytes)Warning > 1%, Critical > 5% for 5 min
Every process of the server waits for memory part of the time (memory pressure): it is close to running out. Find what grows, or add memory.
100 * max by (cluster, node) (rate(node_pressure_memory_stalled_seconds_total[10m]))Warning > 20%, Critical > 50% for 5 min
Every process of the server waits for the disk a large part of the time. Find what reads or writes, or use a faster disk.
100 * max by (cluster, node) (rate(node_pressure_io_stalled_seconds_total[10m]))Warning > 5/s for 10 min
The network cards of the server count errors. Check the interface, the driver and the link.
sum by (cluster, node) (rate(node_network_receive_errs_total[5m]) + rate(node_network_transmit_errs_total[5m]))Warning < 600 s
The server started less than 10 minutes ago. Check whether it was planned (an upgrade, a Spot reclaim) or a crash. A Kubernetes node the autoscaler has just added is not counted.
(time() - max by (cluster, node) (node_boot_time_seconds)) unless on (cluster, node) (time() - max by (cluster, node) (kube_node_created) < 1800)Warning > 0.1 s, Critical > 1 s for 10 min
The clock of the server is off: TLS, tokens and logs depend on it. Check the time service (chrony, systemd-timesyncd).
max by (cluster, node) (abs(node_timex_offset_seconds))Fires when the condition holds for 10 min · Warning
The node-exporter of the VM sends nothing to Mimir any more: it was stopped, the VM was removed, or Alloy no longer scrapes it. Its CPU, memory and disk rules are blind. A Warning, because a VM that was removed on purpose does the same.
max by (node) (max_over_time(node_uname_info{cluster=""}[1d])) unless max by (node) (node_uname_info{cluster=""})Warning > 0, Critical > 3
The kernel killed a process of the VM because it ran out of memory in the last 10 minutes. Find what grew (dmesg shows the victim), then raise the memory or the limit of that process.
max by (cluster, node) (increase(node_vmstat_oom_kill{cluster=""}[10m]))Warning > 80%, Critical > 95% for 5 min
The kernel table that tracks connections is almost full: new connections are dropped. Find the source of the many connections, or raise net.netfilter.nf_conntrack_max.
# used
max by (cluster, node) (node_nf_conntrack_entries)
# max (the number is 100 × used ÷ max)
max by (cluster, node) (node_nf_conntrack_entries_limit)Warning > 80%, Critical > 95% for 5 min
The server has opened almost all the file descriptors the kernel allows: programs will fail to open files or sockets. Find the process with the most open files (lsof) or raise fs.file-max.
# used
max by (cluster, node) (node_filefd_allocated)
# max (the number is 100 × used ÷ max)
max by (cluster, node) (node_filefd_maximum)Warning < 172800 s, Critical < 43200 s for 30 min
At the pace it filled over the last 6 hours, the disk runs out of space within this time. Find what grows (logs, data, images) and clean up or grow the disk.
max by (cluster, node, device) (node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"}) / clamp_min(-min by (cluster, node, device) (deriv(node_filesystem_avail_bytes{fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"}[6h])), 1)Fires when the condition holds for 5 min · Critical
A file system of the VM is mounted read-only: the kernel usually does this after disk errors, and programs can no longer write. Read dmesg, check the disk, and remount or repair it.
max by (cluster, node, device) (node_filesystem_readonly{cluster="", fstype!~"tmpfs|overlay|squashfs|nsfs|ramfs|devtmpfs|autofs|fuse.*"})Fires when the condition holds for 2 min · Critical
The node stopped reporting Ready. Check it in the cloud console and its kubelet; workloads on it are being moved.
max by (cluster, node) (kube_node_status_condition{condition="Ready",status="true"})Fires when the condition holds for 2 min · Critical
The node is short of memory, disk or process IDs and may evict pods. Free resources or add capacity.
max by (cluster, node, condition) (kube_node_status_condition{condition=~"MemoryPressure|DiskPressure|PIDPressure",status="true"})Fires when the condition holds for 5 min · Critical
The container keeps exiting. Read its previous log to see why, then fix the command, configuration or probe.
(max by (cluster, namespace, pod, container) (max_over_time(kube_pod_container_status_waiting_reason{reason="CrashLoopBackOff"}[5m]))) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Fires when the condition holds for 5 min · Critical
Check the image name and tag, and that the cluster can pull it (registry access, imagePullSecrets).
(max by (cluster, namespace, pod, container) (max_over_time(kube_pod_container_status_waiting_reason{reason=~"ImagePullBackOff|ErrImagePull"}[5m]))) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Fires when the condition holds · Critical
The container used more memory than its limit and was killed. Raise the memory limit or find what grows in it.
(sum by (cluster, namespace, pod, container) (increase(kube_pod_container_status_restarts_total[15m])) and on (cluster, namespace, pod, container) (max by (cluster, namespace, pod, container) (kube_pod_container_status_last_terminated_reason{reason="OOMKilled"}) == 1)) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Warning >= 3, Critical >= 10
The container restarted several times in the last hour. Read its previous log and its events to find the cause.
(sum by (cluster, namespace, pod) (increase(kube_pod_container_status_restarts_total[1h]))) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Fires when the condition holds for 5 min · Critical
The pod has stayed Pending for more than 5 minutes (a pod running its init containers is not counted). Check its events: usually not enough CPU or memory, a node selector nothing matches, or an unbound volume.
(max by (cluster, namespace, pod) (kube_pod_status_phase{phase="Pending"}) unless on (cluster, namespace, pod) (max by (cluster, namespace, pod) (kube_pod_init_container_status_running) == 1)) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Warning > 90%, Critical > 97% for 5 min
The container uses almost all the memory it may use and will be OOMKilled at the limit. Raise the limit or find what grows.
# used
(max by (cluster, namespace, pod, container) (container_memory_working_set_bytes{container!="",container!="POD"})) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)
# max (the number is 100 × used ÷ max)
(max by (cluster, namespace, pod, container) (kube_pod_container_resource_limits{resource="memory"})) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Warning > 0 for 10 min
Some replicas are not ready. Look at the pods of the workload for crashes, pending pods or failing readiness probes.
max by (cluster, namespace, deployment) (kube_deployment_status_replicas_unavailable)Fires when the condition holds for 30 min · Critical
The autoscaler has run as many replicas as it may for 30 minutes. If the load keeps growing it cannot follow: raise maxReplicas or the requests it scales on.
max by (cluster, namespace, horizontalpodautoscaler) (kube_horizontalpodautoscaler_status_current_replicas) - max by (cluster, namespace, horizontalpodautoscaler) (kube_horizontalpodautoscaler_spec_max_replicas)Warning > 85%, Critical > 95% for 5 min
The persistent volume is almost full and the workload will fail to write. Grow the claim or clean the data.
# used
max by (cluster, namespace, persistentvolumeclaim) (kubelet_volume_stats_used_bytes)
# max (the number is 100 × used ÷ max)
max by (cluster, namespace, persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes)Warning > 85%, Critical > 92% for 10 min
The pods ask for most of the CPU the nodes can give: the next pod or a rollout may stay Pending. Add nodes or lower requests far above real use.
# used
sum by (cluster) (kube_pod_container_resource_requests{resource="cpu"} * on (cluster, namespace, pod) group_left () (max by (cluster, namespace, pod) (kube_pod_status_phase{phase=~"Pending|Running"}) == 1))
# max (the number is 100 × used ÷ max)
sum by (cluster) (kube_node_status_allocatable{resource="cpu"} unless on (cluster, node) (max by (cluster, node) (kube_node_spec_unschedulable) == 1))Warning > 85%, Critical > 92% for 10 min
The pods ask for most of the memory the nodes can give: the next pod or a rollout may stay Pending. Add nodes or lower requests far above real use.
# used
sum by (cluster) (kube_pod_container_resource_requests{resource="memory"} * on (cluster, namespace, pod) group_left () (max by (cluster, namespace, pod) (kube_pod_status_phase{phase=~"Pending|Running"}) == 1))
# max (the number is 100 × used ÷ max)
sum by (cluster) (kube_node_status_allocatable{resource="memory"} unless on (cluster, node) (max by (cluster, node) (kube_node_spec_unschedulable) == 1))Fires when the condition holds for 2 min · Critical
None of the replicas of the workload is available: the service is down. Look at its pods for crashes, pending pods or failing probes.
(max by (cluster, namespace, deployment) (kube_deployment_status_replicas_available) == 0) and on (cluster, namespace, deployment) (max by (cluster, namespace, deployment) (kube_deployment_spec_replicas) > 0)Warning > 0 for 10 min
Some replicas of the StatefulSet are not ready. Look at its pods and their volumes.
max by (cluster, namespace, statefulset) (kube_statefulset_status_replicas) - max by (cluster, namespace, statefulset) (kube_statefulset_status_replicas_ready)Warning > 0 for 10 min
The DaemonSet does not run on some nodes. Look at its pods on those nodes (taints, resources, image).
max by (cluster, namespace, daemonset) (kube_daemonset_status_number_unavailable)Fires when the condition holds for 10 min · Warning
The pod runs but fails its readiness probe, so it gets no traffic. Look at the probe and the log of the pod.
(max by (cluster, namespace, pod) (kube_pod_status_ready{condition="false"}) and on (cluster, namespace, pod) (max by (cluster, namespace, pod) (kube_pod_status_phase{phase="Running"}) == 1)) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Warning > 0
A Job failed: it ran out of retries or of time (a pod that failed before a retry succeeded does not count). Read the log of its last pod; a CronJob runs it again at its next time.
max by (cluster, namespace, job_name) (kube_job_failed{condition="true"})Warning > 50% for 15 min
The container hits its CPU limit and is slowed down most of the time. Raise the CPU limit or find what uses the CPU.
(100 * sum by (cluster, namespace, pod, container) (rate(container_cpu_cfs_throttled_periods_total{container!=""}[5m])) / sum by (cluster, namespace, pod, container) (rate(container_cpu_cfs_periods_total{container!=""}[5m]))) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Warning > 90%, Critical > 97% for 5 min
The persistent volume is running out of inodes: new files cannot be created. Find the directories with many small files.
# used
max by (cluster, namespace, persistentvolumeclaim) (kubelet_volume_stats_inodes_used)
# max (the number is 100 × used ÷ max)
max by (cluster, namespace, persistentvolumeclaim) (kubelet_volume_stats_inodes)Fires when the condition holds for 5 min · Critical
kube-state-metrics of the cluster sends nothing to Mimir any more: every Kubernetes rule of the cluster is blind. Check kube-state-metrics and the Alloy that scrapes it.
count by (cluster) (max_over_time(kube_node_info[1d])) unless count by (cluster) (kube_node_info)Fires when the condition holds for 3 min · Critical
An Ingress sends traffic to a Service that has no ready endpoint: no pod matches its selector, none is ready, or the Service is gone. The domain answers with errors while the pods may look fine. Check the selector of the Service and the readiness of its pods.
count by (cluster, namespace, ingress, service_name) (kube_ingress_path{service_name!=""}) unless on (cluster, namespace, service_name) count by (cluster, namespace, service_name) (label_replace(label_replace(kube_endpoint_address{ready="true"}, "service_name", "$1", "endpoint", "(.+)"), "service_name", "$1", "exported_endpoint", "(.+)"))Fires when the condition holds for 5 min · Critical
The Gateway is not Accepted or not Programmed by its controller: the routes on it may not serve. Read the conditions of the Gateway (kubectl describe gateway) and the log of the controller (Envoy Gateway).
min by (cluster, namespace, name, type) (gatewayapi_gateway_status{type=~"Accepted|Programmed"})Fires when the condition holds for 15 min · Warning
cert-manager reports the Certificate as not ready: the issuance or the renewal failed, and the Secret may hold an expired certificate. Read the events of the Certificate and of its Order or CertificateRequest (kubectl describe certificate).
max by (cluster, namespace, name) (certmanager_certificate_ready_status{condition="False"})Warning < 1209600 s, Critical < 432000 s
A Certificate of cert-manager expires soon and has not been renewed: the automatic renewal is failing. Read the events of the Certificate and the log of cert-manager.
min by (cluster, namespace, name) (certmanager_certificate_expiration_timestamp_seconds) - time()Warning > 0 for 15 min
Fewer pods are healthy than the PodDisruptionBudget asks for: voluntary disruptions, such as a node upgrade, are blocked, and the workload has less redundancy than intended. Look at the pods the budget selects.
max by (cluster, namespace, poddisruptionbudget) (kube_poddisruptionbudget_status_desired_healthy - kube_poddisruptionbudget_status_current_healthy)Fires when the condition holds for 5 min · Warning
The rollout of the Deployment passed its progress deadline: the new pods do not become ready (image, probe, resources or quota). The old pods may still serve. Look at the new ReplicaSet and its pods.
max by (cluster, namespace, deployment) (kube_deployment_status_condition{condition="Progressing",status="false"})Warning < 172800 s, Critical < 43200 s for 30 min
At the pace it filled over the last 6 hours, the volume runs out of space within this time. Grow the claim or clean up before it is full.
max by (cluster, namespace, persistentvolumeclaim) (kubelet_volume_stats_available_bytes) / clamp_min(-min by (cluster, namespace, persistentvolumeclaim) (deriv(kubelet_volume_stats_available_bytes[6h])), 1)Fires when the condition holds for 10 min · Warning
The claim is Pending (no volume matches it, or the StorageClass cannot make one) or Lost (its volume is gone). The pods that mount it cannot start. Read the events of the claim.
max by (cluster, namespace, persistentvolumeclaim, phase) (kube_persistentvolumeclaim_status_phase{phase=~"Pending|Lost"})Fires when the condition holds for 5 min · Critical
Kubernetes cannot create the container: a ConfigMap or Secret it reads is missing, the image name is wrong, or the runtime refused it. Read the events of the pod.
(max by (cluster, namespace, pod, container, reason) (max_over_time(kube_pod_container_status_waiting_reason{reason=~"CreateContainerConfigError|CreateContainerError|InvalidImageName|RunContainerError"}[5m]))) * on (cluster, namespace, pod) group_left (node) max by (cluster, namespace, pod, node) (kube_pod_info)Fires when the condition holds for 2 h · Warning
The node takes no new pod for more than 2 hours. Uncordon it if the maintenance is over, or drain and remove it.
max by (cluster, node) (kube_node_spec_unschedulable)Fires when the condition holds for 15 min · Warning
The autoscaler cannot get the metrics it scales on, so it does not scale. Check metrics-server (or the adapter of custom metrics) and the requests of the pods.
max by (cluster, namespace, horizontalpodautoscaler) (kube_horizontalpodautoscaler_status_condition{condition="ScalingActive",status="false"})Fires when the condition holds for 1 min · Critical
The exporter cannot reach mongod: it is stopped, crashed or refusing connections. Check the service on the VM and its log.
max by (cluster_name, node) (mongodb_up)Warning > 120 s, Critical > 600 s for 2 min
A secondary is behind the primary. Look for a slow disk or network on it, or a burst of writes on the primary.
max by (cluster_name, name) (mongodb_mongod_replset_member_replication_lag{state="SECONDARY"})Warning > 10, Critical > 25 for 10 min
Operations wait for a lock. Find the slow queries or the writes that hold it.
sum by (cluster_name, node) (avg_over_time(mongodb_mongod_global_lock_current_queue[5m]))Fires when the condition holds for 1 min · Critical
No member of the replica set is primary: writes fail. Check which members are up and the log of the last primary.
count by (cluster_name) (mongodb_mongod_replset_my_state == 1) or (count by (cluster_name) (mongodb_mongod_replset_my_state) * 0)Warning > 80%, Critical > 90% for 5 min
mongod accepts few more connections. Find the clients that open too many (pool size) or raise maxIncomingConnections.
# used
max by (cluster_name, node) (mongodb_connections{state="current"})
# max (the number is 100 × used ÷ max)
max by (cluster_name, node) (mongodb_connections{state="current"}) + max by (cluster_name, node) (mongodb_connections{state="available"})Fires when the condition holds for 5 min · Critical
The mongodb-exporter of the member sends nothing to Mimir any more: every MongoDB rule of it is blind. Check the exporter on the VM and the Alloy that scrapes it.
max by (cluster_name, node) (max_over_time(mongodb_up[1d])) unless max by (cluster_name, node) (mongodb_up)Fires when the condition holds for 2 min · Critical
A member of the replica set is neither primary, secondary nor arbiter: it is down, recovering, rolling back or starting. The replica set has less redundancy until it is back. Read the log of mongod on that member.
(max by (cluster_name, name) (mongodb_mongod_replset_member_state) != 1 != 2 != 7) * 0 + 1Warning > 0
The replica set elected a primary in the last 15 minutes: the former primary stepped down, failed or lost the network. Check why, and that the applications reconnected.
max by (cluster_name) (increase(mongodb_mongod_replset_term[15m]))Warning < 600 s
mongod started less than 10 minutes ago. Check whether it was planned or a crash (the log of mongod, an OOM kill of the VM).
min by (cluster_name, node) (mongodb_instance_uptime_seconds)Warning < 86400 s, Critical < 21600 s for 30 min
The oplog holds less than this time of writes: a secondary that is down longer than that cannot catch up and needs a full resync. Grow the oplog (replSetResizeOplog) or lower the write load.
max by (cluster_name, node) (mongodb_mongod_replset_oplog_head_timestamp - mongodb_mongod_replset_oplog_tail_timestamp)Warning > 80%, Critical > 95% for 5 min
Almost all the read or write tickets of WiredTiger are in use: new operations wait in a queue. Look for slow operations, a missing index or a disk that cannot keep up.
# used
max by (cluster_name, node, type) (mongodb_mongod_wiredtiger_concurrent_transactions_out_tickets)
# max (the number is 100 × used ÷ max)
max by (cluster_name, node, type) (mongodb_mongod_wiredtiger_concurrent_transactions_total_tickets)Warning >= 2, Critical >= 4
The container started again several times in 15 minutes: it crashes and Docker (or its restart policy) starts it again. Read its log (docker logs) and the exit code (docker inspect).
max by (node, container) (changes(container_start_time_seconds{job=~".*cadvisor.*", container!="", pod=""}[15m]))Critical > 0
The kernel killed a process of the container because it went over its memory limit in the last 10 minutes. Raise the limit (--memory) or find what grows in it.
max by (node, container) (increase(container_oom_events_total{job=~".*cadvisor.*", container!="", pod=""}[10m]))Warning > 90%, Critical > 97% for 5 min
The container uses almost all the memory its limit allows: next it is killed. Raise the limit or find what grows in it.
# used
max by (node, container) (container_memory_working_set_bytes{job=~".*cadvisor.*", container!="", pod=""})
# max (the number is 100 × used ÷ max)
max by (node, container) (container_spec_memory_limit_bytes{job=~".*cadvisor.*", container!="", pod=""} > 0)Fires when the condition holds for 5 min · Warning
A container that ran in the last hour is gone: it stopped, exited or was removed. If it should run, start it and read its log; a container of a CI job or one removed on purpose closes by itself within the hour.
max by (node, container) (max_over_time(container_memory_working_set_bytes{job=~".*cadvisor.*", container!="", pod=""}[1h])) unless max by (node, container) (container_memory_working_set_bytes{job=~".*cadvisor.*", container!="", pod=""})Warning > 10, Critical > 30
The service writes that it cannot reach something (a database, another service, DNS). The newest line is in the alert: check that the target runs and is reachable, its address and its limits.
sum by (cluster, namespace, app) (count_over_time({cluster=~".+"} != "upstream_status" != "response_flags" !~ "count_over_time|/loki/api/" |~ `(?i)(connection refused|connection reset|connection timed out|could not connect|couldn't connect|failed to connect|unable to connect|no route to host|i/o timeout|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EHOSTUNREACH|no such host|temporary failure in name resolution|too many connections|server selection error|server selection timeout|server selection timed out|MongoServerSelectionError|MongoNetworkError|communications link failure|connection is not available|getaddrinfo ENOTFOUND|name or service not known|database system is starting up)` [5m]))Warning > 0, Critical > 10
The service writes an error that kills it (a panic, a fatal error, out of memory). The newest line is in the alert: read the lines around it on the Loki page.
sum by (cluster, namespace, app) (count_over_time({cluster=~".+"} |~ `(panic:|fatal error:|OutOfMemoryError|Unhandled exception|SIGSEGV|segmentation fault|Out of memory|out of memory: Killed process)` !~ "count_over_time|/loki/api/" [5m]))Fires when the condition holds for 5 min · Critical
The cluster sent logs to Loki an hour ago and none in the last 10 minutes: every log rule of it is blind. Check the Alloy that ships the logs of the cluster.
sum by (cluster) (count_over_time({cluster=~".+"}[1h] offset 15m)) unless sum by (cluster) (count_over_time({cluster=~".+"}[10m]))Warning > 0, Critical > 10
Envoy answers the route with no healthy upstream (UH) or cannot connect to it (UF): the Service behind the HTTPRoute has no ready pod, or its pods refuse connections. Check the backendRefs of the route, the selector of the Service and the readiness of its pods.
sum by (cluster, route_namespace, route) (count_over_time({cluster=~".+"} |= `response_flags` !~ "count_over_time|/loki/api/" | regexp `"route_name":"httproute/(?P<route_namespace>[^/]+)/(?P<route>[^/]+)/` | json flags="response_flags" | flags=~`.*(UH|UF).*` [5m]))Warning >= 5%, Critical >= 20%
Many requests to the domain end in a 5xx through Envoy Gateway (more than 50 requests in 5 minutes). Find the service behind it and read its log; a deploy or a dependency is the usual cause.
100 * sum by (cluster, domain) (count_over_time({cluster=~".+"} |= `response_flags` !~ "count_over_time|/loki/api/" | json domain=`[":authority"]`, code="response_code" | code >= 500 | domain != "" | domain !~ "^[0-9.:]+$" [5m])) / (sum by (cluster, domain) (count_over_time({cluster=~".+"} |= `response_flags` !~ "count_over_time|/loki/api/" | json domain=`[":authority"]` [5m])) > 50)Warning >= 5%, Critical >= 20%
Many requests to the domain end in a 5xx through the nginx proxy (more than 50 requests in 5 minutes). upstream_status in the log tells whether the service behind answered the error or could not be reached.
100 * sum by (cluster, domain) (count_over_time({cluster=~".+"} |= `upstream_status` !~ "count_over_time|/loki/api/" | json domain="host", code="status" | code >= 500 | domain != "" | domain !~ "^[0-9.:]+$" [5m])) / (sum by (cluster, domain) (count_over_time({cluster=~".+"} |= `upstream_status` !~ "count_over_time|/loki/api/" | json domain="host" [5m])) > 50)Critical >= 500 for 1 min
The domain answers with an HTTP status of 500 or more: the load balancer or the application behind it is failing. Look at the service the domain points to and its logs.
max by (cluster, job, instance) (probe_http_status_code{job=~".*blackbox.*"})Fires when the condition holds for 2 min · Critical
The probe of the domain fails without a server error: it cannot be reached, the TLS handshake fails, or it does not answer with the status the probe expects. Check the DNS, the load balancer and the service behind it; if it works from your own network, check whether it allows only some addresses.
min by (cluster, job, instance) (probe_success{job=~".*blackbox.*"}) unless on (cluster, job, instance) (max by (cluster, job, instance) (probe_http_status_code{job=~".*blackbox.*"}) >= 500)Warning < 2592000 s, Critical < 1209600 s
The TLS certificate the domain presents expires soon, or has expired. A certificate bought outside is renewed by hand, which takes an order and a change window: start now. One renewal covers every domain that uses the certificate.
min by (cluster, job, instance) (probe_ssl_earliest_cert_expiry{job=~".*blackbox.*"}) - time()Fires when the condition holds for 15 min · Critical
Some resources of the application are missing from the cluster or do not work (Degraded): the service may be down or never deployed. Open the application in ArgoCD and look at its resources that are not Healthy. A production application (a name with "-prod.") is Critical.
2 * max by (name, project, dest_namespace, health_status) (argocd_app_info{health_status=~"Missing|Degraded", name=~".*-prod[.].*"}) or max by (name, project, dest_namespace, health_status) (argocd_app_info{health_status=~"Missing|Degraded"})Fires when the condition holds for 1 h · Warning
The cluster differs from Git for more than an hour: a sync failed, auto-sync is off, or something changes the resources after the sync (an autoscaler, a controller). Sync it, or add ignoreDifferences for a field that is meant to change.
max by (name, project, dest_namespace) (argocd_app_info{sync_status="OutOfSync"})