Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The method is not allowed for the requested URL #5

Open
ifan-boy opened this issue May 7, 2020 · 7 comments
Open

The method is not allowed for the requested URL #5

ifan-boy opened this issue May 7, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@ifan-boy
Copy link

ifan-boy commented May 7, 2020

I am trying to create the ML model with regard to the following steps but no luck.

select a time frame
click “Create Baseline” button, wait for ML model to be created
click “Train model” button, wait for training to complete
run a prediction with “Play” button
observe anomalies (as annotations on graph)

It shown this error when i press “Create Baseline” button:
error

Log under Loud ML server:
172.17.0.2 - - [2020-05-07 16:12:27] "POST /models HTTP/1.1" 405 220 0.002024

The environment as below
Grafana: v6.7.3
Loud ML server: 1.5
InfluxDB: 1.7.9

@fadjar340
Copy link
Collaborator

Can you try this: (example)

curl -H "Content-Type: application/json" -X POST loudml:8077/models --data-binary @model.json

model.json

{
  "bucket_interval": "1m",
  "default_bucket": "temperature-bucket",
  "features": [
    {
      "default": 0,
      "field": "temp2",
      "metric": "avg",
      "name": "avg_temp_feature"
    }
  ],
  "interval": 60,
  "max_evals": 10,
  "name": "avg_temp2-model",
  "offset": 30,
  "span": 5,
  "max_threshold": 90,
  "min_threshold": 50,
  "type": "donut"
}

What is the result?

Regards,
Fadjar

@ifan-boy
Copy link
Author

ifan-boy commented May 7, 2020

Hi Fadjar,

The response is same as the above error message.

# curl -H "Content-Type: application/json" -X POST 127.0.0.1:8077/models --data-binary @model.json {"message": "The method is not allowed for the requested URL."}

Thanks,
ib

@fadjar340
Copy link
Collaborator

It means, not the loudml-grafana-app problem, it's loudml server problem.

Please ensure you can create model in the loudml server using curl. then the loudml-grafana-app will do the rest.

Regards,
Fadjar

@vsergeyev
Copy link
Owner

May you try to open http://127.0.0.1:8077/models in your web browser?

This should display you a list of models you have / empty list.

Just wondering why curl not working.

V.

@ifan-boy
Copy link
Author

ifan-boy commented May 11, 2020

Hi Fadjar,

The model can be created after upgraded the loudml server to v1.6; however, the "loudml-grafana-app" module somehow cannot create the model when there is "fill(0)" option under influxdb query with below error:

invalid field features.0.match_all: not a valid value

I suspect this error is related to the double quote around the '0' in the JSON post by "loudml-grafana-app" module.

...
"features": [
    {
      "default": **"0",**
...

Even though the model can be created by manually post the JSON to the loudml server through the curl command, it is not able to save the model after the training is completed by clicking the train button in Grafana... May I ask is this module compatible with the latest version of loudML server?

TypeError: 'Not JSON Serializable'

@vsergeyev
Copy link
Owner

@ifan-boy addressed this in latest 1.3.0

@fadjar340
Copy link
Collaborator

Wow 1.3.0...

@vsergeyev vsergeyev added the bug Something isn't working label May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants