Cool Features in Grafana that You Might Missed

If you’re developing a chatbot, this might helps.

Fairuz A Hirzani
Aug 26, 2018 · 3 min read
Image for post
Image for post

We’ve been using Grafana as our monitoring dashboard for almost a year, and it has been beneficial for our daily operation monitoring. Our essential performance metrics is visualized in a beautiful form using this open source tools. It really helps us to have a clear understanding on how our services perform. You can read its cool features on their documentation here

Image for post
Image for post
we have about 60 or more dashboard like this, to monitor our services. beautiful, isn’t it?

Being able to always aware of our service performance metrics in realtime is our primary concern. There is one additional feature that I personally like from Grafana, and it helps us monitor even better. It’s a rendering API. A simple HTTP request to save the graph in image format. We’re combining this with Telegram Bot. So, everyone can monitor our data in a simple Telegram Bot command request, anywhere and anytime.

Rendering panel on grafana dashboard can be done by adding “render” on panel url. Example API Url Request to render panel on image format,

The other way to generate api link is by navigate to share menu on certain panel, and click this,

send http get request to url generated by this menu

Here’s sample use case that utilizes this feature:

1. On-Demand Rendering

Create a command on a telegram to capture specific panel on the dashboard as requested. Let’s say, for example, it’s on the weekend, and you find out that your service quality is degraded by increasing of response time, followed by drop on success rate.

Your curiosity drives you to see what it may impact your server performance. Simply, it can be done by sending a telegram command message to capture panel on the dashboard you desire. Your data will be transmitted for you in a second. It will help you in many cases. When you feel you have to see your data immediately with ease, just send a message and let it captures for you.

Image for post
Image for post

2. Periodical Report.

Configure a scheduler to send HTTP request to Grafana API that captures specific panel on the dashboard, and submit to related Telegram Chat Room. There may be occurred important events which have a high impact on your service transaction. During that period of time, you want to be always informed about how your metrics behave. This scheduled task will help you monitor your most important metrics by capturing specific panel on the dashboard and send it to you, periodically.

3. Alerting

Set up an alarm when your metrics reach a certain threshold. There’s a feature in Grafana that will send alarm on given set of rules and send it using a telegram. In our case, we have our own alerting system. Hence, we’re not using this alerting feature that Grafana provide. We enhanced a little on our alerting system that basically adding several lines of codes to call Grafana rendering API, captures a related panel and send to related parties.

Image for post
Image for post
our alerting system using telegram bot and grafana render image api

chatbot dashboard data visualization grafana monitoring

Originally published at on August 26, 2018.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store