How do i rename a scripted field in kibana? - kibana-4

Is there a way i can change only the name of a scripted field? I'm using Kibana 4.3.0. For eg. I want to rename Bytes Read(GB) to Bytes Read. When i click on edit field, it doesn't allow name changes.

You can not change the name of a scripted field, you only can copy the script and paste in a new scripted field with the new name.

Related

Apache NiFi. add new CSV field based on existing with modification

I have .csv file with several fields. One of them (for example 3th) contains email. How can I add additional filed that will contain only serverName from email field?
Example:
input:
01;city;name#servername.com;age;
result:
01;city;name#servername.com;age;servername;
I guess it possible through ReplaceText processor, but I can't choose correct value in "Search Value" and "Replacement Value" fields.
You can convert your flowfile, to a record with the help of ConvertRecord.
It allows you to pass to a JSON (or something else) format to whatever you prefer.
Then you can add a new field, like the following, with an UpdateRecordProcessor:
I recommend you the following reading:
Update Record tutorial

Using Scripted field as time variable in Kibana

Kibana allows to conveniently filter data or visualizations based on time.
Apparently Kibana should automatically detect a "time variable" and use it for time-based filtering. In my specific case the field providing information about time is a Scripted Field: how can I specify that I want to use it for time-based filtering operations?
You can create scripted fields in the Kibana as mentioned in this link.
Basically if you have index pattern, click on that index pattern and you should be able to view the below image. Note the Add scripted field section. I suggest you to explore it.
Once you do that, you should be able to see the scripted field name that you'd have created for that index in the visualiser and thereby you can make use of it as mentioned in the below image.
For e.g. I've created a field myscript as mentioned in above image and added doc['date'].value as script in it.
Important Note: You can only make use of this scripted date field as a filter option.
Kibana doesn't have an option to use this scripted field as the default date field or time filter field or as date field for TSVB as I suppose it requires the field to be indexed.
Hope it helps!
Update: Kibana now supports using Runtime Fields in TSVB visualizations. They are available since 7.11 and are GA since 7.12.
Runtime fields will appear in TSVB just like any other field does (but might be slower to aggregate on).

How to specify index and date / time field in Timelion?

I'm trying to use the Timelion app in Kibana, but I don't find where to specify the index name and the time field. Is there a way to do that on-the-fly or does it have to be done in a configuration file somewhere? If so, where is that file?
.es(index=your_index_name, timefield=#timestamp, metric=count, q=whatever_field:some_matching_text)
Under the es() function you have index and timefield.

Custom field with embedded html in kibana

I have a field in elasticsearch index with a mp3 filename, i want to create a custom field that shows a player with a formatted url and adding the filename stored in elasticsearch. Is it possible to do it?
You need to create a scripted field : https://www.elastic.co/blog/kibana-4-beta-3-now-more-filtery
Something like that "url/"+doc["filename"].value

Elasticsearch command to list all scripted fields used ? Also how to delete a specific scripted field?

I have accidentally created some wrong scripted field in kibana-4 and now my elasticsearch is not working and throwing exceptions. I am looking for a command to list all the scripted fields currently used by the elasticsearch and delete the one that is causing trouble to me.
You can easily/add delete a scripted field in Kibana 4.
Just go to Settings, select Indices tab, click on your index name , selected scripted fields tab beside the fields tab & add/delete accordingly :)

Resources