# Gsoc 2020: Expose System Metrics For Monitoring.

**URL:** <https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106>\
**Category:** GSoC\
**Tags:** gsoc2020\
**Created:** [March 2, 2020, 9:47am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106 "2020-03-02T09:47:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 2, 2020, 9:47am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/1 "2020-03-02T09:47:06Z")

</div>

Continuing the discussion from [Exposing system metrics for monitoring OpenMRS servers](https://talk.openmrs.org/t/exposing-system-metrics-for-monitoring-openmrs-servers/27010/8):

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 10, 2020, 9:40am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/2 "2020-03-10T09:40:05Z")

</div>

Hi @judeniroshan @suthagar23

I would like to continue talk thread for this project since I saw that you guys will be my mentors for the project.

Btw I got some great input from @cintiadr @ibacher. From what they said I felt like it’s much broad scope for the project. Will it be possible to narrow down the scope by identifying which are the metrics that will be exposing outside through this project.

1. Infrastructure based metrics
2. Data analytics points (Ex :- No of users used the patient registration forms)

---

<div class="post-metadata">

**Author:** ![cintiadr](https://talk.openmrs.org/user_avatar/talk.openmrs.org/cintiadr/32/8081_2.png) [@cintiadr](https://talk.openmrs.org/u/cintiadr)\
**Post date:** [March 10, 2020, 11:45am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/3 "2020-03-10T11:45:59Z")

</div>

For the infrastructure/JVM, I’d just try and get what [https://metrics.dropwizard.io/4.1.2/manual/servlets.html#manual-servlets](https://metrics.dropwizard.io/4.1.2/manual/servlets.html#manual-servlets) offers by default. Ensure that `show-jvm-metrics` is `true`

I could see [https://micrometer.io/docs/concepts#\_supported\_monitoring\_systems](https://micrometer.io/docs/concepts#_supported_monitoring_systems) as well, which could be useful later.

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 10, 2020, 9:00pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/4 "2020-03-10T21:00:44Z")

</div>

Hi @cintiadr @judeniroshan @suthagar23

I think it’s good to have a module that aggregates and exposes metric data.

For now it contains endpoints which exposes

1. JVM based metrics collected from the openMRS core. With the help of [metrics.dropwizard.io](http://metrics.dropwizard.io)
2. It should have support to micrometer plugin which has the capability to publish data to different monitoring systems based on the data structure monitoring systems required the data points to be (example dimensional and hierarchical)
3. Creating an observer class that triggers for specific events that we required as data points in the end. (for an example how long it took for some one to register a patient) and exposes data when requested by an admin from an http call or when requested by the montoring platform

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 23, 2020, 12:58pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/5 "2020-03-23T12:58:25Z")

</div>

Hi @cintiadr @judeniroshan @suthagar23

I thought of an architecture like this with an hibernate interceptor which sits in core since all queries will be going through core I think it’s the best place for it to be.

 ![Account Handling classic (2)](https://talk.openmrs.org/uploads/default/original/2X/a/a2d23174c56345e6e228109d7c7d85160668c565.png)

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 23, 2020, 1:54pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/6 "2020-03-23T13:54:18Z")

</div>

@ayesh If you’re going to be intercepting Hibernate events, it _may_ be better handle that via the [Event Module](https://wiki.openmrs.org/display/docs/Event+Module) or even the [Atom Feed Module](https://wiki.openmrs.org/display/docs/Atom+Feed+Module) rather than having to re-invent the wheel. Or maybe just break my suggestion of UI based reporting out from the main project of system monitoring data.

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 23, 2020, 2:06pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/7 "2020-03-23T14:06:37Z")

</div>

Hi @ibacher

I think that is a great idea.Btw this is the first time am hearing about event module @ibacher. Thanks alot for suggesting this way.

Btw I hope openmrs modules are subscribed as listners.

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 23, 2020, 8:23pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/8 "2020-03-23T20:23:07Z")

</div>

Hi @ibacher

I see the atom feed module is based on event module which basically an active\_mq publisher. Which I think we can use in the new module we will be creating

I see the atom module already logs few of the main components data points what about we extend it to get the data points which we are looking for ?

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 23, 2020, 9:28pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/9 "2020-03-23T21:28:11Z")

</div>

That seems to me like it could be a reasonable solution. There are two things about it that makes me a little hesitant in fully endorsing the idea. One is that I’m not sure that Atom (the format or the feed technology) is the future. The other is that I’m not sure how widely deployed the Atom feed module is outside of Bahmni. Maybe the best immediate target is just something built on top of the Events module.

I’d love to hear insight from others in the community on this point, however.

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 23, 2020, 9:47pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/10 "2020-03-23T21:47:16Z")

