Ops Platform
Starting from v6.0.0, HAP provides Ops Platform to assist in monitoring system operation status and operation and maintenance management.
Basic requirements
- Deploying servers requires reserving resources of at least 2C4G
- When using built-in components, it is recommended to deploy the Ops Platform on the same host as the HAP service; When using external components, the connection method needs to be passed to the
agent
service - MySQL service address, users need to have the following permissions:
SELECT
permission: allows reading tables and data from the databaseHOW DATABASES
permission: Allow viewing of all databasesPROCESS
permission: allows viewing other users' threads to obtain performance dataREPLICATION CLIENT
permission: Used to access replication status and information
- MongoDB service address, users need to have the following permissions:
root
role permission
- Redis service address, users need to have the permission to
read
Redis data - Kafka service address, users need to have the permission to
read Kafka metadata
- Elasticsearch service address, users need to have
read and write index
permission - Flink service address, allowing access to the internal network environment of the Ops Platform
Pull image (Offline Package)
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-gateway:1.0.0
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-prometheus:1.0.0
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-agent:1.0.0
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-nodeagent:1.0.0
Create ops.yaml
cat > /data/mingdao/script/ops.yaml <<\EOF
version: '3'
services:
gateway:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-gateway:1.0.0
ports:
- "48881:48881"
environment: &common_env
ENV_OPS_TOKEN: "SS9PobGG7SDTpcyfSZ1VVmn3gCmy2P52tYk" # Adjustment required (essential)
ENV_PROMETHEUS_HOST: "hap_1/IP:59100" # Need to adjust the internal IP address of the host computer, with port fixed at 59100
ENV_PROMETHEUS_KAFKA: "kafka_1/agent:9308"
ENV_PROMETHEUS_ELASTICSEARCH: "elasticsearch_1/agent:9114"
ENV_PROMETHEUS_REDIS: "redis_1/agent:9121"
ENV_PROMETHEUS_MONGODB: "mongodb_1/agent:9216"
ENV_PROMETHEUS_MYSQL: "mysql_1/agent:9104"
ENV_MYSQL_HOST: "sc" # If using external components or modifying the default password, please adjust the relevant parameter values
ENV_MYSQL_PORT: "3306"
ENV_MYSQL_USERNAME: "root"
ENV_MYSQL_PASSWORD: "123456"
ENV_MONGODB_URI: "mongodb://sc:27017"
ENV_MONGODB_OPTIONS: ""
ENV_REDIS_HOST: "sc"
ENV_REDIS_PORT: "6379"
ENV_REDIS_PASSWORD: "123456"
ENV_KAFKA_ENDPOINTS: "sc:9092"
ENV_ELASTICSEARCH_ENDPOINTS: "sc:9200"
ENV_ELASTICSEARCH_PASSWORD: "md:ESPassWD1234"
ENV_FLINK_URL: "http://flink:8081" # Please adjust to an internal network accessible address, if Flink Web commenting is not required
prometheus:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-prometheus:1.0.0
environment: *common_env
volumes:
- ./volume/data/:/data/
agent:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-agent:1.0.0
environment: *common_env
volumes:
- /:/host:ro,rslave
networks:
- script_default
nodeagent:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/ops-nodeagent:1.0.0
environment: *common_env
volumes:
- /:/host:ro,rslave
network_mode: host
pid: host
networks:
script_default:
external: true
EOF
Start Service
docker-compose -f /data/mingdao/script/ops.yaml up -d
To stop the service, the following command can be used:
docker-compose -f /data/mingdao/script/ops.yaml down
Accessing the Ops Platform
Login Token as ENV_OPS-TOKEN
in ops.yaml
http://IP:48881