I have a Grafana dashboard that is hosted on a EC2 inside AWS. I also have a lambda function that basically updates my database every 30 minutes which the Grafana then reads. I want to be able to force an update of the database from inside Grafana. To that extent I installed ngnix/PHP and wrote a php page on that server which calls the lambda update function when the page is loaded. I wrote a form/button to a Text Panel with HTML in Grafana.
Now the problem is the ngnix is NOT exposed to the internet but can be called locally on the server. So I would like to hit the button and have that perform PHP or some other server side call to load the PHP web page that calls the update lambda so that I don't have the make that PHP web page exposed to the internet (in which case I could call the PHP page just through a simple form submit or ajax). Is that possible? I've searched and I see no examples of any server side code in the Text panel and I know it's pretty simplistic, but figured I would ask.
Hopefully I've been descriptive enough, let me know if you need any more details on some part.
source https://stackoverflow.com/questions/70039918/use-php-or-other-server-side-code-for-local-web-calls-in-grafana
No comments:
Post a Comment