# Nodered-sending data to INFLUXDB STACKHERO

**URL:** <https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515>\
**Category:** General\
**Created:** [6 September 2020 17:11 UTC](https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515 "2020-09-06T17:11:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tazkiller2001](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@tazkiller2001](https://discourse.nodered.org/u/tazkiller2001)\
**Post date:** [6 September 2020 17:11 UTC](https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515/1 "2020-09-06T17:11:48Z")

</div>

Hello

This is my first topic.

I have problems sending data to InfluxDB which is hosted by stackhero.

I'm getting this error (org i replaced på XXXXXXX, but i correct ind the code) :

FetchError: request to [https://https//xxxxxx.stackhero-network.com:443/api/v2/write?org=XXXXXXXXaf&bucket=myBucket&precision=ns](https://https//xxxxxx.stackhero-network.com:443/api/v2/write?org=XXXXXXXXaf&bucket=myBucket&precision=ns) failed, reason: getaddrinfo ENOTFOUND https

and uses the consequences

> **[node-red-contrib-stackhero-influxdb-v2](https://flows.nodered.org/node/node-red-contrib-stackhero-influxdb-v2)**
>
> A Node-RED node to connect to an InfluxDB v2 database.

Don´t now if it is stackhero or somthing else

hope you can help

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 September 2020 19:12 UTC](https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515/2 "2020-09-06T19:12:44Z")

</div>

Show us how you have configured the influxdb node. Have you put `https` on the front of the url where it should just be the url? The clue is that there are two in the error.

---

<div class="post-metadata">

**Author:** ![tazkiller2001](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@tazkiller2001](https://discourse.nodered.org/u/tazkiller2001)\
**Post date:** [7 September 2020 07:02 UTC](https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515/3 "2020-09-07T07:02:04Z")

</div>

Thanks! now i don´t get any error 🙂

But no data i getting into IndfluxDB.

![nodred stackhero forum](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db4aa3a7c9ba924ac40c22e401f71adfe3988975.jpeg)

I´m using a test Json just to see if the messuerments is getting in the database.

msg.payload = {  
// You bucket  
// Optional (it can be defined in the node credentials settings)  
bucket: 'IOTDEAS',

// Precision of timestamp  
// Optional  
// Can be `ns` (nanoseconds),  
// `us` (microseconds),  
// `ms` (milliseconds),  
// `s` (seconds).  
// The default is `ns`  
precision: 'ns',

// Data to send to InfluxDB  
// Can be an array of objects or only one object  
data: [  
{  
measurement: 'machinerySensor',

```
  tags: {
    deviceId: 'gyh43',
    hardwareVersion: '1.0.2',
    softwareVersion: '2.5.1',
    location: 'factory-1'
  },

  fields: {
    temperature: 12,
    humidity: 46,
    vibrations: 18,
    batteryVoltage: 3.6
  },

  timestamp: Date.now()
},

// More data can be send here, simply re add an object
// { ... },

```

]  
};

return msg;

---

<div class="post-metadata">

**Author:** ![tazkiller2001](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@tazkiller2001](https://discourse.nodered.org/u/tazkiller2001)\
**Post date:** [7 September 2020 08:07 UTC](https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515/4 "2020-09-07T08:07:04Z")

</div>

Info.

It is solved, thanks for your input

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 November 2020 08:07 UTC](https://discourse.nodered.org/t/nodered-sending-data-to-influxdb-stackhero/32515/5 "2020-11-06T08:07:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
