aops-ceres插件生态:支持gala-gopher与fluentd的配置指南

aops-ceres插件生态:支持gala-gopher与fluentd的配置指南

【免费下载链接】aops-ceresAn agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on.项目地址: https://gitcode.com/openeuler/aops-ceres

前往项目官网免费下载:https://ar.openeuler.org/ar/

aops-ceres是openEuler生态中的轻量级客户端代理工具,专注于插件生命周期管理,支持gala-gopher性能指标采集、fluentd日志收集等核心插件的一键部署与配置。本文将详细介绍如何快速上手aops-ceres插件生态,帮助新手用户轻松完成监控工具的部署与管理。

📋 插件生态概览

aops-ceres通过统一的插件管理接口,简化了各类监控工具的部署复杂度。目前核心支持两类插件:

  • gala-gopher:系统性能指标采集工具,通过探针机制收集CPU、内存、磁盘等关键指标
  • fluentd:开源日志收集引擎,支持多源日志聚合与转发

插件管理核心实现位于ceres/manages/plugin_manage.py,通过Plugin基类封装了服务启停、状态查询等通用能力,并为gala-gopher实现了专用的GalaGopher子类。

🔧 环境准备

1. 安装aops-ceres

git clone https://gitcode.com/openeuler/aops-ceres cd aops-ceres python3 setup.py install

2. 配置文件位置

核心配置文件路径:

  • 主配置:conf/ceres.conf
  • 插件默认配置:ceres/conf/default_config.py

🚀 gala-gopher配置指南

安装与启停

gala-gopher作为默认支持的性能采集插件,可通过以下命令管理:

# 启动服务 ceres plugin --start gala-gopher # 停止服务 ceres plugin --stop gala-gopher # 查看状态 ceres plugin --status gala-gopher

采集项配置

gala-gopher的探针配置文件位于/opt/gala-gopher/gala-gopher.conf(定义于ceres/conf/default_config.py)。通过aops-ceres可动态调整采集项状态:

# 示例:启用disk和network探针 from ceres.manages.plugin_manage import GalaGopher gopher = GalaGopher() gopher.change_items_status({"disk": "on", "network": "on"})

查看采集状态

# 获取当前所有探针状态 status = GalaGopher.get_collect_status() print(status) # 输出示例: # [{'probe_name': 'disk', 'probe_status': 'on', 'support_auto': True}, ...]

🔍 fluentd配置说明

虽然当前代码中fluentd的配置细节尚未完全实现,但aops-ceres已预留插件接口。根据ceres/conf/constant.py定义,未来将通过类似方式支持:

# 插件元数据定义示例(计划中) PLUGIN_INFO = { "fluentd": { "rpm_name": "fluentd", "service_name": "fluentd", "config_path": "/etc/fluentd/fluentd.conf" } }

📊 插件管理工作流

aops-ceres采用标准化的插件管理流程,确保各类工具的一致性操作:

图:aops-ceres插件命令下发流程示意图,展示了配置用户与异常检测服务如何通过Agent进行插件管理

核心工作流包括:

  1. 插件状态查询(get_plugin_status
  2. 服务启停控制(start_service/stop_service
  3. 配置参数修改(change_items_status
  4. 运行状态监控(get_pid

❓ 常见问题

Q: 如何确认插件是否已安装?

A: 通过Plugin.get_installed_plugin()方法获取已安装插件列表,实现位于ceres/manages/plugin_manage.py

Q: 配置修改后需要重启服务吗?

A: gala-gopher探针配置修改后会自动生效,无需重启;服务配置变更需执行ceres plugin --restart [plugin-name]

📚 扩展阅读

  • 官方文档:doc/agent设计文档.md
  • 接口定义:doc/aops-ceres接口文档.yaml
  • 测试用例:ceres/tests/manages/test_plugin_manage.py

【免费下载链接】aops-ceresAn agent which needs to be adopted in client, it managers some plugins, such as gala-gopher(kpi collection), fluentd(log collection) and so on.项目地址: https://gitcode.com/openeuler/aops-ceres

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考