FusionDirectory rSyslog plugin

The rSyslog addon allows to view log entries created by the rSyslog daemon.

Whenever an object is viewed, created, modified or removed, FusionDirectory logs this action using the PHP function syslog(…). Also debugging informations like PHP error messages and login tries will be logged.
All these log entries will be writting into a mysql database too and can then be viewed in “Addons” → “System logs”

(This plugin will replace the 'Syslog' and the 'FusionDirectory loggin' plugin, to have a unified logging mechanism.)

What is required?

  • A version of FusionDirectory >= 1.0 .
  • The packages rsyslog and rsyslog-mysql installed and configured.
  • The rSyslog service configured in the FusionDirectory ui.
  • logging=“true” in your fusiondirectory.conf.
  • Up to date ldap schema files (goserver.schema)

Package installation

You've to install both packages rsyslog and rsyslog-mysql on a machine reachable by the the FusionDirectory host.

On my system I simply used the following command:

 # apt-get install rsyslog rsyslog-mysql

These packages will automatically configure themself, you only have to answer two or three question about the database configuration.

The rsyslog daemon should be runnning now.

On FusionDirectory server, you've to install also the package fusiondirectory-plugin-rsyslog in order to have the rsyslog plugin for fusiondirectory.

 # apt-get install fusiondirectory-plugin-rsyslog

Configuring FusionDirectory

Now create (or open) a server which represents the host where the database is running on. In my case its simply localhost. (Administration→Systems→Create→System) Once the server object is opened you should see a 'Services' tab, in this tab you are able to add and remove services for the actually edited server. Click on 'new service' and select the 'Logging' service, than click on 'Continue'.

A new dialog will open and you have to specify the database connectivity.

Check the box “Server provides a syslog mysql database” and fill the password field, than click on 'Save' button.

If you do not know what you've to specify here, just have a look at your /etc/rsyslog.d/mysql.conf

    ### Configuration file for rsyslog-mysql
    ### Changes are preserved

    $ModLoad ommysql
    *.* :ommysql:localhost,Syslog,rsyslog,tester
  • localhost represents the hostname of the mysql server.
  • Syslog is the database name.
  • rsyslog is the username for the connection.
  • tester is the password for the connection.

(For security reasons you may prefer to create a seperate MySQL account, for readonly connections required by FusionDirectory.)

Now save the server object and navigate to the addons section on the left and click on the 'System logs' plugin. If everything went fine, you should already see some log entries.

Tips

Ensure you have the following line in your fusiondirectory.conf:

    <main
     ...
     logging="true"

I don't see any service/addon plugins like 'FusionDirectory logging'

  • Check your FusionDirectory version, is it >= 1.0 ?
  • Check your fusiondirectory.conf for these entries:
...
 <section name="Addons">
  <plugin acl="rsyslog"  class="rsyslog" />
  ...
 </section>

...
 <serverservice>
  <tab class="rSyslogServer" />
  ...
 </serverservice>

...
 <rsyslogtabs>
  <tab class="rsyslog" name="System logs" />
 </rsyslogtabs>
en/documentation/plugin/rsyslog_plugin/how_to_setup_rsyslog_plugin.txt · Last modified: 2017/10/31 10:32 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0