{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/monika-configuration/latest.json",
  "description": "Monika monitoring configuration schema",
  "x-lintel": {
    "source": "https://www.schemastore.org/monika-config-schema.json",
    "sourceSha256": "b3876dd65399e78d30ae1d7f968fb744d39ba4c0e31bfab1353529d1440884e5",
    "fileMatch": [
      "*monika*.yaml",
      "*monika*.yml",
      "monika.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "probes": {
      "title": "Probes",
      "type": "array",
      "description": "Probe is a description of the target, methods, timing and payloads to begin monitoring/probing a target.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string",
            "description": "Unique string identification of the probe",
            "examples": [
              "probe-01",
              "login-probe-01"
            ],
            "default": "probe-01"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "description": "A human-readible probe name",
            "examples": [
              "get-user",
              "login-check",
              "web-heatlh-check"
            ],
            "default": "zen-check-01"
          },
          "description": {
            "title": "Description",
            "type": "string",
            "description": "Description of the probe",
            "examples": [
              "ensure service health is good"
            ],
            "default": "Ensure connectivity to github is successful"
          },
          "interval": {
            "$ref": "#/$defs/interval"
          },
          "postgres": {
            "$ref": "#/$defs/postgres"
          },
          "redis": {
            "$ref": "#/$defs/redis"
          },
          "mongo": {
            "$ref": "#/$defs/mongo"
          },
          "mariadb": {
            "$ref": "#/$defs/mariadb"
          },
          "mysql": {
            "$ref": "#/$defs/mariadb"
          },
          "requests": {
            "$ref": "#/$defs/requests"
          },
          "socket": {
            "$ref": "#/$defs/socket"
          },
          "incidentThreshold": {
            "$ref": "#/$defs/incidentThreshold"
          },
          "recoveryThreshold": {
            "$ref": "#/$defs/recoveryThreshold"
          },
          "alerts": {
            "$ref": "#/$defs/alerts"
          },
          "ping": {
            "$ref": "#/$defs/ping"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    "notifications": {
      "title": "Notifications",
      "type": "array",
      "description": "Alerts of incidents and recoveries will be sent via these notification channels",
      "items": {
        "anyOf": [
          {
            "title": "Desktop",
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "desktop-01"
              },
              "type": {
                "const": "desktop"
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Discord",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "discord-01"
              },
              "type": {
                "const": "discord"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "The URL of the Discord Webhook that will receive notification",
                    "examples": [
                      "https://discord.com/api/webhook/<webhook.id>/<webhook.token>"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Workplace",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "workplace-01"
              },
              "type": {
                "const": "workplace"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "thread_id": {
                    "type": "string",
                    "description": "Thread id is the set of numbers at the end of the url"
                  },
                  "access_token": {
                    "type": "string",
                    "description": "Workplace access token for custom integration"
                  }
                },
                "required": [
                  "thread_id",
                  "access_token"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Google Chat",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "google-chat-01"
              },
              "type": {
                "const": "google-chat"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "The webhook URL for your google chat",
                    "examples": [
                      "https://chat.googleapis.com/v1/spaces/XXXXX/messages?key=1122334455"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Lark",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "lark-01"
              },
              "type": {
                "const": "lark"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "The webhook URL for your lark suite",
                    "examples": [
                      "https://open.larksuite.com/open-apis/bot/v2/hook/your-webhook-key-here"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Mailgun",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "const": "mailgun"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "recipients": {
                    "type": "array",
                    "description": "An array of email addresses that will receive the e-mail from Monika",
                    "items": {
                      "type": "string"
                    }
                  },
                  "apiKey": {
                    "type": "string",
                    "description": "Mailgun account API key, mailgun registered key to identify your account"
                  },
                  "domain": {
                    "type": "string",
                    "description": "The domain to set in Mailgun"
                  }
                },
                "required": [
                  "recipients",
                  "apiKey",
                  "domain"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Microsoft Teams",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "teams-01"
              },
              "type": {
                "const": "teams"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "Your teams webhook URL"
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Monika Notification",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "monika-01"
              },
              "type": {
                "const": "monika-notif"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "Your Monika notification URL",
                    "examples": [
                      "https://whatsapp.hyperjump.tech/api/notify?token=<webhook.token>"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Pagerduty",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique pagerduty notif id",
                "default": "pagerduty-01"
              },
              "type": {
                "const": "pagerduty"
              },
              "data": {
                "type": "array",
                "description": "An array of email addresses that will receive the e-mail from Monika",
                "items": {
                  "type": "object",
                  "description": "Data for your payload",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Pagerduty integration key"
                    },
                    "probeID": {
                      "type": "string",
                      "description": "Monika Probe ID"
                    }
                  },
                  "required": [
                    "key",
                    "probeID"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Sendgrid",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique sendgrid notification id",
                "default": "sendgrid-01"
              },
              "type": {
                "const": "sendgrid"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "sender": {
                    "type": "string",
                    "description": "A string of email addresses that has been verified in your sendgrid account"
                  },
                  "recipients": {
                    "type": "array",
                    "description": "An array of email addresses that will receive the e-mail from Monika",
                    "items": {
                      "type": "string"
                    }
                  },
                  "apiKey": {
                    "type": "string",
                    "description": "Sendgrid account api key, sendgrid registered key to identify your account"
                  }
                },
                "required": [
                  "sender",
                  "recipients",
                  "apiKey"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Slack",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique slack notification id",
                "default": "slack-01"
              },
              "type": {
                "const": "slack"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "The URL webhook for Slack",
                    "examples": [
                      "https://slackwebhook.com/channel"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "SMTP",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique smtp notification id",
                "default": "smtp-01"
              },
              "type": {
                "const": "smtp"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "recipients": {
                    "type": "array",
                    "description": "An array of email address that will receive the email from Monika",
                    "items": {
                      "type": "string"
                    }
                  },
                  "hostname": {
                    "type": "string",
                    "description": "The smtp host that you will be using for sending the email"
                  },
                  "port": {
                    "type": "integer",
                    "description": "The port allowed to be used for sending mail in your host"
                  },
                  "username": {
                    "type": "string",
                    "description": "Registered username on your smtp server"
                  },
                  "password": {
                    "type": "string",
                    "description": "The password set for your username"
                  }
                },
                "required": [
                  "recipients",
                  "hostname",
                  "port"
                ],
                "additionalProperties": true
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Statuspage",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Notification identity number",
                "default": "statuspage"
              },
              "type": {
                "const": "statuspage"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "description": "Statuspage API key"
                  },
                  "pageID": {
                    "type": "string",
                    "description": "Statuspage page ID "
                  }
                },
                "required": [
                  "pageID",
                  "apiKey"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Telegram",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique telegram notification id",
                "default": "telegram-01"
              },
              "type": {
                "const": "telegram"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "group_id": {
                    "type": "string",
                    "description": "The ID of the group where the bot should send the messages"
                  },
                  "bot_token": {
                    "type": "string",
                    "description": "Token for your telegram bot"
                  }
                },
                "required": [
                  "group_id",
                  "bot_token"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Webhook",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique webhook notification id",
                "default": "webhook-01"
              },
              "type": {
                "const": "webhook"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "The URL of the server that will receive the webhook notification",
                    "examples": [
                      "https://yourwebsite.com/webhook"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "WhatsApp for Business",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique whatsapp notification id",
                "default": "whatsapp-01"
              },
              "type": {
                "const": "whatsapp"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "recipients": {
                    "type": "array",
                    "description": "An array of phone numbers registered for WhatsApp, should start with your controu code number",
                    "items": {
                      "type": "string"
                    }
                  },
                  "url": {
                    "$ref": "#/$defs/urlFormat",
                    "description": "The URL of the server that will receive the webhook notification"
                  },
                  "username": {
                    "type": "string",
                    "description": "Your WhatsApp API username"
                  },
                  "password": {
                    "type": "string",
                    "description": "Your Whatsapp API user password"
                  }
                },
                "required": [
                  "recipients",
                  "url",
                  "username",
                  "password"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Dingtalk",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique Dingtalk notification id",
                "default": "dingtalk-01"
              },
              "type": {
                "const": "dingtalk"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "access_token": {
                    "type": "string",
                    "description": "the token of your Dingtalk account"
                  }
                },
                "required": [
                  "access_token"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Pushover",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique Pushover notification id",
                "default": "pushover-01"
              },
              "type": {
                "const": "pushover"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Pushover application token"
                  },
                  "user": {
                    "type": "string",
                    "description": "Pushover user key"
                  }
                },
                "required": [
                  "token",
                  "user"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Gotify",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique Gotify notification id",
                "default": "Gotify-01"
              },
              "type": {
                "const": "gotify"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Gotify application token"
                  },
                  "url": {
                    "type": "string",
                    "description": "Gotify base url"
                  }
                },
                "required": [
                  "token",
                  "url"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Opsgenie",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique opsgenie notification id",
                "default": "opsgenie-01"
              },
              "type": {
                "const": "opsgenie"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "geniekey": {
                    "type": "string",
                    "description": "Opsgenie application token"
                  }
                },
                "required": [
                  "geniekey"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Pushbullet",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique notification id",
                "default": "pushbullet-01"
              },
              "type": {
                "const": "pushbullet"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Pushbullet application token."
                  },
                  "deviceID": {
                    "type": "string",
                    "description": "Pushbullet device identifier (optional)"
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "Instatus",
            "type": "object",
            "required": [
              "id",
              "type",
              "data"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The type of notification",
                "default": "instatus"
              },
              "type": {
                "const": "instatus"
              },
              "data": {
                "type": "object",
                "description": "Data for your payload",
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "description": "Instatus API key"
                  },
                  "pageID": {
                    "type": "string",
                    "description": "Instatus Page ID"
                  }
                },
                "required": [
                  "apiKey",
                  "pageID"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "db_limit": {
      "type": "object",
      "description": "Database internal configuration",
      "required": [
        "max_db_size",
        "deleted_data",
        "cron_schedule"
      ],
      "properties": {
        "max_db_size": {
          "type": "number",
          "description": "Maximum Monika database size",
          "default": 1000000000
        },
        "deleted_data": {
          "type": "integer",
          "description": "Delete strategy when limit reached",
          "default": 1
        },
        "cron_schedule": {
          "type": "string",
          "description": "Schedule to trim the db in crontab",
          "default": "*/1 * * * *"
        }
      },
      "additionalProperties": false
    },
    "status-notification": {
      "type": "string",
      "title": "Status notification",
      "description": "Sends status notification periodically according to a cron schedule. Set to false to disable.",
      "default": "0 6 * * *"
    },
    "certificate": {
      "title": "Certificate",
      "type": "object",
      "description": "Check validity of your TLS certificate(s).",
      "properties": {
        "domains": {
          "type": "array",
          "description": "The list of domains to check",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Hostname to check",
                    "examples": [
                      "https://github.com"
                    ]
                  },
                  "options": {
                    "type": "object",
                    "description": "Custom HTTPs Options",
                    "properties": {
                      "path": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": true
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        },
        "reminder": {
          "type": "integer",
          "description": "The number of days to send notification to user before the domain expires",
          "examples": [
            30
          ]
        }
      },
      "required": [
        "domains"
      ],
      "additionalProperties": false
    },
    "version": {
      "type": "string",
      "title": "Monika configuration version",
      "description": "Monika configuration version",
      "default": "1"
    }
  },
  "$defs": {
    "urlFormat": {
      "type": "string",
      "pattern": "^https?://"
    },
    "incidentThreshold": {
      "type": "integer",
      "description": "Number of times an alert should return true before Monika sends incident notifications",
      "default": 5
    },
    "recoveryThreshold": {
      "type": "integer",
      "description": "Number of times an alert should return false before Monika sends recovery notifications",
      "default": 5
    },
    "interval": {
      "title": "Interval",
      "type": "integer",
      "description": "The number of seconds to repeat the probe",
      "default": 10
    },
    "postgres": {
      "title": "Postgres",
      "type": "array",
      "description": "Monitor postgres readiness",
      "items": {
        "type": "object",
        "anyOf": [
          {
            "required": [
              "uri"
            ],
            "properties": {
              "uri": {
                "title": "URI connection",
                "type": "string",
                "description": "Postgres uri connection configuration",
                "examples": [
                  "postgres://user:password@172.1.0.1:5432/mydb"
                ]
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          {
            "required": [
              "host",
              "port",
              "database"
            ],
            "properties": {
              "host": {
                "type": "string",
                "description": "Postgres host address to connect to",
                "default": "172.15.0.1"
              },
              "port": {
                "title": "Port",
                "type": "integer",
                "description": "Postgres port to connect to",
                "default": "5432"
              },
              "database": {
                "title": "Database",
                "type": "string",
                "description": "Name of the database",
                "default": ""
              },
              "username": {
                "title": "Username",
                "type": "string",
                "description": "Username with access to the database",
                "default": ""
              },
              "password": {
                "title": "Password",
                "type": "string",
                "description": "User's database password",
                "default": ""
              }
            },
            "additionalProperties": true,
            "type": "object"
          }
        ]
      }
    },
    "redis": {
      "title": "Redis",
      "type": "array",
      "description": "Monitor redis health ",
      "items": {
        "type": "object",
        "anyOf": [
          {
            "required": [
              "uri"
            ],
            "properties": {
              "uri": {
                "title": "URI connection",
                "type": "string",
                "description": "redis uri connection configuration",
                "examples": [
                  "redis://alice:mypassword@172.15.0.2:6379"
                ]
              }
            },
            "additionalProperties": true,
            "type": "object"
          },
          {
            "required": [
              "host",
              "port"
            ],
            "properties": {
              "host": {
                "title": "Redis host",
                "description": "The hostname or IP address of the redis server",
                "type": "string",
                "default": "172.15.0.1",
                "examples": [
                  "localhost",
                  "192.168.0.1"
                ]
              },
              "port": {
                "title": "Port number",
                "description": "Port number used for the redis",
                "type": "integer",
                "default": "6379"
              },
              "password": {
                "title": "Password",
                "description": "Password used for the redis AUTH, if set.",
                "type": "string",
                "default": ""
              },
              "username": {
                "title": "Username",
                "description": "Username used for the redis AUTH, if set.",
                "type": "string",
                "default": ""
              }
            },
            "additionalProperties": true,
            "type": "object"
          }
        ]
      }
    },
    "mongo": {
      "title": "MongoDB",
      "type": "array",
      "description": "Monitor MongoDB health ",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "title": "MongoDB URI",
            "description": "The hostname or IP address of the MongoDB server",
            "type": "string",
            "examples": [
              "mongodb://user:password@127.0.0.1:27017/database"
            ],
            "default": "mongodb://127.0.0.1:27017"
          },
          "host": {
            "title": "MongoDB host",
            "description": "The hostname or IP address of the MongoDB server",
            "type": "string",
            "examples": [
              "localhost",
              "127.0.0.1"
            ],
            "default": "0.0.0.0.0"
          },
          "port": {
            "title": "Port number",
            "description": "Port number used for the MongoDB",
            "type": "integer",
            "examples": [
              "27017"
            ],
            "default": "27017"
          },
          "password": {
            "title": "Password",
            "description": "Password used for the MongoDB AUTH, if set.",
            "type": "string",
            "default": ""
          },
          "username": {
            "title": "Username",
            "description": "Username used for the MongoDB AUTH, if set.",
            "type": "string",
            "default": ""
          }
        },
        "required": [],
        "additionalProperties": true
      }
    },
    "mariadb": {
      "title": "MariaDB/Mysql",
      "type": "array",
      "description": "Monitor MariaDB/Mysql health",
      "items": {
        "type": "object",
        "properties": {
          "host": {
            "title": "Database host",
            "description": "The hostname or IP address of the database server",
            "type": "string",
            "examples": [
              "localhost",
              "127.0.0.1",
              "172.11.0.1"
            ],
            "default": "0.0.0.0"
          },
          "port": {
            "title": "Port number",
            "description": "Port number used by your database server",
            "type": "integer",
            "default": "3306"
          },
          "username": {
            "title": "Username",
            "description": "User with access to the database",
            "type": "string",
            "default": ""
          },
          "password": {
            "title": "Password",
            "description": "User password for authentication",
            "type": "string",
            "default": ""
          },
          "database": {
            "title": "Database",
            "default": "Name of the database"
          }
        },
        "required": [
          "host",
          "port",
          "username",
          "password",
          "database"
        ],
        "additionalProperties": false
      }
    },
    "ping": {
      "title": "Ping",
      "type": "array",
      "description": "The ICMP ping probe",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "title": "Uri",
            "type": "string",
            "description": "The uri address to probe",
            "default": "https://api.github.com/zen",
            "examples": [
              "https://github.com",
              "https://httpbin.org/status/200"
            ]
          }
        },
        "required": [
          "uri"
        ],
        "additionalProperties": false
      }
    },
    "requests": {
      "title": "Requests",
      "type": "array",
      "description": "The http or ping request to probe for",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string",
            "description": "Unique string identification of the request",
            "examples": [
              "1"
            ],
            "default": "1"
          },
          "method": {
            "title": "HTTP Method",
            "type": "string",
            "description": "The http method",
            "enum": [
              "CONNECT",
              "DELETE",
              "GET",
              "HEAD",
              "LINK",
              "OPTIONS",
              "PATCH",
              "POST",
              "PURGE",
              "PUT",
              "TRACE",
              "UNLINK"
            ],
            "default": "GET"
          },
          "url": {
            "title": "Url",
            "type": "string",
            "description": "The remote URL address to probe",
            "default": "https://api.github.com/zen",
            "examples": [
              "https://github.com",
              "https://httpbin.org/status/200"
            ]
          },
          "timeout": {
            "title": "Timeout",
            "type": "integer",
            "description": "Set the timeout for the request in milliseconds, default is 10 seconds",
            "default": 10000
          },
          "saveBody": {
            "title": "SaveBody",
            "type": "boolean",
            "description": "Should response body be saved in the database",
            "default": false
          },
          "alerts": {
            "$ref": "#/$defs/alerts"
          },
          "allowUnauthorized": {
            "title": "AllowUnauthorized",
            "type": "boolean",
            "description": "If defined and to true, the request will ignore SSL certificate validity"
          },
          "body": {
            "$ref": "#/$defs/body"
          },
          "followRedirects": {
            "title": "Follow Redirects",
            "description": "The request follows redirects as many times as specified here",
            "type": "integer",
            "examples": [
              "21"
            ],
            "default": "21"
          },
          "headers": {
            "$ref": "#/$defs/headers"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false,
        "patternProperties": {
          "ping": {
            "type": "boolean"
          }
        }
      }
    },
    "socket": {
      "title": "Socket",
      "type": "object",
      "description": "Socket is a TCP type request",
      "properties": {
        "host": {
          "type": "string",
          "description": "Address to your host"
        },
        "port": {
          "title": "Port",
          "type": "integer",
          "description": "Host port to connect to"
        },
        "data": {
          "title": "Data",
          "type": "string",
          "description": "Data payload for the request"
        }
      },
      "required": [
        "host",
        "port",
        "data"
      ],
      "additionalProperties": false
    },
    "alerts": {
      "title": "Alerts",
      "type": "array",
      "description": "The condition which will trigger an alert and the subsequent notification",
      "items": {
        "type": "object",
        "anyOf": [
          {
            "required": [
              "assertion",
              "message"
            ],
            "properties": {
              "id": {
                "title": "Id",
                "type": "string",
                "description": "Unique string identification of the alert",
                "examples": [
                  "alert-1"
                ],
                "default": "alert-1"
              },
              "assertion": {
                "title": "Assertion",
                "type": "string",
                "description": "An expression that will trigger an alert when its is logically true. See the assertions here: <https://monika.hyperjump.tech/guides/alerts#alert-query>",
                "default": "response.status != 200"
              },
              "message": {
                "title": "Message",
                "type": "string",
                "description": "Message that will be sent to the notification channel",
                "default": "Http Response status code is not 200!"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          {
            "required": [
              "query",
              "message"
            ],
            "properties": {
              "id": {
                "title": "Id",
                "type": "string",
                "description": "Unique string identification of the alert",
                "examples": [
                  "alert-1"
                ],
                "default": "alert-1"
              },
              "query": {
                "title": "Query",
                "type": "string",
                "description": "Note: Query is deprecated, please use assertion",
                "default": "response.status != 200"
              },
              "message": {
                "title": "Message",
                "type": "string",
                "description": "Message that will be sent to the notification channel",
                "default": "Http Response status code is not 200!"
              }
            },
            "additionalProperties": false,
            "type": "object"
          }
        ]
      }
    },
    "body": {
      "title": "Body",
      "description": "The data bytes transmitted in an HTTP transaction message immediately following the headers if there are any"
    },
    "headers": {
      "title": "Headers",
      "type": "object",
      "description": "A list of strings sent and received by both the client program and server on every HTTP request and response",
      "properties": {
        "Accept": {
          "type": "string",
          "description": "Media type(s) that is/are acceptable for the response"
        },
        "Accept-Charset": {
          "type": "string",
          "description": "Character sets that are acceptable"
        },
        "Accept-Encoding": {
          "type": "string",
          "description": "List of acceptable encodings"
        },
        "Authorization": {
          "type": "string",
          "description": "Authentication credentials for HTTP authentication"
        },
        "Cache-Control": {
          "type": "string",
          "description": "Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain"
        },
        "Cookie": {
          "type": "string",
          "description": "An HTTP cookie previously sent by the server with Set-Cookie"
        },
        "Connection": {
          "type": "string",
          "description": "General header that allows the sender or client to specify options that are desired for that particular connection"
        },
        "Content-Type": {
          "type": "string",
          "description": "The Media type of the body of the request (used with POST and PUT requests"
        },
        "Keep-Alive": {
          "type": "string",
          "description": "General header used to inform how long a persistent connection should stay open"
        },
        "Origin": {
          "type": "string",
          "description": "Initiates a request for cross-origin resource sharing (asks server for Access-Control-* response fields)"
        },
        "Referer": {
          "type": "string",
          "description": "This is the address of the previous web page (referrer) from which a link to the currently requested page was followed"
        },
        "User-Agent": {
          "type": "string",
          "description": "The user agent string of the user agent"
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}
