# Showing the number on the dashboard from the latest graylog message

**URL:** <https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800>\
**Category:** Graylog Central (peer support)\
**Created:** [January 14, 2018, 9:25am UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800 "2018-01-14T09:25:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![goran.radulovic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/goran.radulovic/32/1582_2.png) [@goran.radulovic](https://community.graylog.org/u/goran.radulovic)\
**Post date:** [January 14, 2018, 9:25am UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/1 "2018-01-14T09:25:38Z")

</div>

Hello guys and girls,

I wish to read some important business metrics from various apps and push the logs to graylog periodically. Basically, i would read a metric (NPS) from service called ‘AskNicely’ and get a simple number like ‘24’, and then push message to graylog with that value in it.

I wish to show the number ‘24’ (the number from the latest graylog message) in one of my dashboards.

Is this functionality supported, or is there a plugin that can help me with that.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [January 14, 2018, 11:53am UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/2 "2018-01-14T11:53:40Z")

</div>

> [@goran.radulovic](#):
>
> Is this functionality supported, or is there a plugin that can help me with that.

No, that’s unfortunately not supported out of the box.

---

<div class="post-metadata">

**Author:** ![goran.radulovic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/goran.radulovic/32/1582_2.png) [@goran.radulovic](https://community.graylog.org/u/goran.radulovic)\
**Post date:** [January 14, 2018, 4:40pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/3 "2018-01-14T16:40:00Z")

</div>

I was looking at documentation to write such plugin, but i can’t seem to find the correct documentation page for writing custom dashbobard widget.

I would be grateful if your could direct me to the right resource. Thanks.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [January 14, 2018, 9:49pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/4 "2018-01-14T21:49:05Z")

</div>

Unfortunately there’s no comprehensive plugin development documentation but you can take a look at the Map Widget plugin which provides a custom widget via plugin:

> **[Graylog2/graylog-plugin-map-widget](https://github.com/Graylog2/graylog-plugin-map-widget)**
>
> \[DEPRECATED\] Map widget for Graylog. Contribute to Graylog2/graylog-plugin-map-widget development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![goran.radulovic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/goran.radulovic/32/1582_2.png) [@goran.radulovic](https://community.graylog.org/u/goran.radulovic)\
**Post date:** [January 14, 2018, 10:02pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/5 "2018-01-14T22:02:03Z")

</div>

Thanks! That’s a great way to start.

---

<div class="post-metadata">

**Author:** ![123dev](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/123dev/32/865_2.png) [@123dev](https://community.graylog.org/u/123dev)\
**Post date:** [January 16, 2018, 4:14pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/6 "2018-01-16T16:14:25Z")

</div>

We do something similar without a custom plugin.  
On a daily basis (cronjob) a system gathers all key company metrics and posts a message to Graylog.  
Each key metric is a field in the message.

To display this on a dashboard, choose the stat | maximum value, and make sure the time range does not exceed the message reporting frequency (in our case 1d time range works perfect)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![goran.radulovic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/goran.radulovic/32/1582_2.png) [@goran.radulovic](https://community.graylog.org/u/goran.radulovic)\
**Post date:** [January 16, 2018, 4:33pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/7 "2018-01-16T16:33:19Z")

</div>

That’s interesting workaround, and i had the same idea, but for some reason graylog does not calculate the statistic for that field properly

I’ve uploaded and image illustrating the issue. Did i do something wrong?

 ![56](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/c/cc41e5a1dec9362340986bcad1420b1512118cea.png)

Thanks for suggestion. If i make this work, this will definitely be the most simple workaround for what i want to accomplish.

---

<div class="post-metadata">

**Author:** ![jtkarvo](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jtkarvo](https://community.graylog.org/u/jtkarvo)\
**Post date:** [January 16, 2018, 5:44pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/8 "2018-01-16T17:44:08Z")

</div>

I suspect your nps\_score is of string type. You can set up a custom field mapping to force it to be a number.

---

<div class="post-metadata">

**Author:** ![123dev](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/123dev/32/865_2.png) [@123dev](https://community.graylog.org/u/123dev)\
**Post date:** [January 16, 2018, 6:17pm UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/9 "2018-01-16T18:17:24Z")

</div>

jtkarvo is right, the field type needs to be changed.  
What system are you using to log the data? it could be set when logging, or can be changed in graylog using custom field mapping.

---

<div class="post-metadata">

**Author:** ![goran.radulovic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/goran.radulovic/32/1582_2.png) [@goran.radulovic](https://community.graylog.org/u/goran.radulovic)\
**Post date:** [January 17, 2018, 9:15am UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/10 "2018-01-17T09:15:06Z")

</div>

Yup that was the case. First log i sent was in decimal format (50.2) and graylog (or elasic search) started treating that field as string.

I was using gelf-php a php library for logging to graylog from php apps.

Thanks everyone for help, 123dev comment helped me save time to get the result i wanted.

\<3 graylog community

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [January 31, 2018, 9:15am UTC](https://community.graylog.org/t/showing-the-number-on-the-dashboard-from-the-latest-graylog-message/3800/11 "2018-01-31T09:15:26Z")

</div>

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