OPENALYSIS
You Can (Not) Observe
Open Analysis Service
Install
go install github.com/B1NARY-GR0UP/openalysis@latest
go get -u github.com/B1NARY-GR0UP/openalysis
- Do not have a Go environment? Check the Quick Start section.
- Start: Start OPENALYSIS service
- Restart: Restart OPENALYSIS service
Usage:
openalysis [command]
Available Commands:
help Help about any command
restart restart openalysis service
start start openalysis service
Flags:
-h, --help help for openalysis
-v, --version version for openalysis
NOTE:
1. All configurations are based on the configuration file, and if flags are set, they will override the configurations in the configuration file.
2. If the configuration file path is not specified, the project's default configuration file will be used.
Start - Start OPENALYSIS service
openalysis start [flags] [path2config]
Short |
Long |
Description |
-t |
--token |
Your GitHub Token |
-c |
--cron |
Your Cron Spec |
-r |
--retry |
Retry Times |
-h |
--help |
Help for Start |
openalysis start -c "@hourly" -r "5" config.yaml
Restart - Restart OPENALYSIS service
openalysis restart [flags] [path2config]
Short |
Long |
Description |
-t |
--token |
Your GitHub Token |
-c |
--cron |
Your Cron Spec |
-r |
--retry |
Retry Times |
-h |
--help |
Help for Restart |
openalysis restart -t "example-github-token"
Sample Configuration File
Configure the organization or repository you want to analyze on a group basis.
You can set up multiple groups, where each group can contain multiple organizations or repositories.
The configuration for MySQL, will be used as a datasource for Grafana.
The backend configuration for the service includes settings for cron
, GitHub token
, and retry
attempts.
The configuration for unifying contributor's location and company information.
groups:
- name: "cloudwego"
orgs:
- "cloudwego"
- "kitex-contrib"
- "hertz-contrib"
- "volo-rs"
repos:
- "bytedance/sonic"
- "bytedance/monoio"
datasource:
mysql:
host: "mysql"
port: "3306"
user: "openalysis"
password: "openalysis"
database: "openalysis?charset=utf8&parseTime=True&loc=Local"
backend:
cron: "@daily"
token: "your-github-token"
retry: 3
# "`Before` => `After`"
cleaner:
- "`@CloudWeGo` => `CloudWeGo`"
- "`@cloudwego` => `CloudWeGo`"
Quick Start
Step 1: Create GitHub Token
Create a fine-grained personal access token.
Step 2: Start Service
Config the command in the openalysis
service.
docker-compose up --build
Start your MySQL and Grafana.
docker build -t openalysis .
docker run -it -v path2config.yaml:/src openalysis start path2config.yaml
Step 3: Config Grafana
- Visit
127.0.0.1:3000
on browser
- Add MySQL Datasource
- Import template in
template
folder
Dashboard Effect Display
Acknowledgement
Sincere appreciation to the CloudWeGo community, without whose help this project would not have been possible.
License
OPENALYSIS is distributed under the Apache License 2.0. The licenses of third party dependencies of OPENALYSIS are explained here.
ECOLOGY
OPENALYSIS is a Subproject of the BINARY WEB ECOLOGY