Restler3 Integration with Grafana SimpleJson plugin

95 views Asked by At

I'm trying to make an integration with Grafana, using Simple-Json databse plugin.

I configured the integration but needed some help on the Restler part. I created a class (Compliance) in an instance of Restler that will fetch information from a database. I am accessing this class through the url http://ws.server.com.br/service/inventory/index.php/compliance This is working fine, however the SimpleJson plugin needs to implement the following endpoints to work:

/
/search
/query
/annotations

The endpoint / is returning correctly, however I am having problems with the other endpoints. Debugging the requests that are made in the webserver, I see that grafana is trying to make a post in the url http://ws.server.com.br/service/inventory/index.php/compliance/search, but error 405 occurs (method not allowed). I know I need to implement a function post in this URL, but if I create this function in my class Compliance it is referring to the class itself, not the search method. Does anyone have any idea how to do this?

1

There are 1 answers

1
Arul Kumaran On

405 means the URL is available but not for the specific method that is used which I assume is POST in this case, I guess your class us Compliance and method name is search. If you add a method named postSearch it will receive the grafana request