この記事はJapaneseで表示されません。Koreanでご覧ください。

[ Datadog ] HTTP check Integration

Print

We will guide you through how to set up HTTP Check Integration in Agent.

The service URL monitoring cycle through http check set in the Agent is 15 seconds by default, and 

Metrics such as network.http.response_time, network.http.can_connect, and http.ssl.days_left can be collected. 

There is no limit to the number of URLs, but if you check many endpoints, you should increase the number of check_runners (default: 4) of the Agent. However, if you increase the number of check_runners, the resources used by the Datadog Agent will increase, so it is recommended to distribute the Agent to multiple hosts and use HTTP check.

Before performing the integration task, first check whether the environment on the host to be installed can access the URL using the curl command, etc.


http check settings

1. Linux environment

If the target host is a Linux environment, set it as follows.

  • Activate http_check.d to integrate http_check.

    $ cd /etc/datadog-agent/conf.d/http_check.d

    There is a sample configuration file (conf.yaml.example) in the http_check.d directory, change it to conf.yaml.
    $ sudo cp conf.yaml.example conf.yaml
    혹은
    $ mv conf.yaml.example conf.yaml

 

  • Change ownership of conf.yaml and modify settings within the file.
    $ sudo chown dd-agent:dd-agent conf.yaml

    $ vi conf.yaml

    init_config:

     

    instances:

      - name: “대상서비스명”

        url: https://www.skcc.co.kr/

     

      - name: “SK recruit”

            url: https://recruit.skcc.co.kr/

  • Restart the Datadog agent (no service impact)
    $ sudo systemctl restart datadog-agent.service
  • Check the Datadog agent collection status.
    $ sudo datadog-agent status

    확인 예

    Running Checks

         ==============

     

    <중략>

     

           http_check (6.1.2)

           ------------------

             Instance ID: http_check:SKHomepage Login:7499e0886c55190d [OK]

             Configuration Source: file:/etc/datadog-agent/conf.d/http_check.d/conf.yaml

          Total Runs: 1

             Metric Samples: Last Run: 5, Total: 5

             Events: Last Run: 0, Total: 0

             Service Checks: Last Run: 2, Total: 2

             Average Execution Time : 307ms

          Last Execution Date : 2022-05-11 05:04:51 UTC (1652245491000)

              Last Successful Execution Date : 2022-05-11 05:04:51 UTC (1652245491000)


2. Windows environment

If the target host is a Windows environment, set it as follows.

  • Activate http_check.d to integrate http_check.
    •  Go to C:\ProgramData\Datadog\conf.d\http_check.d.
    • There is a sample configuration file (conf.yaml.example) in the http_check.d folder. You can ‘rename’ it to conf.yaml or copy it and then change the name.
  • Modify the settings in conf.yaml.

    init_config:

     

    instances:

      - name: “대상서비스명”

        url: https://www.skcc.co.kr/

     

      - name: “SK recruit”

            url: https://recruit.skcc.co.kr/

  • Restart Datadog Agent Manager. (No service impact) Run Restart Agent or right-click Datadog Agent in the Tray at the bottom right and run Restart.

 

Setting http_check in a GUI environment is as follows:

  • In the running Datadog Agent Manager, click Checks on the left menu and select ‘Add a Check’ from the selection box.
  • Select http_check from the Add a Check list and change the configuration information (conf.yaml). (Please refer to the configuration section of conf.yaml above.)
  • Click the Add Check button at the top right of the screen.
    After the task, a file will be created in the location C:\ProgramData\Datadog\conf.d\http_check.d\conf.yaml.
  • Click Restart Agent in the left menu of Datadog Agent Manager. (No service impact)
  • After restarting, click Checks on the left menu of Datadog Agent Manager and select ‘Edit Enabled Check’ to check http_check.d/conf.yaml. To change the settings, refer to the settings in conf.yaml above, modify them, save them, and restart.


  • HTTP Check Dashboard Sample silver Support portal Datadog Monitoring > Datadog Sample > [ Datadog ] Agent Integration Dashbaord Sample. Please refer to . HTTP Check Integration Dashboard.
    (You must log in to the Support portal to see the Datadog Sample list.)


3. Monitor setting

Set up an alert so that the person in charge can receive it when the URL check result is abnormal.

 

  • Select the Monitors > New Monitor menu or click the New Monitor button at the top of the Monitors > Monitor List menu and select Metric.
  • In ‘Choose the detection method’, select ‘Threshold Alert’ which is threshold-based.
  • Select network.http.can_connect in ‘Define the metric’.

    Select url in group by to generate alerts by url.

    Set the period of data to check whether an alert is generated.

  • Select the threshold in ‘Set alert conditions’. This example is an example of generating an alert when the average of the results for 1 minute is less than 0.6. Since the collection cycle is 15 seconds, the condition in the example is an example of a condition in which the person in charge receives an alert when there are no URL inspection results more than twice. The threshold and alert conditions need to be set appropriately for the operating organization.
  • In ‘Notify your team’, write the content and recipient information to receive the alert. In this example, the URL name is included in the title as {{url.name}}, and in the section below, you can select the email address or Channel (such as opsgenie/Slack) of the person in charge of receiving the alert. In addition, you can send it by adding the recipient information after @ in the body.
  • In ‘Define permissions and audit notifications’, set the modification permission for the registered Monitor (Alert) and whether it will be shared with the relevant parties (creator/Alert recipient) when modified.
  • Once you have set up all of the above, check the contents and save them. You can also check whether it is working properly in advance through ‘Test Notifications’.

Online consultation

Contact us

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.