Hey All,
Apologies if this is more aimed towards LogStash.
I have used LogStash to push data to Kibana from a CSV file.
This has so far been successful, my only issue atm is I now want to create a dashboard to view my data, the main data I need to calculate is a Call Duration field. This is in the format HH:MM:SS.
Unfortunately when it pushes this field to Kibana it marks it as a string so I cannot do any calculation on this.
Any help is greatly appreciated.
Cheers,
Danny
This is my LogStash conf file if this is any help.
input {
file {
path => "cdr.log"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
if [message] =~ /^\s*$/ { #DELETE BLANK LINE
drop { }
}
csv {
separator => ","
columns => ["Call Duration","Call Start","Call Answered","Call End","From Name","From Number","To Name","To Number","Final Name","Final Number"]
}
mutate {
gsub => ["From Number", "Ext.", ""]
gsub => ["To Number", "Ext.", ""]
gsub => ["Final Number", "Ext.", ""]
gsub => ["Call Duration", "Call ", ""]
}
}
output{
elasticsearch {
hosts => ["IPHERE"]
index => "3cx-stats"
}
stdout {}
}