Skip to content

How to add a notification

Cesar Celis Hernandez edited this page Feb 26, 2022 · 18 revisions

Add notification

  1. Start MinIO Server
minio server /Volumes/data{1...4} --address localhost:9000 --console-address localhost:9001

As a result you should see this:

Automatically configured API requests per node based on available memory on the system: 263
Status:         4 Online, 0 Offline. 
API: http://192.168.0.21:9000  http://127.0.0.1:9000                       
RootUser: minioadmin 
RootPass: minioadmin 

Console: http://localhost:6001 
RootUser: minioadmin 
RootPass: minioadmin 

Command-line: https://docs.min.io/docs/minio-client-quickstart-guide
   $ mc alias set myminio http://192.168.0.21:9000 minioadmin minioadmin

Documentation: https://docs.min.io
  1. Then launch docker container to have PostgreSQL, make sure your docker daemon is running:
docker run --name pgsqlcontainer -p 5432:5432 -e POSTGRES_PASSWORD=password -d postgres
  1. Then connect to the Data Base and create this table below:
psql --host localhost --port 5432 --user postgres

The password is: password as set above in docker command: POSTGRES_PASSWORD=password

CREATE TABLE events (
	key serial PRIMARY KEY,
	value varchar(30),
	event_time timestamp DEFAULT now(),
	event_data text
);
  1. Navigate to http://localhost:9001/login:

Where credentials are:

User: minioadmin

Password: minioadmin

Screen Shot 2022-02-26 at 1 13 25 PM
  1. Then go to notification page under http://localhost:9001/settings/notification-endpoints:
Screen Shot 2022-02-26 at 1 18 57 PM
  1. Then select PostgreSQL option:
Screen Shot 2022-02-26 at 1 44 03 PM
  1. Then fill out the form:
Connection String: user=postgres password=password host=localhost dbname=postgres port=5432 sslmode=disable
Table: events
Queue Dir: Blank
Queue Limit: 10000
Comment: some comment
Screen Shot 2022-02-26 at 1 45 28 PM