I am currently working on pulling RDS authentication logs from AWS. My setup is as follows:
I have an agent installed on an AWS host (same AWS account).
This agent is configured to collect CloudWatch logs for RDS.
The agent then forwards these logs to the Wazuh Manager for processing.
I need some assistance regarding decoders and rule sets for these logs:
I would like to configure the rules so that RDS authentication failures (e.g., password authentication failed) are tagged with log level 8, since they indicate security-relevant events.
All other general RDS logs should remain tagged at a lower severity, such as log level 5.
I am also trying to understand better how exactly these RDS logs are parsed when they come from the agent to the Wazuh Manager, and whether there are existing decoders or rule sets already available for RDS logs that I could leverage instead of writing everything from scratch.
Could you please advise:
If there are any official or community-provided decoders/rules for RDS logs that can help with authentication failure detection?
If not, do you have recommended best practices for building custom decoders and rules to achieve the above (level 8 for auth failures, level 5 for general logs)?
Any guidance, examples, or references to documentation would be greatly appreciated.
currently using these "<decoder name="RDS">
</group>"
Thanks in advance for your help!
Hello Wazuh Support,
I am currently working on parsing Amazon RDS authentication logs with Wazuh 4.11.1.
Setup:An agent is installed on an AWS host.
This agent is configured to collect CloudWatch logs for RDS.
The agent forwards these logs to the Wazuh Manager.
Authentication failures (e.g., password authentication failed for user) should be tagged as log level 8 (security-relevant).
General RDS activity logs should remain at log level 5
Decoders:
<decoder name="RDS">
<prematch>^\.*Connect|Query|Quit|DEBUG</prematch>
</decoder>
<decoder name="RDS-1">
<parent>RDS</parent>
<regex>(\.*)</regex>
<order>Action</order>
</decoder>
<decoder name="RDS-ERROR">
<prematch>^\.* Aborted</prematch>
</decoder>
Rules:
<group name="rds_logs">
<rule id="100200" level="5" overwrite="yes">
<decoded_as>RDS</decoded_as>
<description>Generic action in RDS logs</description>
</rule>
<rule id="100600" level="8">
<decoded_as>RDS</decoded_as>
<regex>FATAL:\s+.*password authentication failed for user</regex>
<group>rds_logs,authentication_failed</group>
<description>RDS: User authentication failure.</description>
</rule>
</group>
Even with these decoders/rules, some unrelated logs (for example, auditd/syscall style entries) are being matched and tagged under the same rules. This causes non-RDS data to be tagged incorrectly as log level 5 or 8.
Request for Guidance:Are there any official or community-provided decoders/rules for RDS logs that can be used directly in Wazuh 4.11.1?
If not, could you advise on best practices for building custom decoders/rules so that only RDS logs are matched, and unrelated system/auditd logs are ignored?
Specifically, how can I refine the decoders/prematch so only CloudWatch RDS log patterns are handled?
Any guidance, examples, or documentation references would be greatly appreciated.
Thanks in advance for your support,