clickvisual / clickvisual

A lightweight log analytic and data visualize platform built on clickhouse.

Home Page:https://clickvisual.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

我使用docker-compose部署服务后,然后启动,出现sim2telnet这样的错误

douyahu opened this issue · comments

配置文件如下:

[app]
isMultiCopy = false  # multi-copy mode: Redis must be configured, otherwise the service cannot start
secretKey = "secretKey"
rootURL = "http://localhost:19001"
baseURL = "/api/admin/login/"
permissionFile = './config/resource.yaml'
serveFromSubPath = false

[casbin.rule]
path = "./config/rbac.conf"

[server.http]
# HTTP server Host
host = "0.0.0.0"
# HTTP server Port
port = 19001
embedPath = "dist"
maxAge = 86400

[server.governor]
# Governor server host
host = "0.0.0.0"
# Governor server port
port = 19011

[logger]
# log level, available level: "debug", "info", "warn", "error", "panic", "fatal"
level = "info"
name = "clickvisual.log"

# if isMultiCopy is true
[redis]
debug = true
addr = "127.0.0.1:6379"
writeTimeout = "3s"
password = "**"

[mysql]
debug = true
# database DSN
dsn = "root:shimo@tcp(192.168.66.101:13306)/clickvisual?charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&loc=Local&readTimeout=1s&timeout=1s&writeTimeout=3s"
# log level
level = "debug"
# maximum number of connections in the idle connection pool for database
maxIdleConns = 5
# maximum number of open connections for database
maxOpenConns = 10
# maximum amount of time a connection
connMaxLifetime = "300s"

[auth]
mode = "memstore" # redis memstore
name = "clickvisual_session"
debug = true
Keypairs = "secret"
# if use mode redis
# redisSize = 10
# redisNetwork = "tcp"
# redisAddr = ""
# redisPassword = ""

[auth.anonymous]
# enable anonymous access
enabled = false

[auth.proxy]
enabled = false
isAutoLogin = false
headerName = "X-CLICKVISUAL-USER"
headerNickName = "X-CLICKVISUAL-NICKNAME"
rootTokenKey = "X-CLICKVISUAL-TOKEN"
rootTokenValue = "xxx"

[[auth.tps]]
typ = "github"
enable = true
clientId = ""
clientSecret = ""
allowSignUp = true
scopes = ["user:email", "read:org"]
authUrl = "https://github.com/login/oauth/authorize"
tokenUrl = "https://github.com/login/oauth/access_token"
apiUrl = "https://api.github.com/user"
allowedDomains = []
teamIds = []
allowedOrganizations = []

[[auth.tps]]
typ = "gitlab"
enable = true
clientId = ""
clientSecret = ""
allowSignUp = true
scopes = ["api"]
authUrl = "https://gitlab.com/oauth/authorize"
tokenUrl = "https://gitlab.com/oauth/token"
apiUrl = "https://gitlab.com/api/v4"
allowedDomains = []
teamIds = []
allowedOrganizations = []

[prom2click]
enable = true

[[prom2click.cfgs]]
host = "127.0.0.1"
port = 9201
clickhouseDSN = "tcp://127.0.0.1:9000"
clickhouseDB = "metrics"
clickhouseTable = "samples"

docker服务如下:

image

conpose.yaml

version: '3'
networks:
  clickvisual-net:
    driver: bridge
services:
  clickvisual:
    networks:
      - clickvisual-net
    image: clickvisual/clickvisual:master
    container_name: clickvisual
    environment:
      EGO_CONFIG_PATH: /clickvisual/config/docker.toml
      EGO_LOG_WRITER: stderr
    expose:
      - 9201
    ports:
      - "19001:19001"
    restart: always
    volumes:
      - ./config:/clickvisual/config
    command: [ '/bin/sh', '-c', './bin/clickvisual server' ]

  alertmanager:
    networks:
      - clickvisual-net
    image: prom/alertmanager:latest
    volumes:
      - ./data/all-in-one/alertmanager/alertmanager.yaml:/etc/alertmanager/config/alertmanager.yaml
    command: [
      "--config.file=/etc/alertmanager/config/alertmanager.yaml",
      "--cluster.listen-address=localhost:6783",
      "--storage.path=/alertmanager",
      "--data.retention=120h",
      "--web.listen-address=:9093",
      "--web.route-prefix=/"
    ]
    expose:
      - 9093
    ports:
      - 19005:9093
  prom2click:
    networks:
      - clickvisual-net
    image: fhalim/prom2click:latest
    command:
      - '-ch.dsn=tcp://192.168.66.101:9000?username=admin&password=123&read_timeout=10&write_timeout=10&debug=true'
      - '-ch.db=metrics'
      - '-ch.table=samples'
    expose:
      - 9201
    ports:
      - 19006:9201
    #depends_on:
    #  - clickhouse
    #links:
    #  - clickhouse
  prometheus:
    networks:
      - clickvisual-net
    image: prom/prometheus:latest
    command:
      - '--web.enable-lifecycle'
      - '--storage.tsdb.retention=6h'
      - '--storage.tsdb.path=/prometheus'
      - '--config.file=/etc/prometheus/prometheus.yaml'
    volumes:
      - ./data/all-in-one/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yaml
      - ./data/all-in-one/prometheus/rules:/etc/prometheus/rules
    expose:
      - 9090
    depends_on:
      - alertmanager
      - prom2click
    links:
      - alertmanager
      - prom2click
    ports:
      - 19004:9090

alertmanager.yaml

global:
route:
  group_by: ['alertname', 'cluster', 'service']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 10m
  receiver: webhook
receivers:
  - name: 'webhook'
    webhook_configs:
      - url: 'http://clickvisual:19001/api/v1/prometheus/alerts'

prometheus.yaml

global:
  evaluation_interval: "15s"
rule_files:
  - /etc/prometheus/rules/*.yaml
# 配置采集目标
scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets:
          # 采集自身
          - prometheus:9090
alerting:
  # 告警配置文件
  alertmanagers:
    # 修改:使用静态绑定
    - static_configs:
        # 修改:targets、指定地址与端口
        - targets: ["alertmanager:9093"]
remote_read:
  - url: "http://prom2click:9201/read"
    read_recent: true
remote_write:
  - url: "http://prom2click:9201/write"
    queue_config:
      capacity: 10000
      max_shards: 1
      max_samples_per_send: 500

我认为是prom和clickvisual之间有问题,但是我修改了好多次依旧不行,其中,clickhouse我用来外的conpose拉起来的集群

不知为何,这里一直显示异常,我该怎么处理?

最后下载源代码发现,默认错误是默认行为,只要配置这里 就会显示OK
image