惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
小众软件
小众软件
博客园_首页
博客园 - 聂微东
V
V2EX
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
SegmentFault 最新的问题
J
Java Code Geeks
Last Week in AI
Last Week in AI
The Cloudflare Blog
月光博客
月光博客
雷峰网
雷峰网
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
博客园 - Franky
腾讯CDC
Jina AI
Jina AI
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
量子位
爱范儿
爱范儿
美团技术团队
T
Tailwind CSS Blog
博客园 - 【当耐特】
D
Docker
IT之家
IT之家
V
Visual Studio Blog
P
Proofpoint News Feed
L
LangChain Blog
Engineering at Meta
Engineering at Meta
C
Check Point Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
Recorded Future
Recorded Future

Xinwei Xiong (cubxxw) - AI, Open Source & Nomad Blog

2026 June Thought Notes: The Pushing-Away Comes Be… | cubxxw Dissecting open-lovable: An App Generator That Tam… | cubxxw Ignite and Settle (Part 3): Anxious Attachment — W… | cubxxw Ignite and Settle (Part 2): Avoidant Attachment — … | cubxxw Ignite and Settle (Part 1): The Quality and Time o… | cubxxw The Super-Individual Stack: AI-Native Product Dire… | cubxxw Building a Production-Grade AI Agent System from S… | cubxxw Seen Clearly, Loved Deeply: Five Lenses on Love, a… | cubxxw Context Is Not Prompt: Why Context Engineering Is Becoming AI's New Foundation The Agent Engineering Map: Where Does That 98.4% o… | cubxxw April 2026 Thought Notes Agent Identity: From Locke to OpenClaw Maintaining Self-Worth in the Age of AI March 2026 Thought Notes Lhasa: Slow and Heavy Wandering & Growing: 2025-2026 Annual Review AI and Self-Identity: Who Am I in the AI Age February 2026 Thought Notes January 2026 Thought Notes December 2025 Thought Notes Japan Travel Notes — Learning to Be with Time Through Wood, Fire, and Gaps 2025 November Thought Notes October 2025 Thought Notes September 2025 Thought Notes 2025 August Thought Notes 2025 July Thought Notes 2025 June Thought Notes Metacognitive Transformation Review 2025 May Thought Notes 2025 April Thought Notes AI Recommendation Systems: How They Work NotebookLM: Google's AI Research Tool TDD for AI: Test-Driven Development Guide MarkItDown: Convert Documents to Markdown LangGraph: Stateful AI Agent Workflows LangChain: Open Source LLM Framework LLM/AI API Gateway Market Analysis & Startup Stack Recommendations Independent Developer in the AI Era: Open Source Deep Dive GPT Researcher: Open Source Deep Dive Jina AI: Multimodal Search & Embeddings 2025 March Thought Notes 2024 Annual Review Travel Footprints About Me Kubernetes Resources and Learning Path Summary LangChain: Building LLM Applications Large Language Models: How LLMs Work Open Source Resume Builders & Career Tips Troubleshooting Guide for OpenIM Navigating the Open Source Landscape Sora Ease Guide: Mastering Sora AI for Developers In 2023, I Was Wandering at the Edge of the World Exploring Sora Technology for Enthusiasts and Developers Combining GitHub and Google Workspace for Effective Project Management Brain-Friendly English Learning Strategies Flow State: Deep Focus and Happiness Guide GTD and the Quadrant Method Practice Go Directives & Automation Tools Deep Dive Concurrent Type Checking and Cross-Platform Development in Go Vector Database Learning OpenIM: Version Control & Testing Workflow Emerging Challenges and Trends in 2024 2023 Annual Summary Reflections and Aspirations GitOps & Kubernetes Deployment Strategies Hugo Advanced Tutorial Kubernetes for Kustomize Learning OpenIM Use Harbor Build Enterprise Mirror Repositories Learn About Automated Testing Deep Dive into Kubernetes CNI, CRI, CSI Components Kubernetes Control Plane - Detailed Analysis of Kubelet Kubernetes Control Plane - Scheduler In-depth understanding of the components of Kubernetes Kube apisserver Deep Dive Into the Components of Kubernetes Etcd Kubernetes Port Config via Config Files OpenIM clustering design Kubernetes deploy concludes Open Source Business: From Community to Revenue The Art of Asking Questions in Open Source Communities Open Source Contribution Guidelines Cross Platform Compilation Github Actions Advanced Techniques Openim Devops Design GoReleaser: Automate your software releases Openim Multi Process Management About My Blog About My Hugo teaching Openkf Multi Architecture Image Prow Ecological Learning Openim Remote Work Culture Advanced Githook Design Openim Offline Deployment Design Read Openim Project Sealos Openim Source Code Project Management From Theory to Practice Stage Growth of Open Source Use Auto Gpt Use Go Tools Dlv Participating in This Project Kubernetes an Article to Get Started Quickly Start Here | cubxxw 分类 · CATEGORIES
Deployment and Design of Management Backend and Monitoring
Xinwei Xiong · 2023-11-15 · via Xinwei Xiong (cubxxw) - AI, Open Source & Nomad Blog

