Skip to content

Instantly share code, notes, and snippets.

@wellcomer
Created April 21, 2015 07:32
Show Gist options
  • Save wellcomer/17ccaa5685a1258a994b to your computer and use it in GitHub Desktop.
Save wellcomer/17ccaa5685a1258a994b to your computer and use it in GitHub Desktop.
elasticsearch-templates
#!/bin/sh
curl -XPUT localhost:9200/_template/exim -d '{
"template" : "exim-*",
"mappings" : {
"_default_" : {
"_all" : {"enabled" : false},
"properties" : {
"@version": { "index": "analyzed", "type": "integer" },
"@timestamp": { "index": "analyzed", "type": "date" },
"exim_conn_info" : { "type" : "string" },
"exim_date" : { "type" : "string" },
"exim_day" : { "type" : "byte" },
"exim_dkim_a" : { "type" : "string" },
"exim_dkim_c" : { "type" : "string" },
"exim_dkim_d" : { "type" : "string" },
"exim_dkim_s" : { "type" : "string" },
"exim_dkim_status" : { "type" : "string" },
"exim_dkim_t" : { "type" : "string" },
"exim_dn" : { "type" : "string" },
"exim_dt" : { "type" : "string" },
"exim_error" : { "type" : "string" },
"exim_error_info" : { "type" : "string" },
"exim_flag" : { "type" : "string" },
"exim_header_id" : { "type" : "string" },
"exim_interface" : { "type" : "string" },
"exim_interface_port" : { "type" : "integer" },
"exim_local_user" : { "type" : "string" },
"exim_mail_alias" : { "type" : "string" },
"exim_mail_domain" : { "type" : "string" },
"exim_mail_from" : { "type" : "string" },
"exim_mail_to" : { "type" : "string" },
"exim_mail_user" : { "type" : "string" },
"exim_month" : { "type" : "byte" },
"exim_msg_size" : { "type" : "long" },
"exim_msg_state" : { "type" : "string" },
"exim_msgid" : { "type" : "string" },
"exim_pid" : { "type" : "string" },
"exim_protocol" : { "type" : "string" },
"exim_qt" : { "type" : "string" },
"exim_remote_heloname" : { "type" : "string" },
"exim_remote_host" : { "type" : "ip" },
"exim_remote_hostname" : { "type" : "string" },
"exim_remote_port" : { "type" : "integer" },
"exim_return_path" : { "type" : "string" },
"exim_router" : { "type" : "string" },
"exim_smtp_confirmation" : { "type" : "string" },
"exim_time" : { "type" : "string" },
"exim_tls_info" : { "type" : "string" },
"exim_transport" : { "type" : "string" },
"exim_year" : { "type" : "byte" },
"host" : { "type" : "string" },
"message" : { "type" : "string" },
"type" : { "type" : "string" }
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment