# How to create a new field for the data which does not exist in logs

**URL:** https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854
**Category:** Kibana
**Created:** [September 17, 2018, 3:16pm UTC](https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854 "2018-09-17T15:16:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shikhar\_singh](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@shikhar\_singh](https://discuss.elastic.co/u/shikhar_singh)
#### Post date: [September 17, 2018, 3:16pm UTC](https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854/1 "2018-09-17T15:16:41Z")

</div>

I am trying to analyze few job logs. My job log contains Job names with information on completed/started/failed status of Jobs .

Now if a job is not run that will not appear in the Logs. But I want to have a dashboard which lists job which are not run yet.  
the problem is , in logs, if a job is not run, neither its name or the status will appear. then how to I show my job in the visualisation as NOT-STARTED.

---

<div class="post-metadata">

### Author: ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)
#### Post date: [September 17, 2018, 3:31pm UTC](https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854/2 "2018-09-17T15:31:13Z")

</div>

Hi @shikhar_singh,

Looks like what you need is [scripted field](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) that would return status if it exists and `NOT-STARTED` if it doesn't.

Best,  
Oleg

---

<div class="post-metadata">

### Author: ![shikhar\_singh](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@shikhar\_singh](https://discuss.elastic.co/u/shikhar_singh)
#### Post date: [September 17, 2018, 4:01pm UTC](https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854/3 "2018-09-17T16:01:46Z")

</div>

@azasypkin thanks for the quick response,

Will it work even when the job name does not even exist in the Logs?  
I will elaborate more - One of my Control has 8 jobs in it , I can see those jobs which are completed/started/failed , I can see those because those job names appear in the logs with these statuses.

but my control is showing completed in the the pie chart visualisation as 6 jobs completed, in fact its not , but my pie chart has no idea about the remaining two jobs. how will I map the job names which don't exists in search ( logs) with a scripted field which says NOT-STARTED.

---

<div class="post-metadata">

### Author: ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)
#### Post date: [September 18, 2018, 8:06am UTC](https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854/4 "2018-09-18T08:06:26Z")

</div>

Hi @shikhar_singh,

I think I'm not entirely understand what type of data you have to give you a good advice. Can you, maybe, share these 8 raw log records here and the form you'd like to transform them into?

Best,  
Oleg

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 16, 2018, 8:11am UTC](https://discuss.elastic.co/t/how-to-create-a-new-field-for-the-data-which-does-not-exist-in-logs/148854/5 "2018-10-16T08:11:07Z")

</div>

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