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

[Puppet] Datadog agent does not collect Apache logs #3514

Closed
dduportal opened this issue Apr 14, 2023 · 4 comments
Closed

[Puppet] Datadog agent does not collect Apache logs #3514

dduportal opened this issue Apr 14, 2023 · 4 comments
Assignees

Comments

@dduportal
Copy link
Contributor

While working on #3485 and #3494 , we found that the Datadog agent integration with Apache is incomplete: we do not have Apache log collection (only metrics).

  • https://docs.datadoghq.com/integrations/apache/?tab=host#log-collection states that a section logs must be configured in the apache integration configuration file (/etc/datadog-agent/conf.d/apache.d/conf.yaml)

  • The main cause is the Puppet module for datadog agent does not support all the features of the integrations: Logs still treated as an integration DataDog/puppet-datadog-agent#612 (comment)

    • A first try to the proposed "hack" shows it's a cause of a lot of spaghetti puppet code: "if apachemisc profile is applied, then add the apache integration with custom elements in it"
    • Tried with success a static configuration file which only depends of the presence or absence of apache instead.
  • Another blocker is the file /etc/datadog-agent/conf.d/process.yaml, related to https://docs.datadoghq.com/integrations/process/, which is empty and invalid, causing trouble for datadog-agent for monitoring the Apache (and other) processes.

    • Tried to delete it from Puppet and the filesystem, and then let datad-go manage with its default, until we'll need to specify it
    • Root cause is the datadogagent_check custom puppet profile we have: let's remove it
  • The datadog-agent process need to read the log files for apache (at least?) so these files need the permission read for others (to avoid adding the agent to an adminisrtator group) and execute on the containgin directories

@dduportal dduportal added this to the infra-team-sync-2023-04-18 milestone Apr 14, 2023
@dduportal dduportal self-assigned this Apr 14, 2023
@dduportal
Copy link
Contributor Author

dduportal commented Apr 14, 2023

First step in jenkins-infra/jenkins-infra#2764 deployed with success

Next tasks:

@dduportal
Copy link
Contributor Author

for machine in ci.jenkins.io cert.ci.jenkins.io archives.jenkins.io edamame.jenkins.io lettuce.jenkins.io census.jenkins.io usage.jenkins.io trusted.ci.jenkins.io trusted-agent-1 pkg.origin.jenkins.io vpn.jenkins.io private.vpn.jenkins.io bounce puppet.jenkins.io; do echo "=== Machine: ${machine}";ssh "${machine}" sudo rm -f /etc/datadog-agent/conf.d/process.yaml;done

@dduportal
Copy link
Contributor Author

@dduportal
Copy link
Contributor Author

Apache Dashboard in datadog now shows all VMs 🥳

We can see the log collection working as expected:

Capture d’écran 2023-04-14 à 19 33 53

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