Monitoring
Monitoring allows tracking the state of a service instance on a VM. The agent checks the availability of the service instance using health check and passes the result to the configuration management service. The default health check timeout is 5 minutes.
Use monitoring as a service health check after the scripts are executed. If the service did not start after the scripts, the agent will not receive a health check and the service deployment will fail.
To configure monitoring:
-
Make sure that the manifest describes the agent installation on the VM. If the agent installation is not described, describe it (for more details, see the section ivkcs_user_data resource).
-
Configure monitoring methods (
health checktypes). Use theivkcs_agent_checkresource.The
health checktypes are described in the section ivkcs_agent_check resource.Example of `health check` configurationresource "ivkcs_agent_check" "health" {hosts = ["HOST"]uuid = var.instance_uuid# Service monitoring by portport_health {# IP addresshost = "127.0.0.1"# Portport = 9092# Monitoring intervalperiod = "1m"}}At the specified interval, the agent on the VM will pass
health checkto the configuration management service.