Skip to content

task configurable logs via hooks via heredoc #393

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

Open
Tracked by #387
DavidGOrtega opened this issue Feb 10, 2022 · 4 comments
Open
Tracked by #387

task configurable logs via hooks via heredoc #393

DavidGOrtega opened this issue Feb 10, 2022 · 4 comments
Labels
enhancement New feature or request logs resource-task iterative_task TF resource

Comments

@DavidGOrtega
Copy link
Contributor

Once #392 is achieved we should be able to freely configure the logs output via hooks. The could have a logging property that would allow us the register the hooks using heredoc.

logging {
  hooks {
   ...
}
}
@DavidGOrtega DavidGOrtega added enhancement New feature or request logs resource-task iterative_task TF resource labels Feb 10, 2022
This was referenced Feb 10, 2022
@0x2b3bfa0
Copy link
Member

Did you mean a nested block instead of heredoc by chance?

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Feb 11, 2022

Hooks can't be added dynamically; they have to be present at compile time. I guess that you want to let users selectively enable and configure some of the hooks we choose to ship with our binaries? E.g. Amazon Web Services CloudWatch, Microsoft Azure Monitor, or Google Cloud Logging as suggested on this thread.

@DavidGOrtega
Copy link
Contributor Author

Yes, adding a bunch of preferred hooks

Did you mean a nested block instead of heredoc by chance?

Depends, if there is already a way to to write a config file for the hook we could avoid doing the mapping. I.E. lest suppose that the hook Elasticsearch is like this:

config file

nodes:
192.168.1.1

we could add this as heredoc

@0x2b3bfa0
Copy link
Member

It's probaby going to look like this:

resource "iterative_task" example {
  ···
  logs {
    syslog = {
      protocol = "udp",
      address = "127.0.0.1",
      priority = "info"
      tag = "test",
    }
  }
}

Anyway, let's focus on #392 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logs resource-task iterative_task TF resource
Projects
None yet
Development

No branches or pull requests

2 participants