# Influxdb and telegrapf for many devices

**URL:** <https://community.influxdata.com/t/influxdb-and-telegrapf-for-many-devices/21885>\
**Category:** Welcome & Getting Started\
**Created:** [September 28, 2021, 9:23pm UTC](https://community.influxdata.com/t/influxdb-and-telegrapf-for-many-devices/21885 "2021-09-28T21:23:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffarkas](https://avatars.discourse-cdn.com/v4/letter/f/e47774/32.png) [@ffarkas](https://community.influxdata.com/u/ffarkas)\
**Post date:** [September 28, 2021, 9:23pm UTC](https://community.influxdata.com/t/influxdb-and-telegrapf-for-many-devices/21885/1 "2021-09-28T21:23:17Z")

</div>

Hello

I recently came across Influxdb and still don’t quite understand the concept.  
I have about 60 devices to monitor, some of which can only do SNMP.  
Since according to the documentation it is recommended to use a maximum of 20 buckets ([Create a bucket in InfluxDB | InfluxDB OSS 2.0 Documentation](https://docs.influxdata.com/influxdb/v2.0/organizations/buckets/create-bucket/)) I wonder if it is possible to have multiple devices communicate with one Telegraf agent and write this data to a single bucket?  
If this is possible, can I then filter this data again by device and display it in a dashboard or will it get mixed up? Do all devices in a bucket have to monitor the same data and values or can they differ from each other? Unfortunately I don’t understand the concept enough here.

My idea would be to run a Telegraf agent with the SNMP plugin on the same server as Influxdb. The devices to be monitored are located across the country and would then communicate over the internet with the one Telegraf Agent on the server.  
The devices that don’t need SNMP would then get their own Telegraf Agent installed locally, which would transmit the data to the Influxdb server.  
For this I would make two buckets. One for the SNMP devices and one for the other devices. Is this possible or can you suggest a better solution?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [September 29, 2021, 7:46pm UTC](https://community.influxdata.com/t/influxdb-and-telegrapf-for-many-devices/21885/2 "2021-09-29T19:46:16Z")

</div>

Hello @ffarkas,  
Yes it’s entirely possible I would write data from 60 devices to one bucket and include the device name as a tag or a field to know which device you’re writing from. (I’d include it as a tag if your device number is limited. If there’s a possibility for unbounded device growth then I’d make thte device name a field).  
All devices in a bucket do not have to monitor the same data. I’d take a look at the following sample dataset to get a better feel:

> **[Sample data | InfluxDB OSS 2.6 Documentation](https://docs.influxdata.com/influxdb/v2.0/reference/sample-data/#air-sensor-sample-data)**
>
> Use sample data to familiarize yourself with time series data and InfluxDB. InfluxData provides many sample time series datasets to use with InfluxDB and InfluxDB Cloud.

I encourage you to imoport it and then write it to a dummy bucket with:  
|\> to(bucket:“mytemporarybucket”)  
So you can play with the Data explorer and understand how you can visualize and query for your data with Flux. Then you can delete that bucket once you have a good understanding.

You might also find the following resources helpful:

> **[InfluxDB key concepts | InfluxDB OSS 2.6 Documentation](https://docs.influxdata.com/influxdb/v2.0/reference/key-concepts/)**
>
> Concepts related to InfluxDB.

> **[Data Layout and Schema Design Best Practices for InfluxDB](https://www.influxdata.com/blog/data-layout-and-schema-design-best-practices-for-influxdb/)**
>
> This post shows how to figure out the best data layout for InfluxDB v2, some schema design best practices, and a schema development example.

I would probably just write your SNMP devices and your other devices in the same bucket and separate out the two into different measurements within the same bucket.

The only reason to put data into separate buckets if you need different authentication tokens for each bucket and need to isolate the data. Authentication tokens are scoped to buckets. For example if you were writing a customer facing IoT application on top of InfluxDB then you might choose to go with a bucket/user model and generate new write token scoped to each users’ bucket so that you don’t have to write a read/write gateway assuming the developers are satisfied with the features of the InfluxDB write API. (such a long run on sentence…I hope it makes sense still 😛 )
