[389-users] Adding the source IP to All slapd logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I’m looking for a solution to add the source IP address to all logs generated by slapd. 
The goal is to be able to identify where all requests are coming from, whether it's authentication, search queries, or entry modifications in the LDAP server.

I would like this IP address to be included in every log entry, regardless of the event being logged, to make it easier to analyze and track actions performed on the server.
I know there is a session ID used to track all queries, and this field can be used to find the source IP, but this is not convenient in my case.

Basic logs are like this:
2025-02-18T21:19:45.742134+00:00 c4502f9415ba slapd[13]: conn=1001 fd=11 ACCEPT from IP=172.17.0.1:40632 (IP=0.0.0.0:389)
2025-02-18T21:19:45.742880+00:00 c4502f9415ba slapd[13]: conn=1001 op=0 do_bind
2025-02-18T21:19:45.742973+00:00 c4502f9415ba slapd[13]: conn=1001 op=0 BIND dn="" method=128
2025-02-18T21:19:45.743018+00:00 c4502f9415ba slapd[13]: send_ldap_result: conn=1001 op=0 p=3
2025-02-18T21:19:45.744072+00:00 c4502f9415ba slapd[13]: conn=1001 op=0 RESULT tag=97 err=0 qtime=0.000075 etime=0.001256 text=

But I want these logs to include the IP in every entry:
2025-02-18T21:19:45.742134+00:00 c4502f9415ba slapd[13]: conn=1001 fd=11 ACCEPT from IP=172.17.0.1:40632 (IP=0.0.0.0:389)
2025-02-18T21:19:45.742880+00:00 c4502f9415ba slapd[13]: conn=1001 op=0 do_bind from IP=172.17.0.1:40632
2025-02-18T21:19:45.742973+00:00 c4502f9415ba slapd[13]: conn=1001 op=0 BIND dn="" method=128 from IP=172.17.0.1:40632
2025-02-18T21:19:45.743018+00:00 c4502f9415ba slapd[13]: send_ldap_result: conn=1001 op=0 p=3 from IP=172.17.0.1:40632
2025-02-18T21:19:45.744072+00:00 c4502f9415ba slapd[13]: conn=1001 op=0 RESULT tag=97 err=0 qtime=0.000075 etime=0.001256 text= from IP=172.17.0.1:40632


If anyone has already implemented this functionality or has any advice on how to configure this in slapd, I would greatly appreciate your feedback.
I have tried many slapd and rsyslog configurations, but nothing has worked so far.

Thank you in advance for your help!
-- 
_______________________________________________
389-users mailing list -- 389-users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to 389-users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux