2021-04-18 15:41:13 -04:00
|
|
|
// Copyright (c) 2015-2021 MinIO, Inc.
|
|
|
|
//
|
|
|
|
// This file is part of MinIO Object Storage stack
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2019-10-23 01:59:13 -04:00
|
|
|
|
|
|
|
package notify
|
|
|
|
|
|
|
|
import (
|
2021-06-01 17:59:40 -04:00
|
|
|
"github.com/minio/minio/internal/config"
|
|
|
|
"github.com/minio/minio/internal/event/target"
|
2019-10-23 01:59:13 -04:00
|
|
|
)
|
|
|
|
|
2019-12-06 16:53:51 -05:00
|
|
|
const (
|
|
|
|
formatComment = `'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'`
|
|
|
|
queueDirComment = `staging dir for undelivered messages e.g. '/home/events'`
|
2020-04-18 04:20:56 -04:00
|
|
|
queueLimitComment = `maximum limit for undelivered messages, defaults to '100000'`
|
2019-12-06 16:53:51 -05:00
|
|
|
)
|
|
|
|
|
2019-10-23 01:59:13 -04:00
|
|
|
// Help template inputs for all notification targets
|
|
|
|
var (
|
2019-12-06 16:53:51 -05:00
|
|
|
HelpWebhook = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.WebhookEndpoint,
|
|
|
|
Description: "webhook server endpoint e.g. http://localhost:8080/minio/events",
|
|
|
|
Type: "url",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.WebhookAuthToken,
|
|
|
|
Description: "opaque string or JWT authorization token",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.WebhookQueueDir,
|
|
|
|
Description: queueDirComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.WebhookQueueLimit,
|
|
|
|
Description: queueLimitComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
|
|
|
Description: config.DefaultComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2020-06-08 08:55:44 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.WebhookClientCert,
|
|
|
|
Description: "client cert for Webhook mTLS auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2020-06-08 08:55:44 -04:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.WebhookClientKey,
|
|
|
|
Description: "client cert key for Webhook mTLS auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2020-06-08 08:55:44 -04:00
|
|
|
},
|
2019-12-06 16:53:51 -05:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:48:13 -05:00
|
|
|
HelpAMQP = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpURL,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "url",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpExchange,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "name of the AMQP exchange",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpExchangeType,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "AMQP exchange type",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpRoutingKey,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "routing key for publishing",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpMandatory,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "quietly ignore undelivered messages when set to 'off', default is 'on'",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpDurable,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "persist queue across broker restarts when set to 'on', default is 'off'",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpNoWait,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "non-blocking message delivery when set to 'on', default is 'off'",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpInternal,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpAutoDeleted,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "auto delete queue when set to 'on', when there are no consumers",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpDeliveryMode,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "set to '1' for non-persistent or '2' for persistent queue",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2021-06-14 16:28:44 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpPublisherConfirms,
|
2024-01-18 02:03:17 -05:00
|
|
|
Description: "enable consumer acknowledgement and publisher confirms, use this along with queue_dir for guaranteed delivery of all events",
|
2021-06-14 16:28:44 -04:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpQueueDir,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueDirComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.AmqpQueueLimit,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueLimitComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:48:13 -05:00
|
|
|
HelpKafka = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaBrokers,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "comma separated list of Kafka broker addresses",
|
2019-11-20 18:10:24 -05:00
|
|
|
Type: "csv",
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaTopic,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "Kafka topic used for bucket notifications",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaSASLUsername,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "username for SASL/PLAIN or SASL/SCRAM authentication",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaSASLPassword,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "password for SASL/PLAIN or SASL/SCRAM authentication",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
2020-03-20 14:10:27 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaSASLMechanism,
|
|
|
|
Description: "sasl authentication mechanism, default 'plain'",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaTLSClientAuth,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "clientAuth determines the Kafka server's policy for TLS client auth",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaSASL,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "set to 'on' to enable SASL authentication",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaTLS,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "set to 'on' to enable TLS",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaTLSSkipVerify,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: `trust server TLS without verification, defaults to "on" (verify)`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.KafkaClientTLSCert,
|
|
|
|
Description: "path to client certificate for mTLS auth",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.KafkaClientTLSKey,
|
|
|
|
Description: "path to client key for mTLS auth",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
Type: "path",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
2019-12-05 18:31:46 -05:00
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.KafkaQueueDir,
|
|
|
|
Description: queueDirComment,
|
2019-12-05 18:31:46 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.KafkaQueueLimit,
|
|
|
|
Description: queueLimitComment,
|
2019-12-05 18:31:46 -05:00
|
|
|
Optional: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
Type: "number",
|
2019-12-05 18:31:46 -05:00
|
|
|
},
|
2020-02-16 21:26:34 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaVersion,
|
|
|
|
Description: "specify the version of the Kafka cluster",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2023-11-30 03:25:03 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaCompressionCodec,
|
|
|
|
Description: "specify compression_codec of the Kafka cluster",
|
|
|
|
Optional: true,
|
|
|
|
Type: "none|snappy|gzip|lz4|zstd",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.KafkaCompressionLevel,
|
|
|
|
Description: "specify compression level of the Kafka cluster",
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:48:13 -05:00
|
|
|
HelpMQTT = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttBroker,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "MQTT server endpoint e.g. `tcp://localhost:1883`",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "uri",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttTopic,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "name of the MQTT topic to publish",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttUsername,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "MQTT username",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttPassword,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "MQTT password",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttQoS,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "set the quality of service priority, defaults to '0'",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttKeepAliveInterval,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "keep-alive interval for MQTT connections in s,m,h,d",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "duration",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttReconnectInterval,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "reconnect interval for MQTT connections in s,m,h,d",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "duration",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttQueueDir,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueDirComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MqttQueueLimit,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueLimitComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2019-12-06 16:53:51 -05:00
|
|
|
HelpPostgres = config.HelpKVS{
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.PostgresConnectionString,
|
2020-04-10 00:45:17 -04:00
|
|
|
Description: `Postgres server connection-string e.g. "host=localhost port=5432 dbname=minio_events user=postgres password=password sslmode=disable"`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.PostgresTable,
|
|
|
|
Description: "DB table name to store/update events, table is auto-created",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.PostgresFormat,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: formatComment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Type: "namespace*|access",
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.PostgresQueueDir,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueDirComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.PostgresQueueLimit,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueLimitComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2020-09-25 01:20:30 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.PostgresMaxOpenConnections,
|
|
|
|
Description: "To set the maximum number of open connections to the database. The value is set to `2` by default.",
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:48:13 -05:00
|
|
|
HelpMySQL = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MySQLDSNString,
|
2020-04-10 00:45:17 -04:00
|
|
|
Description: `MySQL data-source-name connection string e.g. "<user>:<password>@tcp(<host>:<port>)/<database>"`,
|
2020-03-29 01:20:02 -04:00
|
|
|
Optional: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MySQLTable,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "DB table name to store/update events, table is auto-created",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MySQLFormat,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: formatComment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Type: "namespace*|access",
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MySQLQueueDir,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueDirComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MySQLQueueLimit,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueLimitComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2020-09-25 01:20:30 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.MySQLMaxOpenConnections,
|
|
|
|
Description: "To set the maximum number of open connections to the database. The value is set to `2` by default.",
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:48:13 -05:00
|
|
|
HelpNATS = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSAddress,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "NATS server address e.g. '0.0.0.0:4222'",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "address",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSSubject,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "NATS subscription subject",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSUsername,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "NATS username",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSPassword,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "NATS password",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSToken,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "NATS token",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.NATSTLS,
|
|
|
|
Description: "set to 'on' to enable TLS",
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSTLSSkipVerify,
|
|
|
|
Description: `trust server TLS without verification, defaults to "on" (verify)`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSPingInterval,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "client ping commands interval in s,m,h,d. Disabled by default",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "duration",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.NATSCertAuthority,
|
|
|
|
Description: "path to certificate chain of the target NATS server",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.NATSClientCert,
|
|
|
|
Description: "client cert for NATS mTLS auth",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.NATSClientKey,
|
|
|
|
Description: "client cert key for NATS mTLS auth",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
2022-07-06 16:29:08 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSJetStream,
|
|
|
|
Description: "enable JetStream support",
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.NATSQueueDir,
|
|
|
|
Description: queueDirComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
Type: "path",
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
2019-12-06 16:53:51 -05:00
|
|
|
Key: target.NATSQueueLimit,
|
|
|
|
Description: queueLimitComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
Type: "number",
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
2022-07-06 16:29:08 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSStreaming,
|
|
|
|
Description: "[DEPRECATED] set to 'on', to use streaming NATS server",
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSStreamingAsync,
|
|
|
|
Description: "[DEPRECATED] set to 'on', to enable asynchronous publish",
|
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSStreamingMaxPubAcksInFlight,
|
|
|
|
Description: "[DEPRECATED] number of messages to publish without waiting for ACKs",
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NATSStreamingClusterID,
|
|
|
|
Description: "[DEPRECATED] unique ID for NATS streaming cluster",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
2019-11-19 16:48:13 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
|
2019-11-19 16:48:13 -05:00
|
|
|
HelpNSQ = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NSQAddress,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: "NSQ server address e.g. '127.0.0.1:4150'",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "address",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-11-19 16:48:13 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NSQTopic,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "NSQ topic",
|
2019-11-19 16:48:13 -05:00
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NSQTLS,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: "set to 'on' to enable TLS",
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NSQTLSSkipVerify,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: `trust server TLS without verification, defaults to "on" (verify)`,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "on|off",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NSQQueueDir,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueDirComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.NSQQueueLimit,
|
2019-12-06 16:53:51 -05:00
|
|
|
Description: queueLimitComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
|
|
|
Description: config.DefaultComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
HelpES = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticURL,
|
|
|
|
Description: "Elasticsearch server's address, with optional authentication info",
|
|
|
|
Type: "url",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticIndex,
|
|
|
|
Description: `Elasticsearch index to store/update events, index is auto-created`,
|
|
|
|
Type: "string",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticFormat,
|
|
|
|
Description: formatComment,
|
|
|
|
Type: "namespace*|access",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticQueueDir,
|
|
|
|
Description: queueDirComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticQueueLimit,
|
|
|
|
Description: queueLimitComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
2020-08-23 12:43:48 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticUsername,
|
|
|
|
Description: "username for Elasticsearch basic-auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2020-08-23 12:43:48 -04:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.ElasticPassword,
|
|
|
|
Description: "password for Elasticsearch basic-auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2020-08-23 12:43:48 -04:00
|
|
|
},
|
2019-12-06 16:53:51 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
|
|
|
Description: config.DefaultComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
HelpRedis = config.HelpKVS{
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisAddress,
|
|
|
|
Description: "Redis server's address. For example: `localhost:6379`",
|
|
|
|
Type: "address",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisKey,
|
|
|
|
Description: "Redis key to store/update events, key is auto-created",
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisFormat,
|
|
|
|
Description: formatComment,
|
|
|
|
Type: "namespace*|access",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisPassword,
|
|
|
|
Description: "Redis server password",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
2021-06-03 11:15:44 -04:00
|
|
|
Sensitive: true,
|
2023-06-23 10:45:27 -04:00
|
|
|
Secret: true,
|
2019-12-06 16:53:51 -05:00
|
|
|
},
|
2024-03-19 00:37:54 -04:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisUser,
|
|
|
|
Description: "Redis server user for the auth",
|
|
|
|
Optional: true,
|
|
|
|
Type: "string",
|
|
|
|
},
|
2019-12-06 16:53:51 -05:00
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisQueueDir,
|
|
|
|
Description: queueDirComment,
|
|
|
|
Optional: true,
|
|
|
|
Type: "path",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: target.RedisQueueLimit,
|
|
|
|
Description: queueLimitComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "number",
|
|
|
|
},
|
|
|
|
config.HelpKV{
|
|
|
|
Key: config.Comment,
|
2019-12-04 18:32:37 -05:00
|
|
|
Description: config.DefaultComment,
|
2019-11-19 16:48:13 -05:00
|
|
|
Optional: true,
|
|
|
|
Type: "sentence",
|
|
|
|
},
|
2019-10-23 01:59:13 -04:00
|
|
|
}
|
|
|
|
)
|