</div>

Hi @ibacher

Agreed. And we can use atom feed as a starting point since it already has the functionality to extract data from events.

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 24, 2020, 9:12am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/11 "2020-03-24T09:12:55Z")

</div>

Hi @ibacher

I see a PIH module which was not actively in development has a monitoring solution .

I can see it record java run time metrics. But there seems to be lot more in that module. Any idea about this module ?

> <https://github.com/PIH/openmrs-module-emrmonitor/blob/master/api/src/main/java/org/openmrs/module/emrmonitor/metric/JavaRuntimeMetricProducer.java#L51>

I see @mseaton as a core developer in this module.

---

<div class="post-metadata">

**Author:** ![mseaton](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mseaton/32/8088_2.png) [@mseaton](https://talk.openmrs.org/u/mseaton)\
**Post date:** [March 24, 2020, 12:29pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/12 "2020-03-24T12:29:48Z")

</div>

@ayesh thanks for noticing! 🙂 I’m happy to connect over this module. I am definitely interested in this project and would be interested to see this existing module evolve to meet these needs rather than starting from scratch. This was not a throw-away module, and did have some design put into it, but never took off, and I’d love to see it evolve to where it was useful. @ibacher also, please feel free to connect with me over Slack or we could set up a time to talk.

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 24, 2020, 12:45pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/13 "2020-03-24T12:45:12Z")

</div>

@ayesh Thanks for digging that out. I knew something like that existed but I wasn’t sure entirely where.

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 24, 2020, 1:13pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/14 "2020-03-24T13:13:44Z")

</div>

@ibacher @mseaton

Agreed with you guys 😃

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 24, 2020, 5:01pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/15 "2020-03-24T17:01:02Z")

</div>

@mseaton yeah having a small session will be great to have an idea.

cc :- @ibacher @judeniroshan

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [March 24, 2020, 5:37pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/16 "2020-03-24T17:37:44Z")

</div>

That sounds good to me. We should engage @judeniroshan and @suthagar23 on such a session, however!

---

<div class="post-metadata">

**Author:** ![suthagar23](https://talk.openmrs.org/user_avatar/talk.openmrs.org/suthagar23/32/6342_2.png) [@suthagar23](https://talk.openmrs.org/u/suthagar23)\
**Post date:** [March 24, 2020, 7:09pm UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/17 "2020-03-24T19:09:13Z")

</div>

> [@mseaton](#):
>
> @ayesh thanks for noticing! 🙂 I’m happy to connect over this module. I am definitely interested in this project and would be interested to see this existing module evolve to meet these needs rather than starting from scratch. This was not a throw-away module, and did have some design put into it, but never took off, and I’d love to see it evolve to where it was useful. @ibacher also, please feel free to connect with me over Slack or we could set up a time to talk.

@mseaton, Please let me know, if you would like to be one of the mentor for this project?

---

<div class="post-metadata">

**Author:** ![ayesh](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ayesh/32/10674_2.png) [@ayesh](https://talk.openmrs.org/u/ayesh)\
**Post date:** [March 26, 2020, 9:38am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/18 "2020-03-26T09:38:26Z")

</div>

Hi All

I am not sure weather we have a doodle account for openmrs.

Btw I created a doodle to get an idea about when we can have a meeting

> **[Doodle: Discussion about PIH monitoring module and how to reuse it.](https://doodle.com/poll/buncrktz24ezd67h)**
>
> Doodle is the simplest way to schedule meetings with clients, colleagues, or friends. Find the best time for one-to-ones and team meetings with our user-friendly calendar tool. Get started today!

cc :- @mseaton @ibacher @cintiadr @suthagar23 @judeniroshan

---

<div class="post-metadata">

**Author:** ![cintiadr](https://talk.openmrs.org/user_avatar/talk.openmrs.org/cintiadr/32/8081_2.png) [@cintiadr](https://talk.openmrs.org/u/cintiadr)\
**Post date:** [March 26, 2020, 10:54am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/19 "2020-03-26T10:54:48Z")

</div>

![Screen Shot 2020-03-26 at 9.53.41 pm](https://talk.openmrs.org/uploads/default/original/2X/7/792212656f64b836f939ab632d715158e5c285d3.png)

😃 I will pass this time! Probably it’s better for me to continue with the async comms.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 26, 2020, 11:43am UTC](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/20 "2020-03-26T11:43:44Z")

</div>

Loool, that is too terrible for you!!! 😄

[Next page](https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106.md?page=2)
