# How to calculate and visualize the number of solved issues

**URL:** <https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298>\
**Category:** Kibana\
**Created:** [January 5, 2018, 2:59pm UTC](https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298 "2018-01-05T14:59:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anchasis](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@anchasis](https://discuss.elastic.co/u/anchasis)\
**Post date:** [January 5, 2018, 2:59pm UTC](https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298/1 "2018-01-05T14:59:21Z")

</div>

Hi,

I have a field in my logfile that is called "last\_seen\_time". This field gets populated with a timestamp that describes when a problem was last seen. Once a problem is not seen for two months anymore we consider the problem solved.

How can I best visualize the number of solved issues over time in Kibana in this configuration (only solved if not seen anymore since "that date on the axis - 2 month"?  
I want to visualize number of solved issues on y axis, time on x axis.

If possible it would also be nice to express this not in absolute numbers (number of solved issues) but % wise to the total number of issues in the index.

How can I best do this? Timelion? Anything else? What formulla to use in timelion

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [January 8, 2018, 11:57am UTC](https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298/2 "2018-01-08T11:57:06Z")

</div>

Hi @anchasis,

this does not sound like something that would be easy to solve in Kibana. But maybe we can work something out if you tell me a bit more about your schema:

- is there a document for each class of issues or for each occurence of an issue
- how does `last_seen_time` differ from the primary timestamp field of the document (if there is one)
- how are the classes of issues identified (some kind of keyword?)

---

<div class="post-metadata">

**Author:** ![anchasis](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@anchasis](https://discuss.elastic.co/u/anchasis)\
**Post date:** [January 8, 2018, 6:05pm UTC](https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298/3 "2018-01-08T18:05:15Z")

</div>

- There is a document for each occurence of an issue
- last\_seen\_time is the time of the last vulnerability scan where the issue was identified, not the time the logline was imported in ELK
- classes are CVE with an id and description + extra info

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [January 15, 2018, 3:57pm UTC](https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298/4 "2018-01-15T15:57:32Z")

</div>

I can't think of a way to achieve that without pre-processing your data. I would recommend to use something like logstash or a custom script to regularly post documents to a separate index that contains the summary of the status you want to visualize. For example you could post a document like

```
{
  "@timestamp": "1516031776000",
  "open_issues": [
    "CVE-1",
    "CVE-3"
  ],
  "closed_issues": [
    "CVE-2"
  ]
}

```

every day and easily visualize them using normal `Date Histogram`, `Terms`, `Filters` and `Cardinality` aggregations.

---

<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:** [February 12, 2018, 3:57pm UTC](https://discuss.elastic.co/t/how-to-calculate-and-visualize-the-number-of-solved-issues/114298/5 "2018-02-12T15:57:47Z")

</div>

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