{
  "$id": "https://schemas.binaryedge.io/minion/modules/elasticsearch",
  "title": "Elasticsearch Module Output Body",
  "type": "object",
  "$comment": "The module populates a few specific keys, with many more keys dynamically set by the server.",
  "properties": {
    "build_date": {
      "type": "string"
    },
    "build_hash": {
      "type": "string"
    },
    "build_snapshot": {
      "$comment": "The data type is determined by the target Elasticsearch version, ensuring compatibility across different versions.",
      "type": [
        "boolean",
        "string"
      ]
    },
    "cluster_name": {
      "type": "string"
    },
    "cluster_nodes": {
      "type": "integer"
    },
    "cluster_uuid": {
      "type": "string"
    },
    "indices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/index"
      }
    },
    "jvm": {
      "type": "object",
      "properties": {
        "input_arguments": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "version": {
          "type": "string"
        },
        "vm_name": {
          "type": "string"
        },
        "vm_vendor": {
          "type": "string"
        },
        "vm_version": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "lucene_version": {
      "type": "string"
    },
    "modules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/module"
      }
    },
    "node_name": {
      "type": "string"
    },
    "os": {
      "type": "object",
      "properties": {
        "allocated_processors": {
          "type": "integer"
        },
        "arch": {
          "type": "string"
        },
        "available_processors": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "version": {
      "type": "string"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "index": {
      "type": "object",
      "properties": {
        "docs": {
          "$comment": "If the index size was not provided, the module explicitly sets it as null.",
          "type": [
            "integer",
            "null"
          ]
        },
        "index_name": {
          "type": "string"
        },
        "size_in_bytes": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "docs",
        "index_name",
        "size_in_bytes"
      ],
      "additionalProperties": false
    },
    "module": {
      "type": "object",
      "properties": {
        "elasticsearch_version": {
          "type": "string"
        },
        "java_version": {
          "type": "string"
        },
        "classname": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "has_native_controller": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "classname",
        "description",
        "name",
        "version"
      ],
      "additionalProperties": true
    }
  }
}
