Comments (8)
Was just thinking the same thing when reviewing #35
from docs-v2.
I added the required lines to my telegraf.conf file, but so far it hasn't been working to actually write metrics to the db. I can write something up as soon as I figure it out.
from docs-v2.
@davidgs Be sure to export your 2.0 token as the INFLUX_TOKEN
evar before starting up Telegraf with the new config.
Here's how to get it: https://v2.docs.influxdata.com/v2.0/users/tokens/view-tokens/
from docs-v2.
It was as simple as not setting the "Organization" ... I'll write something up. It's super simple once you're not being a bone-head.
from docs-v2.
The token can be sourced as an env var -- but, it can also be embedded in the config (just like v1 creds).
from docs-v2.
I was working on a page for this topic yesterday -- will continue it today. I was confused about the token bit too. @davidgs -- anything you learn and share will likely save me from some cognitive friction.
from docs-v2.
Using an exiisting Telegraf for v2.0 alpha
Create a new telegraf config file
$ telegraf config > telegraf.conf
Then edit the created (default) telegraf.conf
file created according to the steps below:
Edit an existing telelgraf config file
Add the following to your existing telegraf.conf
file:
# # Configuration for sending metrics to InfluxDB
# [[outputs.influxdb_v2]]
# ## The URLs of the InfluxDB cluster nodes.
# ##
# ## Multiple URLs can be specified for a single cluster, only ONE of the
# ## urls will be written to each interval.
# urls = ["http://127.0.0.1:9999"]
#
# ## Token for authentication.
# token = ""
#
# ## Organization is the name of the organization you wish to write to; must exist.
# organization = ""
#
# ## Destination bucket to write into.
# bucket = ""
#
# ## Timeout for HTTP messages.
# # timeout = "5s"
- You must add the information for your host (url) -- and uncomment the
urls
line. - In addition, you must either add your
TOKEN
to the "token=" line or export it as theINFLUX_TOKEN
environment variable.
To determine your token, use the InfluxDB user interface (UI) or the influx command line interface (CLI).
View tokens in the InfluxDB UI
- Click the Influx icon in the navigation bar.
- In the right panel labeled My Settings, click Tokens. All of your account’s tokens appear.
- Click on a token name from the list to view the token and a summary of access permissions.
View tokens using the influx CLI
- Use the
influx auth find
command to view tokens.
influx auth find
Filtering options such as filtering by authorization ID, username, or user ID are available.
-
Set the
organization
field in the config file to an existing organization in your InfluxDBv2.0 instance -
Set the
bucket
field to an existing bucket in your InfluxDBv2.0 instance. -
Make sure that the
organization
andbucket
lines are not commented out (remove the#
from the beginning of the line).
Restart telegraf.
##Troubleshooting
If you are not seeing data written from telegraf to influxdb, set the location of the telegraf.log
file in the telegraf.conf
file, and then run telegraf --debug -config <location of config file>
and then watch what is written to the log file.
from docs-v2.
To clarify about tokens - All requests to the 2.0 API must be authenticated. Any request that doesn't include a token is blocked. The Telegraf InfluxDB v2 output plugin includes a token
config that can be used to hardcode a token into the file or you can add it as the INFLUX_TOKEN
environment variable.
from docs-v2.
Related Issues (20)
- Silenteye HOT 1
- broken link on 2.x migration docs HOT 4
- Telegraf/v1/plugin
- Fixed bugs
- 1.x OSS updates
- Document multi-row SQL operations with OVER
- Supports both Linux and macOS date command options. HOT 1
- Add Troubleshooting section with additional context on API errors HOT 4
- http-write-timeout documentation is wrong
- "Template" Serializer Documentation Missing
- Remove the Clustered "limited availability" note
- Cloud Dedicated write limit recommendations
- Update OSS 1.x to 1.11
- Commo HOT 1
- Callbacks in python samples don't work
- docker compose file doesn't seem to be complete in doc
- Review and update OSS install instructions
- Document the three allowed format strings for custom partitioning HOT 5
- Modern Alerting Support for Kapacitor Lacking.
- Fix analytics tracking HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs-v2.