Relumin is a REdis cLUster adMIN tool.
Main feature is ...
- Visualize Redis cluster status
- Operating Cluster
- Add node, Resharding, Delete node, Replicate, Failover...etc
- Visualize Redis node metrics as chart
- Metrics is get by http://redis.io/commands/info
- Alert
- You can set threshold freely.
- There are some redis tool, but they don't support Redis cluster.
- It is difficult to understand cluster status. I want visualize.
- Other cluster storages have GUI tool.
- For example,
- Riak has "Riak control(http://docs.basho.com/riak/latest/ops/advanced/riak-control/)".
- Cassandra has "Datastax(http://www.datastax.com/)".
- For example,
So I developed.
Very easy.
Please download from this.
https://github.com/be-hase/relumin/releases
Install Java8 on your server.
( I tested Oracle JDK. )
Install Redis on your server.
Redis is used for store meta data and metrics data.
Memory is expensive. So I will support MySQL. Prease wait...
Please write config file.
Specify this config path when you start Relumin.
Example:
host: 10.10.10.10
server:
port: 8080
monitorPort: 20080
redis:
host: localhost
port: 10000
auth:
enabled: true
allowAnonymous: true
notice:
mail:
host: smtp.example.com
port: 25
from: relumin-alert@example.com
scheduler:
collectStaticsInfoMaxCount: 10000
This is property table.
property name | default | required | description |
---|---|---|---|
host | Host or IP of server which Relumin running on. This is used for alert mail. |
||
server.port | 8080 | Port of Relumin server. | |
server.monitorPort | 20080 | Port of Relumin server for monitoring. | |
redis.prefixKey | _relumin | Prefix key of Redis. This prefix key is used for meta data and metrics data. | |
redis.host | Y | Redis's host. | |
redis.port | Y | Redis's port | |
auth.enabled | false | If this value is false, Every user can execute all operation. (Cluster operation, User CRUD, Notification CRUD...etc) |
|
auth.allowAnonymous | false | If this value is true, anonymous user can access Relumin. But only view. |
|
notice.mail.host | Host of SMTP server. | ||
notice.mail.port | Port of SMTP server. | ||
notice.mail.user | User of SMTP Auth. | ||
notice.mail.password | Password of SMTP Auth. | ||
notice.mail.charset | UTF-8 | Charset of alert mail. | |
notice.mail.from | "From" mail address. This value can be overriden by cluster setting. | ||
scheduler.refreshClustersIntervalMillis | 120000 | Interval(milliseconds) of refresh meta data of Redis cluster. Recommend default. |
|
scheduler.collectStaticsInfoIntervalMillis | 120000 | Interval(milliseconds) of collect metrics data. If threshold condition is satisfied, send notice. | |
scheduler.collectStaticsInfoMaxCount | 1500 | Save count of metrics data. If you want save latest 1 week, you specify "5040". (60 * 24 * 7) / 2 = 5040 |
|
scheduler.collectSlowLogMaxCount | 1500 | Save count of slowlog. | |
outputMetrics.fluentd.enabled | false | If you want to forward metris data into fluentd, specify true. | |
outputMetrics.fluentd.host | Host of Fluentd. | ||
outputMetrics.fluentd.port | Port of Fluentd. | ||
outputMetrics.fluentd.timeout | 3000 | Timeout of Fluentd Java Library. | |
outputMetrics.fluentd.bufferCapacity | 1048576 | BufferCapacity of Fluentd Java Library. | |
outputMetrics.fluentd.tag | relumin | Tag of Fluentd. Send by below format. <outputMetrics.fluentd.tag>.outputMetrics.fluentd.nodeTag> |
|
outputMetrics.fluentd.nodeTag | node | Ref avobe. |
Please start jar file.
You can specify log parameter.
- log.type : console or file
- log.level : DEBUG, INFO, WARN, ERROR... (logback's level)
- log.dir : /path/your/logDir
java -Dconfig=/path/your/config/relumin.yml -Dlog.type=file -Dlog.level=INFO -Dlog.dir=/path/your/logDir -jar relumin-0.0.1.jar > /dev/null 2>&1 &
Relumin run on JVM, so you can specify JVM option. Like a below.
JVM_OPT="-server -Dfile.encoding=UTF-8 -Xms2g -Xmx2g \
-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=80 \
-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled \
-XX:CMSInitiatingOccupancyFraction=70 \
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${LOG_PATH}/relumin -verbose:gc \
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:${LOG_PATH}/relumin/relumin.gc.log \
-XX:+UseGCLogFileRotation -XX:GCLogFileSize=512m -XX:NumberOfGCLogFiles=5"
java -Dconfig=/path/your/config/relumin.yml -Dlog.type=file -Dlog.level=INFO -Dlog.dir=/path/your/logDir -jar relumin-0.0.1.jar > /dev/null 2>&1 &
Relumin support role-based authenticate&authorize.
Relumin user has 2 role.
role name | description |
---|---|
VIEWER | Only view user. |
RELUMIN_ADMIN | This user execute all Relumin operation. (Cluster operation, User CRUD, Notification CRUD...etc) |
A user who is RELUMIN_ADMIN can add user from 'http:///#/users'.
How do I add First RELUMIN_ADMIN user?
Please specify 'auth.enabled' false, and add RELUMIN_USER, and 'auth.enabled' true.
You can configure whether anonymous user can access Relumin or not by specifying 'auth.allowAnonymous'. If this value is true, anonymous user can use relumin as VIEWER role.
- Build docker image.
docker build -t relumin/relumin-test .
- Run docker.
docker run -d --net="host" -p 9000:9000 -p 10000:10000 -p 10001:10001 -p 10002:10002 -p 10003:10003 -p 10004:10004 -p 10005:10005 -p 20000:20000 -p 20001:20001 -p 20002:20002 -p 20003:20003 -p 20004:20004 -p 20005:20005 -p 10010:10010 -p 10011:10011 -p 10012:10012 -p 10013:10013 -p 10014:10014 -p 10015:10015 relumin/relumin-test
- Copy config files.
cp src/main/resources/relumin-local-conf.yml.sample src/main/resources/relumin-local-conf.yml
,cp src/test/resources/application.yml.sample src/test/resources/application.yml
- Replace "YOUR_DOCKER_HOST" of config files.
- Write your code.
- Run unit test.
mvn clean test
- Run spring boot app.
mvn clean spring-boot:run -Dconfig=relumin-local-conf.yml
- Support share URL
- Support MySQL for meta data and metrics data.
Server
- Written by Java.
- Based on Spring Boot.
Front
- Single Page Application.
- Written by pure javascript.
- Based on React(Flux), Webpack and Gulp.