# Annotations for code deployments

**URL:** <https://discuss.elastic.co/t/annotations-for-code-deployments/154065>\
**Category:** Kibana\
**Created:** [October 25, 2018, 9:03pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065 "2018-10-25T21:03:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![devops\_mike](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@devops\_mike](https://discuss.elastic.co/u/devops_mike)\
**Post date:** [October 25, 2018, 9:03pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/1 "2018-10-25T21:03:48Z")

</div>

I am looking to add annotations to Kibana for when new versions of code are deployed. During a demo today, I saw annotations during a machine learning demo. I had read annotations are only supported for anomaly detection, and can't be added outside of this. But in the demo, I thought he said it came from another source.

Ideally, I would like a Step in Octopus Deploy that sends a document to elasticsearch. I have seen something similar in LogicMonitor, and it was very helpful.

Is this possible?

Thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 26, 2018, 12:21am UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/2 "2018-10-26T00:21:20Z")

</div>

Does [https://www.elastic.co/blog/time-series-annotations-and-anomalies-with-kibana](https://www.elastic.co/blog/time-series-annotations-and-anomalies-with-kibana) align with what you have seen?

---

<div class="post-metadata">

**Author:** ![devops\_mike](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@devops\_mike](https://discuss.elastic.co/u/devops_mike)\
**Post date:** [October 26, 2018, 12:42pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/3 "2018-10-26T12:42:41Z")

</div>

Thanks warkolm. I have seen that blog article before, very helpful and we definitely intend to use that technique.

Unfortunately, those annotations are coming from anomaly detection. I don't see how we could manually create an annotation. "how to add annotations to a time series visualization from anomalies detected by a machine learning job."

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 27, 2018, 12:37am UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/4 "2018-10-27T00:37:21Z")

</div>

You can add annotations with TSVB, see [https://www.elastic.co/guide/en/kibana/current/time-series-interface.html#\_annotations\_tab](https://www.elastic.co/guide/en/kibana/current/time-series-interface.html#_annotations_tab)

---

<div class="post-metadata">

**Author:** ![devops\_mike](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@devops\_mike](https://discuss.elastic.co/u/devops_mike)\
**Post date:** [October 29, 2018, 5:24pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/5 "2018-10-29T17:24:11Z")

</div>

Thanks @warkolm. I was able to get pretty far with implementing this. Unfortunately I believe I hit a bug, and I don't think it will work.

Basically I can't use the new annotation index I created because the time field can not be selected. This seems like a continuation of the bug reported here: [https://github.com/elastic/kibana/issues/22575](https://github.com/elastic/kibana/issues/22575)  
In my case I also have this problem, where non default indexes can't have their time field selected, on the annotation tab as well.

---

<div class="post-metadata">

**Author:** ![devops\_mike](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@devops\_mike](https://discuss.elastic.co/u/devops_mike)\
**Post date:** [October 31, 2018, 8:37pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/6 "2018-10-31T20:37:12Z")

</div>

This started working. I wish I knew what exactly got it working.

I stayed on the panel options tab and tried a few indexes as I did before. I chose my annotations index and typed in @timestamp. The dropdown had an error, which is where I got stuck before. I then typed in the name of my iis index. Once that name was in, the Time Field box autopopulated, but also left the old value. So I had @timestamp in there twice.

After that I was able to switch back to my annotations index, and one of the @timestamp values stayed populated! After that I was able to go to the annotations tab and typing in my annotations index caused the time field box to autopopulate.

I used @timestamp for my time field for both annotations and my filebeat IIS logs, which is why I think this worked. I am using the latest chrome browser.

---

<div class="post-metadata">

**Author:** ![devops\_mike](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@devops\_mike](https://discuss.elastic.co/u/devops_mike)\
**Post date:** [November 12, 2018, 6:33pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/7 "2018-11-12T18:33:04Z")

</div>

I found a better work around for the no timeseries on non-default indexes bug. This bug presents itself on both panel options as well as annotations tabs of time series visual builder.

Step 1: Ensure your primary index for visualization is the default.  
Step 2: Fill in panel options pane of visual builder, will probably autopopulate.  
Step 3: Go to annotations tab, type in name of secondary index.  
Step 4: In a separate browser tab, go to Management, and change the secondary index to be default index.  
Step 5: Go back to original browser tab, should still be on annotations. Press ctrl-f5.  
Step 6: The timeseries drop should now be populated correctly in annotations. SAVE.  
Step 7: Optional: Change the default index back to the original if desired, but the visualization should be regardless.

---

<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:** [December 10, 2018, 6:46pm UTC](https://discuss.elastic.co/t/annotations-for-code-deployments/154065/8 "2018-12-10T18:46:35Z")

</div>

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