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
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

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

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

Related

  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 2
  • Building Resilient Networks: Limiting the Risk and Scope of Cyber Attacks
  • Detection and Mitigation of Lateral Movement in Cloud Networks
  • Understanding IEEE 802.11(Wi-Fi) Encryption and Authentication: Write Your Own Custom Packet Sniffer

Trending

  • A Developer's Guide to Mastering Agentic AI: From Theory to Practice
  • Docker Model Runner: Streamlining AI Deployment for Developers
  • How to Convert XLS to XLSX in Java
  • AI-Driven Test Automation Techniques for Multimodal Systems
  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

  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 2
  • Building Resilient Networks: Limiting the Risk and Scope of Cyber Attacks
  • Detection and Mitigation of Lateral Movement in Cloud Networks
  • Understanding IEEE 802.11(Wi-Fi) Encryption and Authentication: Write Your Own Custom Packet Sniffer

Partner Resources

×

Comments

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: