Using Grafana directly from IRIS

Primary tabs

There have been some very helpful articles in the community that show how to use Grafana with IRIS (or Cache/Ensemble) by using an intermediate database.

But I wanted to get at IRIS structures directly. In particular, i wanted to access the Cache History monitor data that is accessible by SQL as described here

and didn't want anything between me and the data.

I already had class queries that returned the data i wanted, so i just needed to embed them in a REST class that returned JSON. I haven't included my class Grafana.MonitorData because it could be anything but i can if people want it.

There were only two difficult points. One was making sure i had local time and utc time worked out at each point. The other was that Grafana doesn't like values like .25 without the leading zero and gives javascript errors  - “ is not a function”. which is why i have the line with  $FN(tValue,,4).

I have simplified my production code to make the principals clear. I could put it on github but it is so simple, it doesn't really warrant that.



David, thanks for sharing your work.

Does your system work reliable and your approach can be taken into real use? What about performance? I have same intentions: to use Grafana directly with Cache.