Dev advice - add timer task

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    I need to be able to be able to trigger a call from grafana to a site every X minutes. I need to run this from any page a user might be on. I.e. if a user is sitting on a page with an auto-refresh (I’m thinking likely in kiosk mode), even though they aren’t clicking around, I need to fire a command every 5 minutes. Note that the user might be sitting on a page without a grafana timer (i.e. the homepage) and I’d need to trigger the call every X minutes from those pages as well. This command in my case is going out to an external server and getting a token so that way the user access through our reverse proxy continues to work.

  • How are you trying to achieve it?
    This is where I was hoping for some input from people more familiar with grafana development than I am. Is there a place that would make sense to implement something like this, or has anyone done something similar that they might be able to point me to? Is there a logical place to put a snippet of code that can run a timer and execute a call to an external site at a regular interval? Any pointers on the best place to do this are very much appreciated.

This topic was automatically closed after 365 days. New replies are no longer allowed.