Setup of td-agent-ui and operation check

投稿日:2017年3月19日 更新日:


Hello everyone, It’s candle.
In this time, I will show you how to set up td-agent-ui and operation check.
Td-agent is easier than fluentd to operate on the server.


Td-agent is installed

Please refer to the following article when building td-agent to Centos 6.5.

Build up a td-agent server on centos 6.5

For EC2, here

Build up td-agent server on the EC2 of aws

Launching of td-agent

td-agent-ui is already installed when you install td-agent.
The launch command of td-agent-ui is this.

sudo td-agent-ui start

You may caught some warning, It’ probably no problem.

Set up td-agent-ui

After starting server, let’s access to td-agent-ui.
You access to own IP address + 9292.

For vagrant, the IP address written in Vagrantfile.
For EC2, let’s access the public IP address.

Account name is “admin”, password is “changeme”.

After login, the setup page will appear.

Chnage the password

First, You would change the password.
If anybody access to your server from anywhere, default password is dangerous.

Click the “Password” fron the left menu.

Enter “changeme” to the current password and set a new password

Set up td-agent

Back to the top page and set up td-agent.

In the top page, there are “Setup fluentd” and “Setup td-agent”.
Both can use the function of fluentd.
I recommend td-agent.
Click “Setup td-agent”.

The page to create configuration file display.
There are already files exists such as “/etc/td-agent/td-agent.conf” before pressing “Create” button.

Click “create” button.
After that, the following page will be displayed.
If logs are not displayed, let’s restart “td-agent”.

It’s over.

Td-agent log setting

Let’s try to set up to collect the log by the td-agent conf file.
There is the td-agent conf file.


Of course, you can edit it in CUI,
Let’s edit it from td-agent-ui.

Choose “Config File” from the left menu.

Click the “Edit” button.

Considering security, it is better to delete the settings that are not used.
Delete all contents of the setting file and write the following.

 @type forward

<match debug.**>
  type stdout

Press “Update & Restart” button.

The above setting meaning is like this.directive is which logs will collecte.
In this case it will receive the log from type forward.

In , it means to display on the td-agent standard output what tagged with “debug.anything-string” received in source type forward.

Debugging with fluent-cat

Let’s try to get the tag of debug.**.

The fluent-cat command send data to fluentd (td-agent) with tcp.
The location of the fluent-cat command is in a place where PATH does not through.


The following command, you can send data to fluentd.

echo '{"I say":"hello"}' | /opt/td-agent/embedded/bin/fluent-cat debug.ok

The contents of echo are json. You throw it to td-agent with a tag called debug.ok.

Nothing is displayed on the terminal,
Looking at the log on the browser, it certainly arrived.

It is success.


One last thing, even though td-agent-ui is useful, it is dangerous in security.
You should not launch td-agent as much as possible, even if you activate it, restrict access by IP address.


If you think this article is good, share it please




Your email address will not be published. Required fields are marked *


Collect Rails 5 production.log with td-agent

English 日本語 Abstract Hello everybody It’s me candle. In this article I will show you how to collect rails 5 production.log with td-agent. Rails 5 was changed log format and it cause some problem. I will solve it and explain. relational article If you are using rails 4 please refer to the following article. td-agentでRails 4のproduction.logを取得する Precondition You can work ruby on rails in production mode Before read this article you setup the rails production environment such as webrick, apache, puma and nginx. You already installed td-agent or fluentd. You need td-agent or fluentd. It is installed on the ruby …

Build up td-agent server on the EC2 of aws

English 日本語 Abstract Hello everyone, It’s candle. In this time we will build up td-agent environment on the ec2. Precondition You have a EC2.

React + S3 + Route53 + CloudFront HTTPS connection using SSL

Abstract Hello everyone it’s me candle. This time we would like to try SSL connection with the React web application deployed to S3. Programers recently develop web services on the API server and React front end. Then SSL connection is often required on the React side as well. Not only that, but recently https is being standardized. We try to taht. Condition React web is deployed to S3 You have the S3 bucket that name is same as Route53 domain name Create a CloudFront distribution First we will create the distribution of CloudFront. Go to the CloudFront management console, select …

Install only mysql command for RDS in EC2

Abstract Hello everyone it’s me candle. This topic is a little thing but I note to self. If we use RDS, we don’t need Mysql server in the EC2. You may want to install only the mysql command. I will explain it. Precondition You use EC2 and RDS

Monitor the memory state of ec2 with watch and free command

English 日本語 Abstract Hello everyone, It’s candle. In this time, I will show you how to monitor ec2 memory in real time. EC2 server of t2.micro has only 1GB of memory, If you run composer, rails, mysql on it, memory may be barely. It is useful if you can monitor the memory and tune the server. Precondition EC2 server

I work in the venture company as a CTO. I start to write program in University, first I learned java, C++ and PHP. In the company, I'm developing web services by Rails. I do like to automation.