Logstash collectd config

Hi All,

I have done logstash and collectd config as mentioned below:

logstash.conf:

output {

            redis { host => ["0.0.0.0", "0.0.0.1"] data_type => "list" key => "abc" password => "xyz" }
    }

input
{
udp {
port => 25826
buffer_size => 1452
codec => collectd { }
type => collectd
}

}

collectd.conf:

Hostname "localhost"
FQDNLookup false
LoadPlugin df
LoadPlugin interface
LoadPlugin network

Device "/dev/sha" MountPoint "/" FSType "ext4" ReportReserved "true" Interface "eth0" IgnoreSelected false

I am able to get output in file on that server but unable to view data on Graylog/Kibana UI.

Please guide.

With collectd, you have to go into the network section that was enabled by the LoadPlugin network line and make sure the interface and port are properly configured, and uncommented.

Hi :slight_smile: ,

I think i am confused.

actually i am configuring collectd on one of the node servers not on master server and in network plugin section i have mentioned node IP and UDP default port.

is that right?

Node servers would have to be configured to forward to a centralized collectd instance the same way. You did not mention that in your configuration. I'm confused because you named the node Hostname "localhost", which does not look like a multi-machine configuration at all, but rather a single, local configuration.

my network plugin:
<Plugin network>
        <Server "0.0.0.2" "25826">
        </Server>
</Plugin>

Also, it's really hard to tell what your Logstash configuration is supposed to do because the output block only sends to Redis. How does it get into Elasticsearch, or Graylog for that matter?

Without those configuration details, you can't expect us to troubleshoot this for you. You gave us incomplete details.

It sounds to me like you need to simplify this and test sending from your collectd instance to a Logstash instance that is not sending to redis, but to stdout with the rubydebug codec, so you can see what is flowing. Only when you have guaranteed that traffic is flowing properly should you take the additional step of sending it on through redis.

output {
  stdout {
    codec => rubydebug
  }
}

You will have to launch this logstash instance from the command line for this to work properly. You shouldn't be launching Logstash as a service until you're certain that the pipeline flow is doing what it should (and this troubleshooting step helps with that).

Hi ,

i miss-understood collectd conf.

Thanks for you help. :slight_smile:

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