Fluentd
Overview
Fluentd is the open source unified logging layer from the Fluent project, a CNCF graduated project. It collects data from many sources, structures it as JSON, filters and buffers it, and routes it to dozens of destinations through a rich plugin ecosystem.
This SecureAnyCloud image installs Fluentd from the official Fluentd fluent-package LTS apt repository as /opt/fluent/bin/fluentd. It ships a ready-to-run sample pipeline and enables the built-in monitor_agent HTTP endpoint, so you can inspect health and per-plugin metrics from the moment the VM boots.
What you get:
- Fluentd 1.16 (
fluent-package5 LTS, Apache-2.0) from the official Fluentd apt repository - The package
fluentd.servicesystemd unit, enabled and running on boot - A sample pipeline at
/etc/fluent/fluentd.conf: adummyinput, arecord_transformerfilter, and acopyoutput that fans out to a rotating file under/var/log/fluentd/and to stdout - The built-in
monitor_agentHTTP endpoint on127.0.0.1:24220(/api/plugins.json,/api/config.json) - 24/7 SecureAnyCloud support
This is a headless service. The monitor_agent HTTP endpoint binds to 127.0.0.1 only, so no inbound application port is needed beyond SSH.
Prerequisites
You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.
Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting size.
Configure the network security group (NSG) to allow inbound 22/tcp from your management network. No inbound application ports are required.
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Fluentd by SecureAnyCloud, and select Create.
On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22).
Select Review + create, then Create.
Step 2 - Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:fluentd-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name fluentd \
--image sac1647283583153:fluentd-ubuntu-24-04:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku StandardStep 3 - Connect to your VM
Connect over SSH with the administrator account you created at deployment:
ssh azureuser@<vm-public-ip>Step 4 - Confirm Fluentd is installed and running
Check the version and confirm that the service is active:
fluentd --version systemctl is-active fluentdfluentd --version reports fluent-package 5.0.x fluentd 1.16.x, and systemctl is-active fluentd prints active.
Step 5 - Review the sample pipeline
The ready-to-run pipeline lives at /etc/fluent/fluentd.conf. Print it and read through it:
- It enables the
monitor_agentHTTP endpoint. - The
dummyinput generates a sample record every second, so there is always a source of records. - The
record_transformerfilter stamps each record with the hostname and a pipeline tag. - The
copyoutput fans the matched stream out to a file and to stdout.
cat /etc/fluent/fluentd.confStep 6 - Inspect live plugin metrics
Fluentd's built-in monitor_agent exposes /api/plugins.json. It returns 200 with JSON that lists every configured plugin and its per-plugin counters. Query it from the VM and pretty-print the result with jq:
curl -s http://127.0.0.1:24220/api/plugins.json | jq '.plugins[] | {type, plugin_id}'The output lists the monitor_agent source, the dummy input, the record_transformer filter, and the copy, file and stdout output plugins.
Step 7 - Watch records flow through the pipeline
The file output writes every record to /var/log/fluentd/records.<date>.log. Tail the file to see the live stream. Each line is a JSON record stamped with your hostname and the sac-sample pipeline tag:
tail -n 5 /var/log/fluentd/records.*.logStep 8 - Customize the pipeline
Edit /etc/fluent/fluentd.conf to point Fluentd at your own sources and destinations, then restart the service. These are a few common building blocks:
# Tail application log files <source> @type tail path /var/log/myapp/*.log pos_file /var/log/fluentd/myapp.pos tag myapp <parse> @type none </parse> </source>
# Forward to Elasticsearch / OpenSearch <match myapp.**> @type elasticsearch host my-search-host port 9200 </match>
# Forward to Loki, Kafka, S3, Azure, HTTP, and many moreAfter you edit the file, apply your changes:
sudo systemctl restart fluentdFluentd has a large plugin ecosystem, including tail, syslog, http, forward, Elasticsearch, Loki, Kafka, S3 and Azure. See the Fluentd documentation for the full plugin catalog. Install extra plugins with sudo /opt/fluent/bin/fluent-gem install <plugin>.
Maintenance
- Service: systemd manages Fluentd. Use
systemctl status fluentdandjournalctl -u fluentd. - Configuration: edit
/etc/fluent/fluentd.conf, then restart the service. - Monitoring: the
monitor_agentHTTP endpoint on127.0.0.1:24220exposes/api/plugins.jsonand/api/config.jsonfor health and per-plugin metrics. - Plugins: install Ruby gem plugins with
sudo /opt/fluent/bin/fluent-gem install <plugin>. - Security patches: unattended-upgrades stays enabled, so the OS keeps receiving security updates automatically. The
fluent-packagepackage stays updatable through apt.
Support
SecureAnyCloud provides 24/7 expert support for this image. Contact us at sales@secureanycloud.com.
Fluentd is a trademark of the Fluent project, hosted by the Cloud Native Computing Foundation. SecureAnyCloud is not affiliated with or endorsed by the Fluent project or the CNCF.
Deploy on Azure
Launch Fluentd on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
Fluentd is the open source unified logging layer: a flexible, plugin-driven log collector that unifies collection, parsing, buffering and routing across your whole stack. It ingests logs from many sources, structures them as JSON, runs them through a configurable pipeline of filters, and routes the records to hundreds of destinations. These include Elasticsearch, OpenSearch, Loki, Kafka, S3, CloudWatch, MongoDB and any HTTP endpoint.
This SecureAnyCloud image is a ready-to-use log-pipeline appliance. fluentd.service is enabled and starts on boot with a self-contained sample pipeline, so the daemon is already processing records when you connect over SSH.
What you get:
- A headless log-pipeline service with no web interface and no credentials to manage
- Fluentd running as a long-lived daemon, installed from the official fluent-package distribution and driven by a configuration file at
/etc/fluent/fluentd.conf - The built-in monitor_agent HTTP endpoint, enabled and bound to loopback only (
127.0.0.1:24220), so the plugins and configuration endpoints answer on the instance and are never exposed to the network - A security group that opens port 22 only. You open whatever ingest or forward ports your own pipeline needs.
- A dedicated, independently resizable EBS data volume mounted at
/var/lib/fluentd, holding the file output buffer and the sample persisted log - Durable storage, rather than the operating system disk, for the on-disk pipeline buffer that protects against bursts and brief destination outages, and for any records the sample pipeline persists
- 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image, make sure you have:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
Launch the Instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for Fluentd. Select the SecureAnyCloud listing, choose Select, then choose Continue on the subscription summary.
Pick an instance type of t3.small or larger. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that opens port 22 from your management network. Keep the root volume at the default size or larger.
Select Launch instance. First-boot initialization takes a few seconds after the instance state becomes Running and the status checks pass. fluentd.service is already running its sample pipeline by the time you can connect.
Launch the Instance from the AWS CLI
Run the following command to launch an instance from the SecureAnyCloud Fluentd Marketplace AMI into an existing subnet and security group. Replace <ami-id> with the AMI ID shown on the Marketplace listing and <key-name> with your EC2 key pair name. Replace <subnet-id> with your subnet ID and <security-group-id> with a security group that opens port 22 from your management network.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type t3.small \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=fluentd}]'When the instance reaches the Running state and its status checks pass, note its public IP address or DNS name. You can find them in the EC2 console or with aws ec2 describe-instances.
Connect to Your Instance
Connect over SSH with your key pair. On the Ubuntu 24.04 variant, the SSH login user is ubuntu.
ssh -i <key-name>.pem ubuntu@<public-ip>A welcome banner prints the most useful commands. Run sudo cat /root/fluentd-info.txt for the full getting-started notes. They cover what is running, the monitor_agent endpoints, where the pipeline configuration lives, the buffer path, the common input, filter and output plugins, and how to install plugins with fluent-gem.
Verify the Service
Fluentd runs as a system service that is enabled and started on boot. Confirm that the daemon is active:
systemctl is-active fluentdThe command prints active. For the full unit status, including the main PID, memory use and the daemon's command line, run:
systemctl status fluentd --no-pagerConfirm the installed binary and the Fluentd core version. This image pins the fluent-package 6.0.3 LTS distribution:
fluentd --versionThe output reports fluentd 1.19.2. The fluentd binary is on the system path. The package installs it under /opt/fluent/bin, and the image links it onto /usr/local/bin so it resolves from any login shell. The plugin installer fluent-gem is linked the same way.
The Monitoring Endpoint
Fluentd ships with a built-in monitor_agent HTTP endpoint. On this image it is enabled and bound to loopback only (127.0.0.1:24220), so the endpoints answer on the instance but are never exposed to the network.
The plugins endpoint returns per-plugin JSON with the live buffer, retry and emitted-record counters for every input and output in the running pipeline:
curl -s http://127.0.0.1:24220/api/plugins.json | python3 -m json.toolAcross repeated calls, the dummy input's emit_records counter and the counters of the file and stdout outputs climb, while retry_count stays at 0 and buffer_queue_length stays at 0. This shows that the pipeline is running and flushing records, not merely loaded.
The configuration endpoint returns the running configuration as JSON:
curl -s http://127.0.0.1:24220/api/config.json | python3 -m json.toolThe read-only endpoint stays private by default. To expose it beyond loopback, change the bind address in the monitor_agent source of the configuration, then open the port in the instance security group yourself.
Edit the Pipeline
Fluentd reads its pipeline from a configuration file at /etc/fluent/fluentd.conf. The shipped configuration is a self-contained sample with no external dependencies:
ls /etc/fluent/The sample defines three sources: a monitor_agent source (the loopback metrics endpoint), a dummy source (a steady synthetic record stream) and a forward source (for local testing). A copy match fans the records out to a buffered file output on the data volume and to a stdout output visible in the journal. Read the sources and matches:
sed -n '14,55p' /etc/fluent/fluentd.confTo build your own pipeline, replace the sample sources and matches with your own.
- Source plugins collect your inputs:
tailfor log files,systemdfor the journal,forward,syslog,tcpandhttpfor network ingest, andexecfor command output. - Filter plugins process records:
parser,grep,record_transformerandgeoip. - Output plugins ship the records:
elasticsearch/opensearch,loki,kafka,s3,cloudwatch,mongo,http,forward,fileandstdout.
The bundled fluent-gem tool installs input, filter and output plugins in seconds. To install a plugin, run sudo /opt/fluent/bin/fluent-gem install fluent-plugin-<name>, then add its source, filter or match block to the configuration.
After you edit the configuration, validate it, then restart the service to apply your changes:
sudo /opt/fluent/bin/fluentd --dry-run -c /etc/fluent/fluentd.conf
sudo systemctl restart fluentdThe --dry-run check parses the configuration, confirms that it is valid, then exits without starting the daemon.
Open whatever ingest or forward ports your pipeline needs in the instance security group. The records that the sample file output writes appear as JSON lines on the data volume:
The Data Volume
The file output buffer (<buffer> path) and the sample file output both live on a dedicated EBS volume mounted at /var/lib/fluentd. This keeps the on-disk pipeline buffer and any persisted records off the operating system disk. It also lets you resize or snapshot the volume independently.
Confirm the mount and watch the records flow:
df -h /var/lib/fluentd
sudo tail -n 4 /var/lib/fluentd/sample-pipeline.*.logThe sample match writes its records to /var/lib/fluentd/sample-pipeline.<date>.log and buffers them under /var/lib/fluentd/buffer/sample. When an output is briefly unavailable or a burst arrives, Fluentd buffers the records to disk here rather than dropping them or growing memory without bound.
To grow the volume, expand the EBS volume in the AWS console, then grow the filesystem on the instance with sudo resize2fs on the underlying device. Point your own outputs' <buffer> blocks at this volume to give them the same disk-backed buffering.
Support
SecureAnyCloud publishes and supports this image. Support covers pipeline design, input and output plugin configuration, parsers and filters, multiline log handling, buffering and backpressure, routing to your observability backend, the monitoring endpoint, and upgrade planning.
Contact SecureAnyCloud through the support channel listed on the AWS Marketplace listing.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch Fluentd with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com