VK Cloud logo

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:

  1. 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).

  2. Configure monitoring methods (health check types). Use the ivkcs_agent_check resource.

    The health check types are described in the section ivkcs_agent_check resource.

    Example of `health check` configuration
    resource "ivkcs_agent_check" "health" {  hosts = ["HOST"]  uuid  = var.instance_uuid  # Service monitoring by port  port_health {    # IP address    host = "127.0.0.1"    # Port    port    = 9092    # Monitoring interval    period  = "1m"  }}

    At the specified interval, the agent on the VM will pass health check to the configuration management service.

Was this article helpful?