ECS Containers - Uptime Test

In environments where ECS Fargate task is used extensively to launch containers, it is essential to monitor the uptime of critical containers running in the task. By tracking the uptime of each of the containers, administrators can determine what percentage of time a container has been up. In some environments, administrators may schedule periodic reboots of their containers. By knowing that a specific container has been up for an unusually long time, an administrator can easily identify that the scheduled reboot task is not working on a container. The ECS Containers Uptime test helps administrators track such irregularities with ease!

Use this test to promptly detect unscheduled reboots and unexpected breaks in the availability of each container on the target ECS Fargate task .

Target of the test : ECS Fargate Task

Agent deploying the test : An internal agent

Outputs of the test : One set of results for each container available in the target ECS Fargate Task being monitored.

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed.

Host

The IP address of the host for which this test is to be configured.

Port

The port number at which the specified host listens. The default is 2375.

Use SUDO

By default, this flag is set to No. This indicates that, by default, this test will report the metrics of this test by executing the crictl command. However, in some highly secure environments, the eG agent install user may not have the permissions to execute this command directly. In such cases, do the following:

  • Edit the SUDOERS file on the target host and append an entry of the following format to it:

    <eG_agent_install_user> ALL=(ALL) NOPASSWD:<Command>

    For instance, if the eG agent install user is eguser, then the entries in the sudoers file should be:

    eguser ALL=(ALL) NOPASSWD: crictl

  • Finally, save the file.
  • Then, when configuring the test using the eG admin interface, set this parameter to Yes. This will enable the eG agent to execute the sudo crictl command  and retrieve the relevant metrics for this test.

DD Frequency

Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD frequency.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Is restarted?

Indicates whether/not this container was rebooted.

 

The values reported by this measure and its numeric equivalents are mentioned in the table below:

Measure Value

Numeric Value
No 0
Yes 1

Note:

By default, this measure reports the Measure Values listed in the table above to indicate whether/not this container was rebooted.

For each container, the detailed diagnosis of this measure lists the time, shutdown date, restart date, duration of shutdown, and whether/not each container is in maintenance.

Container uptime

Indicates the time duration for which this container has been up since the last time this test ran.

Secs

A low value implies that the container was recently rebooted. From the measure value, you can figure out if the reboot was scheduled or unscheduled.

A high value could indicate that a scheduled reboot has failed.

Restarts count

Indicates the total time that this container has been up since its last reboot.

Number

This measure displays the number of years, months, days, hours, minutes and seconds since the last reboot of each container. Administrators may wish to be alerted if a container has been running without a reboot for a very long period. Setting a threshold for this metric allows administrators to determine such conditions.