Logstash cheat sheet: Difference between revisions

Line 51: Line 51:
<syntaxhighlight lang="javascript" enclose="div">
<syntaxhighlight lang="javascript" enclose="div">
   # For Beat and LSF compatibility                                                                               
   # For Beat and LSF compatibility                                                                               
   if [beat][hostname] {
   if [beat][host] {
     # Remove host metadata                                                                                       
     # Remove host metadata                                                                                       
     mutate {
     mutate {
Line 58: Line 58:
     mutate {
     mutate {
       add_field => {
       add_field => {
         "host" => "%{[beat][hostname]}"
         "host" => "%{[beat][host]}"
       }
       }
     }
     }
</syntaxhighlight>
</syntaxhighlight>
:beat.hostname ではなく beat.host つかえと...


===logstash の書籍===
===logstash の書籍===