Issue Integrating ChirpStack with InfluxDB - No Data Visible

Hello,


I’ve been working on setting up an integration between ChirpStack and InfluxDB with the goal of visualizing sensor data directly in InfluxDB. Despite following the setup steps, including obtaining the API key from InfluxDB and using it as the password for the integration, I find myself stuck as no data is showing up in InfluxDB. This has left me puzzled about where the problem might lie – is it an issue with InfluxDB’s setup or something on the ChirpStack side? I’m reaching out to see if anyone in the community has encountered a similar issue and could offer some insights or solutions. Any help or direction would be greatly appreciated as I navigate this integration challenge.

TIA.

Hello @SajeevanVeeriah,
Thank you for your question. Let me start by saying I’m sorry for the delay I was out of office.

Hmmm I’m not sure. It could be a ChripStack issue.
Are you able to perform a write with cURL for example to test your authentication credentials?

curl --request POST \
"http://localhost:8086/api/v2/write?org=YOUR_ORG&bucket=YOUR_BUCKET&precision=ns" \
  --header "Authorization: Token YOUR_API_TOKEN" \
  --header "Content-Type: text/plain; charset=utf-8" \
  --header "Accept: application/json" \
  --data-binary '
    airSensors,sensor_id=TLM0201 temperature=73.97038159354763,humidity=35.23103248356096,co=0.48445310567793615 
    '

What format is your data in with ChirpStack? Is it converting it to line protocol? Are you getting any errors?

Also what is your project? I’d love to learn more about it. Is this a hobby project or for fun? Thanks!

@SajeevanVeeriah could be related to

Hi @Anaisdg ,

Thank you for your guidance and no worries with the delay.

I will attempt the cURL test with my authentication credentials as you’ve suggested to verify their validity. I am not certain about how the data from ChirpStack is intended to be converted into for InfluxDB. The payload decoder is written JS, payload is sent to Chirpstack as HEX and it is decoded with the measurements at Chirpstack itself. My intention is to pass that values to InfluxDB to store and visualise in Grafana.

So far, I have done the intergations and Grafana is able to talk to InfluxDB and filter the data. However, I am unable to see anything in InfluxDB including error logs. Since I am newbie, I am still learning to be specific learning by application.

The project in question is part of my work, where I’m exploring IoT solutions for smart city applications. It’s a PoC project; it aims to leverage IoT and sensor data to optimize practices and management. This involves collecting data from various sensors across a farm to monitor conditions in real time. The goal is to integrate this data with InfluxDB for analysis and decision-making processes to improve safety and efficiency.

I appreciate your interest in the project and would be happy to share more details as it progresses.

Best regards,
Saj

Hi @Anaisdg
Below is the error message I get when I run the cURL command.

{“code”:“unauthorized”,“message”:“unauthorized access”}zsh: command not found

@SajeevanVeeriah did you managed to solve the problem. I am stuck at the same situation.

Hi @Mofassair,

I have not completely solved the problem however, resolved couple of it.

To troubleshoot:

  1. Initially check the logs for the authorisation.
  2. If they API integration is correct, then you might have to restart the server (Chirpstack/InfluxDB/Grafana) for the changes to take affect. Detail: Some settings and authorisations get applied without a reboot, some require a reboot to have system level authentication.
  3. Check your telegraf configuration and ensure that the inputs/outputs pointing the right fetch-point and endpoint.
  4. Create a generic scraper for each bucket, sometimes the telegraf does not allow the data to be displayed if proper telegraf is not configured.

Let me know how you go from here, I am still fixing my end too.

1 Like

@SajeevanVeeriah Thanks for sharing your solution so far.