Redis input socketerror, Error: initialize: name or service not known


(Layla) #1

I have configured a logstash before the log comes to elasticache for redis, below is the configuration and I can send the syslog to elasticache for redis successfully.

indent preformatted text by 4 spaces
 input {
    stdin {
    }
}

output {
    redis {
            host => "amazonaws.com:6379"
            data_type => "list"
            key => "logstash"
    }
} 

However, I also put an instance after elasticache for redis, I have set below configuration but logstash cannot get the data from elasticache, and I have also get the below error from logstash log. Please kindly help!

indent preformatted text by 4 spaces
input {
    redis {
            host => "amazonaws.com:6379"
            #type => "redis-input"
            data_type => "list"
            key => "logstash"
            codec => "json"
    }
}

output {
    amazon_es {
            hosts => "ap-southeast-1.es.amazonaws.com"
            region => "ap-southeast-1"
            aws_access_key_id =>'######'
            aws_secret_access_key => '######'
    }
}

(Magnus B├Ąck) #2

The hostname in the redis input isn't the same as in the redis output. The latter resolves correctly in DNS but the former doesn't.


(Layla) #3

Oh yes!! Thanks for pointing out the mistake! It works now!


(system) #4

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