You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Telegraf agent 1.8.2
amzn2-ami-hvm-2.0.20181114-x86_64-gp2 (ami-009d6802948d06e52)
us-east-1 region of AWS
Steps to reproduce:
On Amazon Linux 2 OS:
$ yum -y localinstall /tmp/telegraf-agent.rpm
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Examining /tmp/telegraf-agent.rpm: telegraf-1.8.2-1.x86_64
Marking /tmp/telegraf-agent.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package telegraf.x86_64 0:1.8.2-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================
Package Arch Version Repository Size
Installing:
telegraf x86_64 1.8.2-1 /telegraf-agent 46 M
Transaction Summary
Install 1 Package
Total size: 46 M
Installed size: 46 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : telegraf-1.8.2-1.x86_64 1/1
Verifying : telegraf-1.8.2-1.x86_64 1/1
Installed:
telegraf.x86_64 0:1.8.2-1
Complete!
...
Populate files such as
/etc/default/telegraf
/etc/telegraf/telegraf.conf
...
$ telegraf --version
Telegraf 1.8.2 (git: HEAD 996a91f)
$ service telegraf status
telegraf Process is running [ OK ]
$ ps -ef | grep telegraf
telegraf 821 1 0 19:46 ? 00:00:00 /usr/bin/telegraf -pidfile /var/run/telegraf/telegraf.pid -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
root 924 646 0 19:47 pts/0 00:00:00 grep --color=auto telegraf
$ systemctl status telegraf
● telegraf.service - LSB: Start telegraf at boot time
Loaded: loaded (/etc/rc.d/init.d/telegraf; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
$ systemctl restart telegraf
$ systemctl status telegraf
● telegraf.service - LSB: Start telegraf at boot time
Loaded: loaded (/etc/rc.d/init.d/telegraf; bad; vendor preset: disabled)
Active: active (exited) since Wed 2018-12-05 19:47:50 UTC; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 966 ExecStart=/etc/rc.d/init.d/telegraf start (code=exited, status=0/SUCCESS)
Dec 05 19:47:50 i-0b8de5454928d.awsdev.inforcloud.local systemd[1]: Starting LSB: Start telegraf at boot time...
Dec 05 19:47:50 i-0b8de5454928d.awsdev.inforcloud.local telegraf[966]: telegraf process is running [ FAILED ]
Dec 05 19:47:50 i-0b8de5454928d.awsdev.inforcloud.local systemd[1]: Started LSB: Start telegraf at boot time.
$ service telegraf status
telegraf Process is running [ OK ]
Expected behavior:
Expected systemctl to be able to recognize that the service is running.
Actual behavior:
systemctl thinks service is not active and the agent must be restarted via systemctl.
elif [[ -f /etc/os-release ]]; then
source /etc/os-release
if [[ $ID = "amzn" ]]; then
if [[ $VERSION = "2" ]]; then
install_systemd /lib/systemd/system/telegraf.service
else
# Amazon Linux logic
install_init
# Run update-rc.d or fallback to chkconfig if not available
if which update-rc.d &>/dev/null; then
install_update_rcd
else
install_chkconfig
fi
fi
fi
fi
System info:
Telegraf agent 1.8.2
amzn2-ami-hvm-2.0.20181114-x86_64-gp2 (ami-009d6802948d06e52)
us-east-1 region of AWS
Steps to reproduce:
On Amazon Linux 2 OS:
$ yum -y localinstall /tmp/telegraf-agent.rpm
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Examining /tmp/telegraf-agent.rpm: telegraf-1.8.2-1.x86_64
Marking /tmp/telegraf-agent.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package telegraf.x86_64 0:1.8.2-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================
Package Arch Version Repository Size
Installing:
telegraf x86_64 1.8.2-1 /telegraf-agent 46 M
Transaction Summary
Install 1 Package
Total size: 46 M
Installed size: 46 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : telegraf-1.8.2-1.x86_64 1/1
Verifying : telegraf-1.8.2-1.x86_64 1/1
Installed:
telegraf.x86_64 0:1.8.2-1
Complete!
...
Populate files such as
/etc/default/telegraf
/etc/telegraf/telegraf.conf
...
$ telegraf --version
Telegraf 1.8.2 (git: HEAD 996a91f)
$ service telegraf status
telegraf Process is running [ OK ]
$ ps -ef | grep telegraf
telegraf 821 1 0 19:46 ? 00:00:00 /usr/bin/telegraf -pidfile /var/run/telegraf/telegraf.pid -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
root 924 646 0 19:47 pts/0 00:00:00 grep --color=auto telegraf
$ systemctl status telegraf
● telegraf.service - LSB: Start telegraf at boot time
Loaded: loaded (/etc/rc.d/init.d/telegraf; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
$ systemctl restart telegraf
$ systemctl status telegraf
● telegraf.service - LSB: Start telegraf at boot time
Loaded: loaded (/etc/rc.d/init.d/telegraf; bad; vendor preset: disabled)
Active: active (exited) since Wed 2018-12-05 19:47:50 UTC; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 966 ExecStart=/etc/rc.d/init.d/telegraf start (code=exited, status=0/SUCCESS)
Dec 05 19:47:50 i-0b8de5454928d.awsdev.inforcloud.local systemd[1]: Starting LSB: Start telegraf at boot time...
Dec 05 19:47:50 i-0b8de5454928d.awsdev.inforcloud.local telegraf[966]: telegraf process is running [ FAILED ]
Dec 05 19:47:50 i-0b8de5454928d.awsdev.inforcloud.local systemd[1]: Started LSB: Start telegraf at boot time.
$ service telegraf status
telegraf Process is running [ OK ]
Expected behavior:
Expected systemctl to be able to recognize that the service is running.
Actual behavior:
systemctl thinks service is not active and the agent must be restarted via systemctl.
Additional info:
This file may need to be updated to handle Amazon Linux 2:
https://github.com/influxdata/telegraf/blob/master/scripts/post-install.sh#L89
The text was updated successfully, but these errors were encountered: