Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix telegraf service #1252

Merged
merged 1 commit into from
May 24, 2016
Merged

fix telegraf service #1252

merged 1 commit into from
May 24, 2016

Conversation

zbindenren
Copy link
Contributor

@zbindenren zbindenren commented May 24, 2016

There has been a change in systemd service to start telegraf which does not work anymore with the KillMode=process setting.

If you keep that KillMode, a stop just kills the bash, but keeps telegraf service. With that setting, it is possible to run serveral telegraf instances.

With the old setting:

$ systemctl start telegraf

you see following process:

/bin/sh -c /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d  >>/var/log/telegraf/telegraf.log 2>>/var/log/telegraf/telegraf.log

Then with:

$ systemctl stop telegraf

the service is still running.

/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

Only the parent bash got killed. If you start telegraf with sytemd again, the service runs twice.

This Pull Request fixes that issue.

Required for all PRs:

  • CHANGELOG.md updated
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

@sparrc
Copy link
Contributor

sparrc commented May 24, 2016

InfluxDB uses KillMode=control-group, would this work for telegraf?

@zbindenren
Copy link
Contributor Author

That is the default value, that is why I removed the entry.

@sparrc
Copy link
Contributor

sparrc commented May 24, 2016

please leave it explicitly for consistency

@zbindenren
Copy link
Contributor Author

Ok, I change the pull request.

@sparrc
Copy link
Contributor

sparrc commented May 24, 2016

also please update the changelog and I will merge, thank you!

@zbindenren
Copy link
Contributor Author

Changelog and service updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants