Logstash + Collectd

Hello,

I installed collectd, logstash, elasticsearch and kibana. :grin:
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"*
    

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"

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.

I'll second that.

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