Checks is an infrastructure monitoring feature to monitor the health (uptime) of the services running on your system. The services might be your API servers, databases, queuing systems, etc. Atatus Infra Checks will replace your existing Nagios and Consul monitoring setup.

You can set two kinds of checks in infrastructure monitoring:

  • HTTP Checks
  • TCP Checks

HTTP Checks

The HTTP checks is used to monitor a simple HTTP operation. These checks make an HTTP GET request every 10 seconds to the specified URL. The health of the service is based on the HTTP response code: any 2xx code is considered passing and anything else is a failure.

How to enable HTTP Checks?

You can enable HTTP checks by creating a file /etc/atatus-infra-agent/conf.d/http_check.d/http_check.yml. For your convenience, we have placed a file called http_check.yml.template in the location /etc/atatus-infra-agent/conf.d/http_check.d. You can just copy the file as follows:

copy
icon/buttons/copy
cd /etc/atatus-infra-agent/conf.d/http_check.d/
cp http_check.yml.template http_check.yml

Once it is copied, you can update the name and URLs of the checks as follows.

copy
icon/buttons/copy
checks:
  - type: http
    name: api
    urls: ["http://localhost:8080/health"]

  - type: http
    name: elasticsearch
    urls: ["http://localhost:9200"]

TCP Checks

The TCP checks is used to monitor a simple socket operation. These checks make a TCP connection attempt every 10 seconds to the specified IP/hostname and port. The health of the service is based on whether the connection attempt is successful (that is - the port is currently accepting connections). If the connection is accepted, the status is a success, otherwise, the status is a failure.

How to enable TCP Checks?

You can enable TCP checks by creating a file /etc/atatus-infra-agent/conf.d/tcp_check.d/tcp_check.yml. For your convenience, we have placed a file called tcp_check.yml.template in the location /etc/atatus-infra-agent/conf.d/tcp_check.d/. You can just copy the file as follows:

copy
icon/buttons/copy
cd /etc/atatus-infra-agent/conf.d/tcp_check.d/
cp tcp_check.yml.template tcp_check.yml

Once it is copied, you can update the name and hosts of the checks as follows:

copy
icon/buttons/copy
checks:
  - type: tcp
    name: mysql
    hosts: ["localhost:3306"]

  - type: tcp
    name: postgres
    hosts: ["localhost:5432"]

  - type: tcp
    name: memcached
    hosts: ["localhost:11211"]