Customising grafana

Hi all.

We’re customising our grafana install. For example, in the time selector, we don’t want to see any of the minute/second/hour options. Nothing smaller than a day.

So, when we upgrade grafana to a new version, obviously all of our customisation gets borked. So what we do is, after the upgrade has finished, we run a series of these:

sed -i ‘s|{from:“now-5m”,to:“now”,display:“Last 5 minutes”},||g’ /usr/share/grafana/public/build/app.*.js

This one removes the “Last 5 minutes” option from the time selector by doing a search and replace in the app.*.js file. Restart the server and we’re in business. Works great.

Hopefully, someone is looking at this and cringing, and going that’s not how you should do that. So, how is everyone else customising their community install?