Coder Social home page Coder Social logo

Comments (3)

KSerrania avatar KSerrania commented on August 17, 2024

Hi @cirsrejoe,

From what I read here, your objective is to have a /etc/datadog-agent/conf.d/logs.d/conf.yaml file with the following contents:

logs:
  - type: file
    path: "/var/log/syslog"
    service: "system"
  - type: file
    path: "/var/log/auth.log"
    service: "system"

To get this with the formula, you need to do this:

  checks:
    logs:
      config:
        logs:
          - type: file
            path: "/var/log/syslog"
            service: "system"
          - type: file
            path: "/var/log/auth.log"
            service: "system"

Explanation (mostly taken from there):
The outermost logs key indicates that you want to create a check named "logs", which will create the /etc/datadog-agent/conf.d/logs.d directory (note that there is no specific restriction on the name of this check, you could name it system_logs for instance and it would still be able to collect logs for you: only the contents of the check matter).

Then, the config key of the logs check indicates what the contents of the /etc/datadog-agent/conf.d/logs.d/conf.yaml file will be. This is where you put the config file contents (as described above). In the case of logs collection, the config file itself contains the logs key, which is why you have both an inner and an outer logs key if you also named your check "logs".

from datadog-formula.

KSerrania avatar KSerrania commented on August 17, 2024

Hello @cirsrejoe, did the above suggestion work for your use case?

from datadog-formula.

cirsrejoe avatar cirsrejoe commented on August 17, 2024

Yes, I just saw this - closing the issue. Thank you!

from datadog-formula.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.