Csv data visualize in kibana

Hi,

I Import a .csv file through logstash and want to display it using kibana .
Kibana version 4.5.4

My kibana source file is look like below

message:
2017-02-24,15:30:02,101k/min,101k/min,100k/min,67k/min,67k/min,67k/min
@version:
1
@timestamp:
February 25th 2017, 19:01:22.826
path:
/root/Sheet.csv
host:
xxx.xxx.com
Date:
February 24th 2017, 05:30:00.000
Time:
15:30:02
1 min Msg /sec US-East:
101k/min
1 min Msg /sec US-West:
101k/min
15 min Msg /sec US-East:
100k/min
15 min Msg /sec US-West:
67k/min
5 min Msg /sec US-East:
67k/min
5 min Msg /sec US-West:
67k/min
_id:
AVp1eAH5GQ13ZJHOkAwW
_type:
logs
_index:
testdata
_score:
1

message:
2017-02-25,00:30:01,101k/min,101k/min,102k/min,48k/min,48k/min,49k/min
@version:
1
@timestamp:
February 25th 2017, 19:01:22.829
path:
/root/Sheet.csv
host:
xxxx.xxx.com
Date:
February 25th 2017, 05:30:00.000
Time:
00:30:01
1 min Msg /sec US-East:
101k/min
1 min Msg /sec US-West:
101k/min
15 min Msg /sec US-East:
102k/min
15 min Msg /sec US-West:
48k/min
5 min Msg /sec US-East:
48k/min
5 min Msg /sec US-West:
49k/min
_id:
AVp1eAH5GQ13ZJHOkAwf
_type:
logs
_index:
testdata
_score:
1

I am facing problem When I try to visualize my data ,I don't want count or sum ,I want to display data in y axis 1 min Msg /sec US-East and in x axis date or timestamp . But in y-axis there no such field are coming to display data as it's in csv .

Below is mine logstash conf. file for visualize csv file .

input {
file {
path => "/root/Sheet.csv"
type => "csv"
start_position => "beginning"
}
}
filter {
csv {
separator => ","
columns => ["Date","Time","1 min Msg /sec US-East","5 min Msg /sec US-East","15 min Msg /sec US-East","1 min Msg /sec US-West","5 min Msg /sec US-West","15 min Msg /sec US-West"]
}

}
output {
elasticsearch {
action => "index"
hosts => "localhost:9200"
index => "testdata"
workers => 1
}
stdout {}
}

If your y-axis value is captured only once a day, as it looks to be in your example output, then I think you can:

  • Select Average for the Y-Axis, and pick 1 min Msg /sec US-East in the field drop down (as long as it's being captured as numeric data, it should appear)
  • Select Date histogram for the x-axis, and your Date field, and an interval of Daily

As long as the data is only captured once a day, then the average will be an average over only one value, so it will essentially be that data point.

You can verify this by selecting Count in the Y-Axis and making sure it's always 1 over your given time intervals.

Does that make sense or help?

Am I understanding your problem correctly?

Yes You understanding my problem correctly .

But it's not workout for me because 1 min Msg /sec US-East this data is captured every hour ,means total 24 data captured in a day .

That's the problem :frowning:

You should be able to break the time interval down into hourly, perhaps that will help?

Let me try it once today . I will update you .

@Stacey_Gammon Thanks for your help it's working now and it's visualize , but can you help me how I can display it in discover section ? Currently when we select it in discover section it's showing count against timestamp . So I want ,when I select index from discover section there should be 6 graph which display on click like 1 min Msg /sec US-East vs @timestamp ,15 min Msg /sec US-East vs @timestamp etc.

Unfortunately the chart in the discover tab can't be modified. Perhaps creating a dashboard with a chart you desire at the top, and a saved search at the bottom, could fulfill your needs?

Yup it's fulfill my needs . Thanks a lot :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.