# Logstash + Collectd

**URL:** <https://discuss.elastic.co/t/logstash-collectd/36757>\
**Category:** Logstash\
**Created:** [December 9, 2015, 3:29pm UTC](https://discuss.elastic.co/t/logstash-collectd/36757 "2015-12-09T15:29:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophe\_Dumont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_dumont/32/82868_2.png) [@Christophe\_Dumont](https://discuss.elastic.co/u/Christophe_Dumont)\
**Post date:** [December 9, 2015, 3:29pm UTC](https://discuss.elastic.co/t/logstash-collectd/36757/1 "2015-12-09T15:29:23Z")

</div>

Hello,

I installed collectd, logstash, elasticsearch and kibana. 😁  
I'd like to generate stats from collectd and send them to ec via logstash.  
It dosen't work.  
Here are my conf files :

logstash.conf  
_input {_

- udp {\*
- port =\> 25826 # 25826 matches port specified in collectd.conf\*
- buffer\_size =\> 1452 # 1452 is the default buffer size for Collectd\*
- codec =\> collectd { } # specific Collectd codec to invoke\*
- type =\> collectd \*
- }\*  
_}_  
_output {_
- elasticsearch { \*
- }\*  
_}_

collectd.conf

\*# For each instance where collectd is running, we define \*  
_# hostname proper to that instance. When metrics from_  
\*# multiple instances are aggregated, hostname will tell \*  
_# us were they came from._  
_Hostname "ilos-stats"_

- 
  - 

_# Fully qualified domain name, false for our little lab_  
_FQDNLookup false_

- 
  - 

_# Plugins we are going to use with their configurations,_  
_# if needed_  
_LoadPlugin cpu_

- 
  - 

_LoadPlugin df_

- 

```
   Device "/dev/sda1"*

```

- 

```
   MountPoint "/"*

```

- 

```
   FSType "ext4"*

```

- 

```
   ReportReserved "true"*

```

- 
  - 

_LoadPlugin interface_

- 

```
   Interface "eth0"*

```

- 

```
   IgnoreSelected false*

```

- 
  - 

_LoadPlugin network_

- 

```
   <Server "localhost" "25826">*

```

- 

```
   </Server>*

```

- 
  - 

_LoadPlugin memory_

- 
  - 

_LoadPlugin syslog_

- 

```
   LogLevel info*

```

- 
  - 

_LoadPlugin swap_

- 
  - 

_\<Include "/etc/collectd/collectd.conf.d"\>_

- 

```
   Filter ".conf"*

```

---

<div class="post-metadata">

**Author:** ![Christophe\_Dumont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_dumont/32/82868_2.png) [@Christophe\_Dumont](https://discuss.elastic.co/u/Christophe_Dumont)\
**Post date:** [December 9, 2015, 3:34pm UTC](https://discuss.elastic.co/t/logstash-collectd/36757/3 "2015-12-09T15:34:35Z")

</div>

collectd.conf updated

Hostname "ilos-stats"

FQDNLookup false

LoadPlugin cpu

LoadPlugin df  
  
Device "/dev/sda1"  
MountPoint "/"  
FSType "ext4"  
ReportReserved "true"

LoadPlugin interface  
  
Interface "eth0"  
IgnoreSelected false

LoadPlugin network  
  
\<Server "localhost" "25826"\>

LoadPlugin memory

LoadPlugin syslog  
  
LogLevel info

LoadPlugin swap

\<Include "/etc/collectd/collectd.conf.d"\>  
Filter ".conf"

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [December 9, 2015, 6:27pm UTC](https://discuss.elastic.co/t/logstash-collectd/36757/4 "2015-12-09T18:27:17Z")

</div>

I would recommend using the `stdout` output with `codec => rubydebug` to troubleshoot this. It will immediately become apparent if data is or is not flowing through Logstash. You may also want to invoke Logstash with the `--verbose` flag, or even the `--debug` flag (warning: Debug throws a LOT of data).

That said, I do not see any glaring errors in your logstash.conf setup.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 10, 2015, 1:13am UTC](https://discuss.elastic.co/t/logstash-collectd/36757/5 "2015-12-10T01:13:25Z")

</div>

I'll second that.

Also it's useful if you format configs etc using the "Preformatted text" button 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:19am UTC](https://discuss.elastic.co/t/logstash-collectd/36757/6 "2017-07-06T05:19:14Z")

</div>


