DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Scaling InfluxDB for High-Volume Reporting With Continuous Queries (CQs)
  • How to Port CV/ML Models to NPU for Faster Face Recognition
  • Networking in DevOps: Your Beginner Guide
  • Protecting Critical Infrastructure From Ransomware

Trending

  • Zero Trust for AWS NLBs: Why It Matters and How to Do It
  • Performance Optimization Techniques for Snowflake on AWS
  • Fixing Common Oracle Database Problems
  • Teradata Performance and Skew Prevention Tips
  1. DZone
  2. Data Engineering
  3. Databases
  4. Enabling The Things Network for InfluxDB

Enabling The Things Network for InfluxDB

Want to bring The Things Network's IoT data-gathering capabilities to a time series database that can handle it? Here's how to connect it to InfluxDB.

By 
David G. Simmons user avatar
David G. Simmons
DZone Core CORE ·
May. 28, 18 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
8.4K Views

Join the DZone community and get the full member experience.

Join For Free

I’ve been on the road a bit lately. Ok, so a lot. I spent a week at KubeCon EU demoing InfluxDB and IoT at the EclipseIoT booth, and then I spent a week presenting at the ICTP Workshop on monitoring Radiation data via LoRa networks. I’m sure that all sounds ridiculously exciting to you. It was more exhausting than anything. As a side note, I managed to walk a total of 25 miles over 2 days during those trips, which is personally pretty amazing.

While I was instructing at the ICTP workshop — and let me say that it was both an honor and a privilege to be around the incredibly smart attendees under the auspices of the United Nations — I was asked if it was possible to connect The Things Network, which the workshop was using to collect sensor data, to InfluxDB. I figured it would be, and that it wouldn’t be that hard, but I was a little shocked at how simple it really was! Here’s the rundown.

First, I installed InlfuxDB, Telegraf, etc. on a server in the ICTP Lab. Next, I had to configure the Telegraf instance to read from the TTN (The Things Network) server. Luckily, it is a simple MQTT broker, so all I had to do was edit the telegraf.conf file and add the following section:

[[inputs.mqtt_consumer]]
    servers = ["tcp://eu.thethings.network:1883"]
    qos = 0
    connection_timeout = "30s"
    topics = [ "+/devices/+/up" ]
    client_id = ""
    username = “username"
    password = “password"
    data_format = "json"


A restart of Telegraf, and suddenly, a ton of data was streaming from their sensors! Of course, you’ll have to use real values for your own username and password.

I wish that this was a longer blog post, but it’s hard to stretch this out much more given how easy it was to integrate TTN with InfluxDB. The really neat thing about the Telegraf MQTT plugin is that it automatically ‘flattened’ the JSON payload from the TTN MQTT broker and imported the resultant data into InfluxDB with no additional effort on my part.

If you’re using TTN, and you want an easy way to analyze and visualize your data, try pulling it into InfluxDB! It’s super easy, super fast, and gives you access to data analysis and dashboarding very quickly.

InfluxDB Network

Published at DZone with permission of David G. Simmons, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Scaling InfluxDB for High-Volume Reporting With Continuous Queries (CQs)
  • How to Port CV/ML Models to NPU for Faster Face Recognition
  • Networking in DevOps: Your Beginner Guide
  • Protecting Critical Infrastructure From Ransomware

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!