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

Logger module ignores the config #310

Open
victorazzam opened this issue Jul 8, 2024 · 4 comments
Open

Logger module ignores the config #310

victorazzam opened this issue Jul 8, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@victorazzam
Copy link

Hi folks!

I've been experiencing issues with getting Pulsar to produce JSON output. I am running Pulsar in a test environment and it correctly logs threat events based on a couple of rules I defined. The trouble is that the only output I am getting is in the console and in the default format. It seems the logger config is being ignored, and I can't find anything in the syslog even with it enabled.

Please excuse my naiveté in case I misunderstood the premise of the logger module entirely. Nonetheless, how do I troubleshoot this dillemma? Thanks in advance!

@banditopazzo
Copy link
Member

banditopazzo commented Jul 8, 2024

Hi, thank for reaching us.

The first thing you can do is to run pulsar-exec pulsar config -m logger (or pulsar instead of pulsar-exec pulsar if you have the helper scripts) to check the configuration.

I tried the main branch with the following configuration in the pulsar.ini and I am getting the JSON output and syslog messages:

# ...

[logger]
output_format=json
syslog=true

# ...

can you send your logger configuration?

@krsh krsh added the question Further information is requested label Jul 9, 2024
@victorazzam
Copy link
Author

victorazzam commented Jul 9, 2024

$ pulsar config -m logger
+---------------+-------+
| KEY           | VALUE |
+=======================+
| console       | true  |
|---------------+-------|
| enabled       | true  |
|---------------+-------|
| output_format | json  |
|---------------+-------|
| syslog        | true  |
+---------------+-------+

For completeness, here is how I ran it:

$ ps -ax | grep pulsar
2868465 ?        S      0:00 sh /usr/bin/pulsard --config-file /var/lib/pulsar/pulsar.ini
2868466 ?        Sl     5:39 /usr/bin/pulsar-exec pulsard --config-file /var/lib/pulsar/pulsar.ini

@victorazzam
Copy link
Author

I later tried running it within Docker (--privileged --net=host --pid=host --cgroupns=host) and still no dice. Should I be seeing JSON in the standard output/error using the above config?

@victorazzam
Copy link
Author

Regarding syslog any ideas why could this be?
screenshot

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

No branches or pull requests

3 participants