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

Suggestions for using telegraf without influxdb #30

Open
stevenscg opened this issue Mar 2, 2018 · 2 comments
Open

Suggestions for using telegraf without influxdb #30

stevenscg opened this issue Mar 2, 2018 · 2 comments

Comments

@stevenscg
Copy link

I'm new to telegraf and this role, but the role looks great!

Do you have any suggestions for using this role with alternate output plugins (librato, datadog, etc) and without influxdb?

It looks like telegraf.conf.j2 could be modified to make the [[outputs.influxdb]] section optional and add a new section [[outputs.{{ plugin.name }}]] similar to the inputs one.

Also in the same file, I see a section header service PLUGINS. What, if anything, was intended to go in there?

Finally, do telegraf administrators typically use /etc/telegraf/telegraf.d/ or not?

@rossmcdonald
Copy link
Owner

Unfortunately I'm not very familiar with the other available outputs, so there is definitely room for improvement there. Right now the role is very geared towards using InfluxDB as the output, but the input logic could pretty much be copied to the output logic for the same effect (declarative, through yaml). If you end up making any changes, I'd be happy to review a PR if you want to merge them back upstream.

Regarding:

Also in the same file, I see a section header service PLUGINS. What, if anything, was intended to go in there?

That is leftover from an older version and can be disregarded. I'll remove it from the template shortly.

Finally, do telegraf administrators typically use /etc/telegraf/telegraf.d/ or not?

I know some users do, especially if they are on shared servers (each team can manage their own .d config). I personally prefer to keep everything in one file, unless there's a compelling reason not to.

@stevenscg
Copy link
Author

I did some customization of the role for my usage and can put it up for you to look at.

Basically, I moved the influx stuff to a template file that is rendered into telegraf.d and made it optional. The "data-driven" outputs templating works great, so I created a similar version of that for inputs plugins. I tried using template files for statsd, datadog, and librato, but ended up ditching those in favor of the data-driven approach.

diraol added a commit to diraol/telegraf that referenced this issue Mar 21, 2019
I've refactored the template in order to enable multiple 'outputs'.
This required also refactoring the defaults/main.yml file to be in
accordance with the template.

Fix rossmcdonald#30
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

No branches or pull requests

2 participants