Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/virt-about-readiness-liveness-probes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ You can configure readiness and liveness probes by setting the `spec.readinessPr
HTTP GET:: The probe determines the health of the VMI by using a web hook. The test is successful if the HTTP response code is between 200 and 399. You can use an HTTP GET test with applications that return HTTP status codes when they are completely initialized.

TCP socket:: The probe attempts to open a socket to the VMI. The VMI is only considered healthy if the probe can establish a connection. You can use a TCP socket test with applications that do not start listening until initialization is complete.

Guest agent ping:: The probe uses the `guest-ping` command to determine if the QEMU guest agent is running on the virtual machine.
50 changes: 50 additions & 0 deletions modules/virt-define-guest-agent-ping-probe.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Module included in the following assemblies:
//
// * virt/logging_events_monitoring/virt-monitoring-vm-health.adoc

:_content-type: PROCEDURE
[id="virt-define-guest-agent-ping-probe_{context}"]

= Defining a guest agent ping probe

Define a guest agent ping probe by setting the `spec.readinessProbe.guestAgentPing` field of the virtual machine instance (VMI) configuration.

:FeatureName: The guest agent ping probe
include::snippets/technology-preview.adoc[]

.Prerequisites

* The QEMU guest agent must be installed and enabled on the virtual machine.

.Procedure

. Include details of the guest agent ping probe in the VMI configuration file. For example:
+

.Sample guest agent ping probe
[source,yaml]
----
# ...
spec:
readinessProbe:
guestAgentPing: {} <1>
initialDelaySeconds: 120 <2>
periodSeconds: 20 <3>
timeoutSeconds: 10 <4>
failureThreshold: 3 <5>
successThreshold: 3 <6>
# ...
----
<1> The guest agent ping probe to connect to the VMI.
<2> Optional: The time, in seconds, after the VMI starts before the guest agent probe is initiated.
<3> Optional: The delay, in seconds, between performing probes. The default delay is 10 seconds. This value must be greater than `timeoutSeconds`.
<4> Optional: The number of seconds of inactivity after which the probe times out and the VMI is assumed to have failed. The default value is 1. This value must be lower than `periodSeconds`.
<5> Optional: The number of times that the probe is allowed to fail. The default is 3. After the specified number of attempts, the pod is marked `Unready`.
<6> Optional: The number of times that the probe must report success, after a failure, to be considered successful. The default is 1.

. Create the VMI by running the following command:
+
[source,terminal]
----
$ oc create -f <file_name>.yaml
----
7 changes: 7 additions & 0 deletions virt/logging_events_monitoring/virt-monitoring-vm-health.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ toc::[]
A virtual machine instance (VMI) can become unhealthy due to transient issues such as connectivity loss, deadlocks, or problems with external dependencies. A health check periodically performs diagnostics on a VMI by using any combination of the readiness and liveness probes.

include::modules/virt-about-readiness-liveness-probes.adoc[leveloffset=+1]

include::modules/virt-define-http-readiness-probe.adoc[leveloffset=+1]

include::modules/virt-define-tcp-readiness-probe.adoc[leveloffset=+1]

include::modules/virt-define-http-liveness-probe.adoc[leveloffset=+1]

include::modules/virt-define-guest-agent-ping-probe.adoc[leveloffset=+1]

include::modules/virt-template-vm-probe-config.adoc[leveloffset=+1]


[id="additional-resources_monitoring-vm-health"]
[role="_additional-resources"]
== Additional resources
Expand Down