[Xinwei Xiong Me] · November 15, 2023

7 min · 1366 words · EN |

OpenIM offers various flexible deployment options to suit different environments and requirements. Here is a simplified and optimized description of these deployment options:

  1. Source Code Deployment:
    • Regular Source Code Deployment: Deployment using the nohup method. This is a basic deployment method suitable for development and testing environments. For details, refer to the Regular Source Code Deployment Guide .
    • Production-Level Deployment: Deployment using the system method, more suitable for production environments. This method provides higher stability and reliability. For details, refer to the Production-Level Deployment Guide .
  2. Cluster Deployment:
    • Kubernetes Deployment: Provides two deployment methods, including deployment through Helm and sealos. This is suitable for environments that require high availability and scalability. Specific methods can be found in the Kubernetes Deployment Guide .
  3. Docker Deployment:
    • Regular Docker Deployment: Suitable for quick deployments and small projects. For detailed information, refer to the Docker Deployment Guide .
    • Docker Compose Deployment: Provides more convenient service management and configuration, suitable for complex multi-container applications.

Next, we will introduce the specific steps, monitoring, and management backend configuration for each of these deployment methods, as well as usage tips to help you choose the most suitable deployment option according to your needs.

Source Code & Docker

Deployment

OpenIM deploys openim-server and openim-chat from source code, while other components are deployed via Docker.

For Docker deployment, you can deploy all components with a single command using the openimsdk/openim-docker repository. The deployment configuration can be found in the environment.sh document, which provides information on how to learn and familiarize yourself with various environment variables.

For Prometheus, it is not enabled by default. To enable it, set the environment variable before executing make init:

export PROMETHEUS_ENABLE=true   # Default is false

Then, execute:

make init
docker compose up -d

Configuration

