setlem  
                
               
                 
              
                  
                    November 9, 2016,  1:01pm
                   
                   
              1 
               
             
            
              Hi all, 
i am trying to create custom elasticsearch template. 
after i create a template and update it in .conf am not getting any output. 
My template is:
curl -XPUT http://localhost:9200/_template/logstash_indexPattern_line  -d '
{ 
"logstash": { 
"order": 0, 
"template": "data-", 
"settings": { 
"index": { 
"refresh_interval": "5s" 
} 
}, 
"mappings": { 
"default ": { 
"dynamic_templates": [ 
{ 
"message_field": { 
"mapping": { 
"fielddata": { 
"format": "disabled" 
}, 
"index": "not_analyzed", 
"omit_norms": true, 
"type": "string" 
}, 
"match_mapping_type": "string", 
"match": "message" 
} 
}, 
{ 
"string_fields": { 
"mapping": { 
"fielddata": { 
"format": "disabled" 
}, 
"index": "not_analyzed", 
"omit_norms": true, 
"type": "string", 
"fields": { 
"raw": { 
"ignore_above": 256, 
"index": "not_analyzed", 
"type": "string" 
} 
} 
}, 
"match_mapping_type": "string", 
"match": " " 
} 
} 
], 
"_all": { 
"omit_norms": true, 
"enabled": true 
}, 
"properties": { 
"@timestamp ": { 
"type": "date" 
}, 
"geoip": { 
"dynamic": true, 
"properties": { 
"ip": { 
"type": "ip" 
}, 
"latitude": { 
"type": "float" 
}, 
"location": { 
"type": "geo_point" 
}, 
"longitude": { 
"type": "float" 
} 
} 
}, 
"@version ": { 
"index": "not_analyzed", 
"type": "string" 
} 
} 
} 
}, 
"aliases": {} 
} 
}'
 
 
my conf file is:
is this the correct way to do it? or am doing anything wrong? Please help me with my errors.
             
            
               
               
               
            
            
           
          
            
            
              Your index is named data2 but your template matches data-*.
             
            
               
               
               
            
            
           
          
            
              
                setlem  
                
               
              
                  
                    November 10, 2016,  9:19am
                   
                   
              3 
               
             
            
              thanks for ur reply magnus. 
even though i changed it..i am not getting any output 
i am getting this in my cmd
   "message" => "PATH=C:\\ProgramData\\Oracle\\Java\\javapath;C:\\windows\\s
 
ystem32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPo 
werShell\v1.0\;C:\Program Files\nodejs\;C:\windows\system32\config\syst 
emprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files 
\TortoiseGit\bin;C:\windows\System32\WindowsPowerShell\v1.0\;C:\ProgramDa 
ta\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System 
32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nod 
ejs\;C:\windows\system32\config\systemprofile\.dnx\bin;C:\Program Files 
\Microsoft DNX\Dnvm\;C:\Program Files\TortoiseGit\bin;C:\windows\System32 
\WindowsPowerShell\v1.0\;D:\ELK_stack\logstash-2.4.0\r", 
"@version " => "1", 
"@timestamp " => "2016-11-10T08:44:14.371Z", 
"path" => "C:\Users\1006541\Desktop\RAMA\input1.csv", 
"host" => "01HW345434", 
"ORDER_ID" => "PATH=C:\ProgramData\Oracle\Java\javapath;C:\windows\s 
ystem32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPo 
werShell\v1.0\;C:\Program Files\nodejs\;C:\windows\system32\config\syst 
emprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files 
\TortoiseGit\bin;C:\windows\System32\WindowsPowerShell\v1.0\;C:\ProgramDa 
ta\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System 
32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nod 
ejs\;C:\windows\system32\config\systemprofile\.dnx\bin;C:\Program Files 
\Microsoft DNX\Dnvm\;C:\Program Files\TortoiseGit\bin;C:\windows\System32 
\WindowsPowerShell\v1.0\;D:\ELK_stack\logstash-2.4.0" 
}
 
 
             
            
               
               
               
            
            
           
          
            
            
              
even though i changed it..i am not getting any output
 
Output from what?
i am getting this in my cmd
 
If you delete your existing index and let Logstash create a new one, is your index template applied as expected?
             
            
               
               
               
            
            
           
          
            
              
                setlem  
                
               
              
                  
                    November 10, 2016,  9:48am
                   
                   
              5 
               
             
            
              Hi 
i am creating new new index  for logstash.
the output I mentioned is the output I get when I run my config file in command prompt.
             
            
               
               
               
            
            
           
          
            
            
              What's the name of the index you're creating? Does it have the correct mappings?
             
            
               
               
               
            
            
           
          
            
              
                system  
                (system)
                  Closed 
               
              
                  
                    December 8, 2016,  9:57am
                   
                   
              7 
               
             
            
              This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.