Data does not change after changing timestamp for kibana dashboard

Hi I've imported a kibana dashboard to another using ansible playbook. After importing I've changed the index for the dashboard, since the index for the imported dashboard does not exist. Ev erything works fine after changing the index. But when i change the date timestamp here the data is not changing accordingly. For example this dashboard is for giving count of successfull and failed jenkins jobs. So even after changing the time to last 15 minutes it is showing me data of last week. When i try to edit the dashboard inside there is no option as shown in the image below for dat timestamp setting

Even when i create a dashboard from scratch i'm facing same problem. There is no setting for date time while editing dashboard.

Hi Neelam,

Dashboards will be created on data views , and every data view will be associated with a timestamp field when creating it. Dashboard time selector will work with that timestamp only.
image

Ok. I am currently creating the index from the cli using

curl -X PUT "elastic_ip:9200/index_name?pretty" -u name:pwd
#create data view
curl -X POST "elastic_ip:5601/api/data_views/data_view" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
  "data_view": {
     "title": "index_name",
     "name": "index_name"
  }
}
' -u username:pwd
#import dashboard
curl -X POST "elastic_ip:5601/api/saved_objects/_import?createNewCopies=true" -H "kbn-xsrf: true" --form file=@./export.ndjson -u username:pwd

How can i add timestamp to this? new to this.

curl -X POST "elastic_ip:5601/api/data_views/data_view" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
  "data_view": {
     "title": "index_name",
     "name": "index_name",
     "timeFieldName": "Timestamp"

}
}
' -u username:pwd

How can i add it to the index? the first field

First i'm having jenkins send logs to the index


Next i am creating indec using curl -x put command. and then data view. So i need to add timestamp to the url in jenkins configuration and index right? whilecreating data view i can just add a -*?

Create data view with time timestamp filed by which you are deciding last 15 minutes data or last 30 minutes data.Just check your index it have some time field generated by jenkins when build was triggered . Use that to create data view

Worked !! Thank you so much for the quick response and fix!

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