fluentd-docs
fluentd-docs copied to clipboard
How to use td-agent status command on Amazon Linux 2?
Context
I'm installing td-agent on Amazon Linux 2 instance following the official installation guide.
Problem
I can't use sudo /etc/init.d/td-agent status
command in Step 2: Launch Daemon of the guide.
When I execute sudo /etc/init.d/td-agent status
, I get:
[ec2-user@ip-172-17-11-221 etc]$ sudo /etc/init.d/td-agent status
/lib/lsb/init-functions: line 22: /etc/redhat-lsb/lsb_log_message: No such file or directory
because there is not /etc/redhat-lsb directory on the instance. However I can use other commands(start, stop, restart) of td -agent. How can I use td-agent status command on Amazon Linux 2?
I think you can resolve the issue by installing redhat-lsb-core
.
Try something like below on your instance and see if the issue resolved:
$ sudo yum install redhat-lsb-core
I tried that command, but I got this (redhat-lsb-core has already been installed):
[ec2-user@ip-172-17-11-221 ~]$ sudo yum install redhat-lsb-core
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
158 packages excluded due to repository priority protections
Package system-lsb-core-4.1-27.amzn2.3.5.x86_64 already installed and latest version
Nothing to do
So the issue is not resolved yet.
The AMI ID is amzn2-ami-hvm-2.0.20181114-x86_64-gp2 (ami-0a2de1c3b415889d2)
.
Interesting. Actually I can confirm the package "redhat-lsb-core" provides
/etc/redhat-lsb/lsb_log_message
on Redhat (also on CentOS).
$ yum provides /etc/redhat-lsb/lsb_log_message
...
redhat-lsb-core-4.1-27.el7.centos.1.x86_64 : LSB Core module support
Repo : base
Matched from:
Filename : /etc/redhat-lsb/lsb_log_message
Can you run the command above (yum provides ...
) on your instance and
paste the output here?
Hmm... Amazon Linux 2 doesn't gurantee the compatiblity with RHEL/CentOS and they focus on systemd based process management. We need to know the differences between RH familiy and Amazon Linux 2...