-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsales.conf
57 lines (57 loc) · 926 Bytes
/
sales.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
input
{
file
{
#mode => "tail"
#file_completed_action => "log"
#file_completed_log_path => "C:/logstash-7.1.1/log.txt"
path => "F:/PRANAY/project/Store Mg C++/sales.csv"
#sincedb_path => "F:/PRANAY/project/Store Mg C++/salesince.db"
#sincedb_write_interval => 5
start_position => "beginning"
}
}
filter
{
csv
{
separator => ","
autodetect_column_names => true
}
grok
{
match =>
{
"selling_date" => "%{WORD:method} %{GREEDYDATA:selling}"
}
}
mutate
{
convert =>
{
"product_quantity" => "integer"
"product_price" => "integer"
"total_cost" => "integer"
}
replace => ["selling_date","%{selling}"]
}
date
{
match => ["selling_date" , "MMM d H:mm:ss YYYY","MMM dd H:mm:ss YYYY"]
target => "selling_date"
#locale => "en"
timezone => "UTC"
}
}
output
{
elasticsearch
{
hosts => ["localhost:9200"]
index => "sales_index"
}
stdout
{
codec => rubydebug
}
}