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

Error When Creating 'json-query' Type Monitor Using API #58

Open
alencarsouza opened this issue Oct 26, 2023 · 0 comments
Open

Error When Creating 'json-query' Type Monitor Using API #58

alencarsouza opened this issue Oct 26, 2023 · 0 comments

Comments

@alencarsouza
Copy link

Overview:

I encountered an error while attempting to create a monitor of type json-query through the [POST] /monitors API endpoint.

Request Details:

I sent the following JSON payload in the request body:

  {
      "name": "example-monitor",
      "url": "mydomain.com/v1/health",
      "method": "GET",
      "maxretries": 1,
      "type": "json-query",
      "timeout": 10,
      "interval": 60,
      "retryInterval": 20,
      "resendInterval": 0,
      "maxredirects": 10,
      "accepted_statuscodes": ["200-299"],
      "dns_resolve_type": "A",
      "dns_resolve_server": "1.1.1.1",
      "httpBodyEncoding": "json",
      "jsonPath": "msg",
      "expectedValue": "ok"
  }

Error Received:

  {
    "detail": [
      {
        "loc": ["body", "type"],
        "msg": "value is not a valid enumeration member; permitted: 'http', 'port', 'ping', 'keyword', 'grpc-keyword', 'dns', 'docker', 'push', 'steam', 'gamedig', 'mqtt', 'sqlserver', 'postgres', 'mysql', 'mongodb', 'radius', 'redis'",
        "type": "type_error.enum",
        "ctx": {
          "enum_values": [
            "http",
            "port",
            "ping",
            "keyword",
            "grpc-keyword",
            "dns",
            "docker",
            "push",
            "steam",
            "gamedig",
            "mqtt",
            "sqlserver",
            "postgres",
            "mysql",
            "mongodb",
            "radius",
            "redis"
          ]
        }
      }
    ]
  }

Query:

Is json-query not a supported monitor type, or could this be an issue with the API or my request format? Any guidance or solutions to enable creating a monitor of type json-query would be highly appreciated.

Thank you for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant