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

add localfile labels to agent ossec.conf template #521

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

dragospe
Copy link
Contributor

This change enables generating a stanza such as

<localfile>
  <location>/var/log/myapp/log.json</location>
  <log_format>json</log_format>
  <label key="@source">myapp</label>
  <label key="agent.type">webserver</label>
</localfile>

from the wazuh_agent_config snippet:

                - format: json
                  location: /var/log/myapp/log.json
                  label:
                    - key: "@source"
                      value: "myapp"    
                    - key: "agent.type"
                      value: "webserver"

This change enables generating a stanza such as

```
<localfile>
  <location>/var/log/myapp/log.json</location>
  <log_format>json</log_format>
  <label key="@source">myapp</label>
  <label key="agent.type">webserver</label>
</localfile>
```

from the `wazuh_agent_config` snippet:

```
                - format: json
                  location: /var/log/myapp/log.json
                  label:
                    - key: "@source"
                      value: "myapp"    
                    - key: "agent.type"
                      value: "webserver"
```
@neonmei neonmei self-requested a review December 15, 2020 16:12
Copy link
Contributor

@neonmei neonmei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dragospe, changes looks good! 👍
Thanks for your contributions!

@neonmei neonmei merged commit ce85f1b into wazuh:master Dec 15, 2020
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

Successfully merging this pull request may close these issues.

2 participants