• [^] # Re: très bon en effet

    Posté par . En réponse à la dépêche Gestion des logs avec Logstash, ElasticSearch & Kibana. Évalué à 2.

    Bonjour!

    Avez-vous eu l'occasion de configurer Rsyslog avec ElasticSearch en utilisant le module omelasticsearch ?
    J'essaie mais impossible de faire interagir les deux. J'ai dû louper un épisode.
    Rsyslog et Elasticsearch fonctionnent correctement, sauf que les messages ne sont pas envoyés vers ou n'arrivent pas dans ES.
    Voici la configuration côté Rsyslog :

    # this is for index names to be like: logstash-YYYY.MM.DD
    template(name="logstash-index" type="list") {
     constant(value="logstash-")
     property(name="timereported" dateFormat="rfc3339" position.from="1" position.to="4")
     constant(value=".")
     property(name="timereported" dateFormat="rfc3339" position.from="6" position.to="7")
     constant(value=".")
     property(name="timereported" dateFormat="rfc3339" position.from="9" position.to="10")
    }
    # this is for formatting our syslog in JSON with @timestamp
    template(name="plain-syslog" type="list") {
     constant(value="{")
     constant(value="\"@timestamp\":\"") property(name="timereported" dateFormat="rfc3339")
     constant(value="\",\"host\":\"") property(name="hostname")
     constant(value="\",\"severity\":\"") property(name="syslogseverity-text")
     constant(value="\",\"facility\":\"") property(name="syslogfacility-text")
     constant(value="\",\"tag\":\"") property(name="syslogtag" format="json")
     constant(value="\",\"message\":\"") property(name="msg" format="json")
     constant(value="\"}")
    }
    # this is where we actually send the logs to Elasticsearch (localhost:9200 by default)
    action(type="omelasticsearch" template="plain-syslog" searchIndex="logstash-index" dynSearchIndex="on" server="monserveur.elasticsearch")

    Mon cluster côté elasticsearch a pour nom CLUSTERLOG.

    Ce n'est pas vraiment le sujet du post initial, mais ça pourra toujours éventuellement servir comme alternative. Merci