input{
file {
path => "/home/elastic/elk/logstash-6.4.3/csv_data/attrition_dump_v3.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
file {
path => "/home/elastic/elk/logstash-6.4.3/csv_data/workday_dump_v3.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter{
if [path] == "/home/elastic/elk/logstash-6.4.3/csv_data/attrition_dump_v3.csv"
{
csv {
columns => ["Emp id","Full Name","Original Hire date","Hire Date","Last Day of Work","Quarter","Tenure","Tenure in years","Termination Reason","Reason","Vol/Invol",
"Position Title","Grade","Cost Center - Name","Mgr Name","Goal","Competency","Leader","Kumar -1","BU","Team"]
separator => ","
}
mutate {
add_field => { "doc_type" => "attrition" }
add_field => {"id" => ""}
copy => {"Emp id" => "id" }
remove_field => [ "message" ]
}
}
else if [path] == "/home/elastic/elk/logstash-6.4.3/csv_data/workday_dump_v3.csv"
{
csv {
columns => ["Employee ID","Employee","Last,First Name","Email - Primary Work","Hire Date","Original Hire Date","Is Rehire","Years of Service","Company Service Date",
"Continuous Service Date","Seniority Date","Time in Job Profile","Time in Job Profile Start Date","Time in Position","Position","Job Title","Job Profile",
"Grade Profile ID","Grade","Grade Effective Date","Employment Status","Leave Type","Employee Type","Worker Type","Full/Part","Reg/Temp","Worker SubType","Exempt/Non-Exempt","Pay Rate Type","Scheduled Std Hours - Calculated FTE","Location Std Hours","Default Weekly Hours","FTE","Cost Center - ID","Cost Center - Name","HFM-Code","HFM-Function","HFM-SubFunction","Profit Center","Product Code","IES/Novella","Project ID","Project Description","Tech/Non-Tech","Client Facing Y/N","Worker's Business Unit","HR BU","SBU","Finance BU","Department","FM Entity","Custom 1","Custom 2","HR Category","Company","Location Code","Location","City","State","Country Name","Mature/Emerging","Geo Region","No. of Directs","Manager ID","Manager Name","Tier 1","Tier 2","Tier 3","Tier 4","Tier 5","Tier 6","Tier 7","Last Base Pay Increase - Date","Last Base Pay Increase Reason","Total Pay - Amount","Total Base Pay - Amount","Total Base Pay (Base or Basis) Local","Hourly Rate - Amount","Total Base Pay - Frequency","Total Base Pay - Currency","Total Base Pay in USD","Total Base Pay (Base or Basis) USD","Pay Range - Minimum","Pay Range - Midpoint","Pay Range - Maximum","Compa Ratio (Base or Basis)","Compa Ratio Bucket","VC Plan ID","VC Plan Name","Target Bonus - Percent","Target Bonus - Amount","Target Bonus - Currency","Target Bonus Amount in USD","CS Summary Role","Billable Stat","Job Family","Job Family Group","Competency Rating (2017/18)","Goal Rating (2017)","Competency Rating (2016/17)","Goal Rating (2016)","Competency Rating (2015/16)","Goal Rating (2015)","Legacy Organization"]
separator => ","
}
mutate {
add_field => { "doc_type" => "workday" }
add_field => {"id" => ""}
copy => {"Employee ID" => "id" }
remove_field => [ "message" ]
}
}
uuid {
target => "uuid"
}
}
output {
elasticsearch
{
index => "xg_hr_details-000001"
action => "update"
document_id => "%{[Employee ID]}"
doc_as_upsert => "true"
hosts => "http://caruelsatic01p:9200/"
}
}