To configure Prometheus data sources in Grafana, follow these steps:

  1. Log in to Grafana: First, open your web browser and access the Grafana URL. If you haven’t changed the port, the address is typically http://localhost:3000 .

  2. Log in with default credentials: Grafana’s default username and password are both admin. You will be prompted to change the password on your first login.

  3. Access Data Sources Settings:

    • In the left menu of Grafana, look for and click the “gear” icon representing “Configuration.”
    • In the configuration menu, select “Data Sources.”
  4. Add a New Data Source:

    • On the Data Sources page, click the “Add data source” button.
    • In the list, find and select “Prometheus.”

    image-20231114175117374

    Click Add New connection to add more data sources, such as Loki (responsible for log storage and query processing).

  5. Configure the Prometheus Data Source:

    • On the configuration page, fill in the details of the Prometheus server. This typically includes the URL of the Prometheus service (e.g., if Prometheus is running on the same machine as OpenIM, the URL might be http://172.28.0.1:19090, with the address matching the DOCKER_BRIDGE_GATEWAY variable address). OpenIM and the components are linked via a gateway. The default port used by OpenIM is 19090.
    • Adjust other settings as needed, such as authentication and TLS settings.

    image-20231114180351923

  6. Save and Test:

    • After completing the configuration, click the “Save & Test” button to ensure that Grafana can successfully connect to Prometheus.

Importing Dashboards in Grafana

Importing Grafana Dashboards is a straightforward process and is applicable to OpenIM Server application services and Node Exporter. Here are detailed steps and necessary considerations:

Key Metrics Overview and Deployment Steps

To monitor OpenIM in Grafana, you need to focus on three categories of key metrics, each with its specific deployment and configuration steps:

  1. OpenIM Metrics (prometheus-dashboard.yaml):
    • Configuration File Path: Located at config/prometheus-dashboard.yaml.
    • Enabling Monitoring: Set the environment variable export PROMETHEUS_ENABLE=true to enable Prometheus monitoring.
    • More Information: Refer to the OpenIM Configuration Guide .
  2. Node Exporter:
  3. Middleware Metrics: Each middleware requires specific steps and configurations to enable monitoring. Here is a list of common middleware and links to their respective setup guides:

Importing Steps:

  1. Access the Dashboard Import Interface:

    • Click the + icon on the left menu or in the top right corner of Grafana, then select “Create.”
    • Choose “Import” to access the dashboard import interface.
  2. Perform Dashboard Import:

    • Upload via File: Directly upload your YAML file.
    • Paste Content: Open the YAML file, copy its content, and paste it into the import interface.
    • Import via Grafana.com Dashboard: Visit Grafana Dashboards , search for the desired dashboard, and import it using its ID.
  3. Configure the Dashboard:

    • Select the appropriate data source, such as the previously configured Prometheus.
    • Adjust other settings, such as the dashboard name or folder.
  4. Save and View the Dashboard:

    • After configuring, click “Import” to complete the process.
    • Immediately view the new dashboard after successful import.

Graph Examples:

image-20231114194451673

Monitoring Running in Docker Guide

Introduction

This guide provides the steps to run OpenIM using Docker. OpenIM is an open-source instant messaging solution that can be quickly deployed using Docker. For more information, please refer to the OpenIM Docker GitHub .

Prerequisites

  • Ensure that Docker and Docker Compose are installed.
  • Basic understanding of Docker and containerization technology.

Step 1: Clone the Repository

First, clone the OpenIM Docker repository:

git clone https://github.com/openimsdk/openim-docker.git

Navigate to the repository directory and check the README file for more information and configuration options.

Step 2: Start Docker Compose

In the repository directory, run the following command to start the service:

This will download the required Docker images and start the OpenIM service.

Step 3: Use the OpenIM Web Interface

  • Open a browser in private mode and access OpenIM Web .
  • Register two users and try adding friends.
  • Test sending messages and pictures.

Running Effect

image-20231115100811208

Step 4: Access the Admin Panel

  • Access the OpenIM Admin Panel .
  • Log in using the default username and password (admin1:admin1).

Running Effect Image:

image-20231115101039837

Step 5: Access the Monitoring Interface

Next Steps

  • Configure and manage the services following the steps provided in the OpenIM source code.
  • Refer to the README file for advanced configuration and management.

Troubleshooting

  • If you encounter any issues, please check the documentation on OpenIM Docker GitHub or search for related issues in the Issues section.
  • If the problem persists, you can create an issue on the openim-docker repository or the openim-server repository.

Kubernetes

Refer to openimsdk/helm-charts .

When deploying and monitoring OpenIM in a Kubernetes environment, you will focus on three main metrics: middleware, custom OpenIM metrics, and Node Exporter. Here are detailed steps and guidelines:

Middleware Monitoring

Middleware monitoring is crucial to ensure the overall system’s stability. Typically, this includes monitoring the following components:

  • MySQL: Monitor database performance, query latency, and more.
  • Redis: Track operation latency, memory usage, and more.
  • MongoDB: Observe database operations, resource usage, and more.
  • Kafka: Monitor message throughput, latency, and more.
  • Zookeeper: Keep an eye on cluster status, performance metrics, and more.

For Kubernetes environments, you can use the corresponding Prometheus Exporters to collect monitoring data for these middleware components.

Custom OpenIM Metrics

Custom OpenIM metrics provide essential information about the OpenIM application itself, such as user activity, message traffic, system performance, and more. To monitor these metrics in Kubernetes:

  • Ensure OpenIM application configurations expose Prometheus metrics.
  • When deploying using Helm charts (refer to OpenIM Helm Charts ), pay attention to configuring relevant monitoring settings.

Node Exporter

Node Exporter is used to collect hardware and operating system-level metrics for Kubernetes nodes, such as CPU, memory, disk usage, and more. To integrate Node Exporter in Kubernetes:

  • Deploy Node Exporter using the appropriate Helm chart. You can find information and guides on Prometheus Community .
  • Ensure Node Exporter’s data is collected by Prometheus instances within your cluster.