Getting started
Installation & Setup
Video Tutorials
Administration
Audience Management
Email Marketing
Plug-Ins & Add-Ons
Developers
Advanced
Help
PowerMTA, FluentD and Octeth Bounce Processing
Installation
Install Fluentd to process PowerMTA Logs and post them to Oempro.
- Reference
Run ulimit -n and if the result is 1024, increase maximum number of file descriptors to 65536:
If your console shows 1024, it is insufficient. Please add the following lines to your /etc/security/limits.conf file and reboot your machine:
root soft nofile 65536
root hard nofile 65536
* soft nofile 65536
* hard nofile 65536Reboot the server:
rebootInstall Fluentd Ubuntu package by following instructions here.
# Install packages
apt update
apt install gcc make ruby ruby-dev
# Install Fluentd Gem
gem install fluentd --no-docRun the following commands to verify the Fluentd installation:
# Setup the fluentd directory and initial configuration
fluentd --setup /etc/fluent
# Run and test
cd /etc/fluent/
fluentd -c /etc/fluent/fluent.conf -vv &
echo '{"json":"message"}' | fluent-cat debug.testUse kill to stop the test fluentd process.
Boot Setup
The Fluentd gem does not come with /etc/init.d/ scripts. To ensure Fluentd starts on system boot, we need to create a systemd service file for Fluentd:
- Create a new service file for Fluentd:
vi /etc/systemd/system/fluentd.service- Paste the following into the file:
[Unit]
Description=Fluentd data collector
After=network.target
[Service]
User=root
ExecStart=/usr/local/bin/fluentd -c /etc/fluent/oempro.conf --under-supervisor
Restart=always
[Install]
WantedBy=multi-user.targetYou can learn the actual path of fluentd by executing which fluentd.
- Save and close the file.
- Reload the systemd daemon to read the new file:
systemctl daemon-reload- Enable Fluentd to start on boot:
systemctl enable fluentd- You can start Fluentd immediately without rebooting by running:
systemctl start fluentd- To check the status of the Fluentd service, you can run:
systemctl status fluentdThis will ensure that Fluentd starts automatically whenever your system boots up.
Configuration
First, make sure that PowerMTA logs properly. Edit the /etc/pmta/config file and make sure that the following directive exists:
The /etc/fluentd/oempro.conf content should be set to:
In order to monitor stdout of Fluentd, run this command:
journalctl -u fluentd -fOn this page
- PowerMTA, FluentD and Octeth Bounce Processing
- Installation
- Boot Setup
- Configuration