Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http_check fails in alpine image due to embedded path references #307

Open
a200462790 opened this issue May 29, 2018 · 0 comments
Open

http_check fails in alpine image due to embedded path references #307

a200462790 opened this issue May 29, 2018 · 0 comments

Comments

@a200462790
Copy link

**Output of the info page **

2018-05-29 13:57:10,866 | INFO | dd.collector | utils.cloud_metadata(cloud_metadata.py:275) | Attempting to get OpenStack meta_data.json
2018-05-29 13:57:10,869 | INFO | dd.collector | utils.cloud_metadata(cloud_metadata.py:295) | Could not load meta_data.json, not OpenStack EC2 instance
====================
Collector (v 5.24.0)
====================

  Status date: 2018-05-29 13:56:58 (11s ago)
  Pid: 1064
  Platform: Linux-4.4.115-k8s-x86_64-with
  Python Version: 2.7.14, 64bit
  Logs: <stderr>, /opt/datadog-agent/logs/collector.log

  Clocks
  ======
  
    NTP offset: 0.0027 s
    System UTC time: 2018-05-29 13:57:10.902521
  
  Paths
  =====
  
    conf.d: /opt/datadog-agent/agent/conf.d
    checks.d: /opt/datadog-agent/agent/checks.d
  
  Hostnames
  =========
  
    ec2-hostname: {}
    local-ipv4: {}
    socket-hostname: {}
    hostname: {}
    local-hostname: 
    instance-id: {}
    socket-fqdn: {}
  
  Checks
  ======
  
    disk (1.2.0)
    ------------
      - instance #0 [OK]
      - Collected 34 metrics, 0 events & 0 service checks
    ntp (1.2.0)
    -----------
      - Collected 0 metrics, 0 events & 0 service checks
  
    docker_daemon (1.10.0)
    ----------------------
      - instance #0 [OK]
      - Collected 119 metrics, 0 events & 1 service check
  
    network (1.5.0)
    ---------------
      - instance #0 [OK]
      - Collected 50 metrics, 0 events & 0 service checks
  
    http_check (2.0.1)
    ------------------
      - initialize check class [ERROR]: OSError('Unable to locate `embedded` directory. Please specify ca_certs in your http yaml configuration file.',)
  
  Emitters
  ========
  
    - http_emitter [OK]

====================
Dogstatsd (v 5.24.0)
====================

  Status date: 2018-05-29 13:57:05 (6s ago)
  Pid: 1062
  Platform: Linux-4.4.115-k8s-x86_64-with
  Python Version: 2.7.14, 64bit
  Logs: <stderr>, /opt/datadog-agent/logs/dogstatsd.log

  Flush count: 130
  Packet Count: 0
  Packets per second: 0.0
  Metric count: 1
  Event count: 0
  Service check count: 0

====================
Forwarder (v 5.24.0)
====================

  Status date: 2018-05-29 13:57:09 (3s ago)
  Pid: 1063
  Platform: Linux-4.4.115-k8s-x86_64-with
  Python Version: 2.7.14, 64bit
  Logs: <stderr>, /opt/datadog-agent/logs/forwarder.log

  Queue Size: 0 bytes
  Queue Length: 0
  Flush Count: 409
  Transactions received: 234
  Transactions flushed: 234
  Transactions rejected: 0
  API Key Status: API Key is valid
  

Additional environment details (Operating System, Cloud provider, etc):

Steps to reproduce the issue:

  1. Create http_check.yml in conf.d directory:
init_config: ~
instances:
  - name: github
    url: https://status.github.com/api/status.json
    content_match: 'major'
    reverse_content_match: true
    ca_certs: /etc/ssl/certs/ca-certificates.crt
    disable_ssl_validation: true
    skip_event: true
    tags:
      - url:https://status.github.com/api/status.json
      - service:github
  1. Build below docker file(using your own api key)
FROM datadog/docker-dd-agent:latest-alpine
ENV API_KEY=<API_KEY>
COPY conf.d /conf.d
  1. Run the docker image
  2. Check the agent info command:

initialize check class [ERROR]: OSError('Unable to locate embedded directory. Please specify ca_certs in your http yaml configuration file.',)

Describe the results you received:
The http_check integration fails due to cert error.
It appears to be searching in a embedded/* path.

Describe the results you expected:
I expected that if I specify ca_certs then it would not try to get the default cert path of "embedded/ssl/certs". It would load the path that i passed and continue on.

Additional information you deem important (e.g. issue happens only occasionally):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant