open-falcon-agent部署
目前监控同时使用了阿里云云监控(基础监控)、prometheus(应用监控),监控系统比较混乱,接入方式以及查询入口、报警配置及报警方式不统一,所以使用open-falcon来做统一。
使用open-falcon对比prometheus主要是考虑一下几个方面:
- open-falcon相较prometheus方式有更好的性能。
- open-falcon各个组件基本都是实现很好的横向扩展。
- open-falcon对比prometheus可以通过hostgroup和template更好的管理应用、host、报警规则的关系。
- open-falcon接口完善,可以更高效率的配置报警信息。
兼容历史数据问题
业务暴露业务指标通过promehtues进行采集,迁移到open-falcon时也需要做对应的兼容,通过falcon-agent的plugin功能对服务暴露的prometheus指标进行解析push到本地agent。
agent部署规范
open-falcon agent使用ansible进行标准话推送:
推送方式:
# 1. 更新hosts文件, 更新需要推送的IP信息
# 2. ansible 批量推送
ansible-playbook -i hosts -e host=all install_openfalcon_agent.yaml -f 30
ansible任务如下:
- name: "install the git"yum:name: git- name: "init the dir"file:path: "/opt/servers/.openfalcon_agent"recurse: yesstate: directory- name: "push openfalcon_agent file"copy:src: "{{ item.src }}"dest: "{{ item.dest }}"mode: 0755owner: rootgroup: rootwith_items:- { src: "files/openfalcon_agent.tar.gz", dest: "/opt/servers/.openfalcon_agent/openfalcon_agent.tar.gz" }- name: "unarchive file "unarchive:src: /opt/servers/.openfalcon_agent/openfalcon_agent.tar.gzdest: /opt/servers/.openfalcon_agent/remote_src: yes- name: "push the openfalcon_agent configuration!"template:src: "{{ item.src }}"dest: "{{ item.dest }}"mode: 0755owner: rootgroup: rootwith_items:- { src: "templates/cfg.json.j2", dest: "/opt/servers/.openfalcon_agent/agent/config/cfg.json" }- name: "start openfalcon_agent"shell: "cd /opt/servers/.openfalcon_agent/ && chmod 755 ./open-falcon && nohup ./open-falcon restart agent &"become_user: root- name: "plugin update"shell: "curl -X GET http://127.0.0.1:1988/plugin/update"
plugin插件使用方式
在git仓库中创建public类型的项目,线上生产环境使用的git地址为:https://code.soulapp-inc.cn/falcon/falcon-plugin
在agent的配置文件中修改plugin相关的配置。
"plugin": {"enabled": true,"dir": "./plugin","git": "https://code.soulapp-inc.cn/falcon/falcon-plugin.git","logs": "./logs"},
配置完成后确保节点下发最新的配置后,在hostgroup中对host主机和plugin进行绑定,
注意事项
- open-falcon-agent在启动后不会去主动拉取plugin相关的代码信息, 需要手动触发,这里我使用在ansilbe中配置服务启动后进行相关接口的调用来触发代码拉取,需要注意git仓库的压力问题。
- 推送open-falcon-agent时注意不要有plugin目录,会导致clone代码异常。
- plugin相关的脚本执行后后输出信息,会有日志的报错信息。这个不影响使用,非必需。
- portal上配置完成之后并不会立马生效,有个同步的过程,最终是agent通过调用hbs的接口获取的,需要一两分钟。上例我们绑定了sys/ntp,这实际是个目录,这个目录下的所有插件都会被执行,那什么样的文件会被看做插件呢?文件名是数字下划线打头的,这个数字代表的是step,即多长时间跑一次,单位是秒,比如60_a.py,就是在通过命名告诉agent,这个插件每60秒跑一次。sys/ntp目录下的子目录、其他命名方式的文件都会被忽略。
参考文档:
Prometheus-exporter-collector: https://github.com/n9e/prometheus-exporter-collector
plugin机制:https://book.open-falcon.org/zh_0_2/philosophy/plugin.html
open-falcon-agent接口:https://github.com/open-falcon/falcon-plus/blob/master/modules/agent/http/
open-falcon-agent部署相关推荐
- Cloud Control 13c 13.3安装(二) agent 部署
agent 部署监控主机状态 环境准备 agent目标主机: 建立oracle用户,并配置sudo 权限: hosts 文件添加Cloud Control 主机ip和主机名称解析: [root@pro ...
- Flume NG之Agent部署和sink配置HDFS且吐槽CSDN博客及客服态度
实在是想对csdn博客吐槽,一天到晚要么发布不了,发布成功的居然还时不时看不到文章内容(空白的),有时还打不开博客,问客服就说换浏览器.我真想和csdn客服说,你妹的,你知不知道我是码农啊,初步的问题 ...
- Zabbix之agent部署监控Linux与Windows
Zabbix之agent部署监控Linux与Windows 文章目录 一.agent简介 二.监控服务配置流程与步骤 1. 监控配置流程 2. 监控配置步骤 三.部署agent监控Linux主机 1. ...
- skywalking agent部署
文章目录 一 说明 二 探针配置 方式1 修改catalina.sh(以tomcat为例) 方式2 启动命令中添加参数javaagent.Dskwalking.agent.service_name 三 ...
- 初尝Mcafee之通过Mcafee Agent部署VirusScan【05】
利用ePO通过客户端上已经安装的Agent来安装VirusScan的步骤: 一.部署之前验证: 二.使用ePO签入最新版的Mcafee VirusScan; 三.创建部署任务来部署Mcafee Vir ...
- ITIM WinLocal Agent部署自动化脚本
VBS脚本,其中的证书和注册表文件需要的人可以向我邮件.MSN获取.本版本适用除Vista和Win7以外的Windows版本 'Set the variables needed Set WshShel ...
- 关于ODI agent的配置部署
分类: Linux 最近,做了几个ODI项目的部署,发现ODI agent所在的位置对整个E-LT工作的影响还是比较大的,根据Oracle的官方说法,agent一般需要部署在目标端的数据库服务器上,或 ...
- 开源运维监控open-falcon的快速部署
在目前流行的三大开源运维监控工具Zabbix.Nagios.Open-Falcon当中,Open-Falcon属于后起之秀,由小米团队提供,可以从运营级别(基本配置即可),以及应用级别(二次开发,通过 ...
- 开源运维监控工具open falcon
小米发布的运维监控工具:open falcon 项目地址:http://open-falcon.org/ Introduction 监控系统是整个运维环节,乃至整个产品生命周期中最重要的一环,事前及时 ...
最新文章
- 面试问了这两个问题,很多人的回答都自相矛盾
- 提升大学社团管理工具--轻雀协作
- Android Scroll分析
- 复用 TensorFlow 模型
- 一文看尽目标检测:从 YOLO v1 到 v3 的进化之路
- python将csv一行保存一个txt_Python读写文件(csv、txt、excel)
- Java 重定向 无法写入_java IO 文件读入,写入,重定向
- bitcount方法详解_Java Long类的bitCount()方法和示例
- android mux协议,GSM 07.10 MUX 协议驱动解析
- 蛋制品加工行业调研报告 - 市场现状分析与发展前景预测(2021-2027年)
- Hessian学习(springboot环境)
- main.cpp first defined here 解决
- 软件测试——测试用例的编写
- linux抓肉鸡入侵详细教程,Linux XOR.DDoS入侵排查步骤 | 聂扬帆博客
- Go程序设计语言1.1 hello,world
- 喜提JDK的BUG一枚!多线程的情况下请谨慎使用这个类的stream遍历。
- python 按比例缩小图片
- 国内外RTI产品调查情况(转)
- 次数分布和平均数、变异数间断性变数资料的整理
- 诺基亚安卓手机无法清理后台任务
热门文章
- 热烈庆祝龙智高级咨询顾问叶燕秀获得“Atlassian认证专家”称号
- Office 办公软件 word Excel PPT(2)
- Win11开机启动项怎么调整,Win11开机启动项怎么设置
- 计算机已从异常关机中恢复,(BCCode7a蓝屏问题,急!)今天电脑开机放着,人离开了,回来后提示windows从异常关机中恢复...
- MessageSolution 邮件归档系统EEA 信息泄露(CNVD-2021-10543)
- 计算机测色配色应用,实用技术∣如何有效利用电脑测色配色
- Android 字体库详解
- 知名歌手育有私生子,非婚生子女权益如何保护?
- 解决Call to undefined function
- java 16进制工具