firehol/netdata

View on GitHub
src/go/plugin/go.d/modules/redis/config_schema.json

Summary

Maintainability
Test Coverage
{
  "jsonSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "title": "Redis collector configuration.",
    "properties": {
      "update_every": {
        "title": "Update every",
        "description": "Data collection interval, measured in seconds.",
        "type": "integer",
        "minimum": 1,
        "default": 1
      },
      "address": {
        "title": "URI",
        "description": "The URI specifying the connection details for the Redis server.",
        "type": "string",
        "default": "redis://@localhost:6379"
      },
      "timeout": {
        "title": "Timeout",
        "description": "Timeout for establishing a connection and communication (reading and writing) in seconds.",
        "type": "number",
        "minimum": 0.5,
        "default": 1
      },
      "ping_samples": {
        "title": "Ping samples",
        "description": "The number of PING commands to send per data collection interval. Used to calculate latency.",
        "type": "integer",
        "minimum": 1,
        "default": 5
      },
      "username": {
        "title": "Username",
        "description": "The username for authentication.",
        "type": "string",
        "sensitive": true
      },
      "password": {
        "title": "Password",
        "description": "The password for authentication.",
        "type": "string",
        "sensitive": true
      },
      "tls_skip_verify": {
        "title": "Skip TLS verification",
        "description": "If set, TLS certificate verification will be skipped.",
        "type": "boolean"
      },
      "tls_ca": {
        "title": "TLS CA",
        "description": "The path to the CA certificate file for TLS verification.",
        "type": "string"
      },
      "tls_cert": {
        "title": "TLS certificate",
        "description": "The path to the client certificate file for TLS authentication.",
        "type": "string"
      },
      "tls_key": {
        "title": "TLS key",
        "description": "The path to the client key file for TLS authentication.",
        "type": "string"
      }
    },
    "required": [
      "address"
    ],
    "additionalProperties": false,
    "patternProperties": {
      "^name$": {}
    }
  },
  "uiSchema": {
    "uiOptions": {
      "fullPage": true
    },
    "address": {
      "ui:placeholder": "redis://user:password@host:port",
      "ui:help": "Tcp connection: `redis://user:password@host:port`. Unix connection: `unix://user:password@/path/to/redis.sock`."
    },
    "timeout": {
      "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)."
    },
    "username": {
      "ui:widget": "password"
    },
    "password": {
      "ui:widget": "password"
    },
    "ui:flavour": "tabs",
    "ui:options": {
      "tabs": [
        {
          "title": "Base",
          "fields": [
            "update_every",
            "address",
            "timeout",
            "ping_samples"
          ]
        },
        {
          "title": "Auth",
          "fields": [
            "username",
            "password"
          ]
        },
        {
          "title": "TLS",
          "fields": [
            "tls_skip_verify",
            "tls_ca",
            "tls_cert",
            "tls_key"
          ]
        }
      ]
    }
  }
}