Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This indicates event notifications to Postgres is are available.

The next thing you need to do is enable eventing on whatever bucket you want to monitor.

...

Note: The minioevents table will be created if it does not already exists

Notifications to Kafka

To send bucket notifications to Kafka you first need to setup the following environment variables (if you are using tls authentication):

Code Block
languageyml
titleMinio ENV
        - name: MINIO_NOTIFY_KAFKA_ENABLE_PRIMARY
          value: "on"
        - name: MINIO_NOTIFY_KAFKA_BROKERS_PRIMARY
          value: "my-cluster-kafka-external-0.kafka:9098"
        - name: MINIO_NOTIFY_KAFKA_TOPIC_PRIMARY
          value: "my-topic"
        - name: MINIO_NOTIFY_KAFKA_TLS_PRIMARY
          value: "on"
        - name: MINIO_NOTIFY_KAFKA_TLS_SKIP_VERIFY_PRIMARY
          value: "on"
        - name: MINIO_NOTIFY_KAFKA_CLIENT_TLS_CERT_PRIMARY
          value: "/etc/kafka/ssl/user.crt"
        - name: MINIO_NOTIFY_KAFKA_CLIENT_TLS_KEY_PRIMARY
          value: "/etc/kafka/ssl/user.key"

Note:  You will also need to copy the required tls certs into a secret and mount them somewhere in the Minio pod.

In this example I have used an identifier of PRIMARY but you can use whatever you prefer.

When Minio starts you should see the following line in your log: SQS ARNs: arn:minio:sqs::PRIMARY:kafka

This indicates event notifications to Kafka are available.

The next thing you need to do is enable eventing on whatever bucket you want to monitor.

Code Block
 /minio$ mc event add myminio/encrypt arn:minio:sqs::PRIMARY:kafka
Successfully added arn:minio:sqs::PRIMARY:kafka
   
/minio$ mc event list myminio/encrypt arn:minio:sqs::PRIMARY:kafka
arn:minio:sqs::PRIMARY:kafka   s3:ObjectCreated:*,s3:ObjectRemoved:*,s3:ObjectAccessed:*   Filter:

The second command lists the events Minio will notify on.

When you upload a file:

Code Block
/minio$ mc cp test.txt myminio/encrypt
.../go/minio/test.txt:  13 B / 13 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 78 B/s 0s

You see a new record in "my-topic"

Image Added

Links

Monitoring Bucket and Object Events

...