jertel / elastalert2

ElastAlert 2 is a continuation of the original yelp/elastalert project. Pull requests are appreciated!
https://elastalert2.readthedocs.org
Apache License 2.0
931 stars 287 forks source link

fixed fields types error on instance indexer_alert_config in schema.yml #1499

Closed OlehPalanskyi closed 3 months ago

OlehPalanskyi commented 3 months ago

Description

Hi, I saw that I made some mistakes when adding field types to the schema.yml. I fixed and tested it.

Now it works well

  indexer_alert_config:
    type: object
    minProperties: 1
    patternProperties:
      "^.+$":
        oneOf:
          - type: [boolean, string, integer]
          - type: array
            items:
                type: object
                properties:
                  name: { type: string , minLength: 1 }
                  value: { type: [boolean, string, integer] , minLength: 1 }
                  "^.+$": { type: [boolean, string, integer], minLength: 1 }
          - type: object
            properties:
              "^.+$": { type: [boolean, string, integer], minLength: 1 }
indexer_alert_config:

  rule:
    - name: true (boolean type)
      value: name
    - name: index
      value: index
    - name: query
      value: filter

image

indexer_alert_config:

  rule:
    - name: name (string type)
      value: name
    - name: index
      value: index
    - name: query
      value: filter

image

Sorry about that

Checklist

jertel commented 3 months ago

Thanks for the correction. Please add the changelog entry, conforming to the required pattern shown in the older, existing changelog entries.