open-falcon graph 部署

2023-12-15 04:18
文章标签 部署 graph open falcon

本文主要是介绍open-falcon graph 部署,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目的

搭建 graph 服务

作用

graph是存储绘图数据的组件
graph组件 接收transfer组件推送上来的监控数据
处理query组件的查询请求、返回绘图数据

依赖

mysql db

编译

版本修改

modules/graph/g/g.go

const (VERSION      = "20200818"
)

编译

# make graph
go build -o bin/graph/falcon-graph ./modules/graph

graph 服务器搭建

创建目录

mkdir /apps/svr/falcon-plus/graph/{bin,config,logs} -p

配置文件
/apps/svr/falcon-plus/graph/config/cfg.json

{"debug": false,"http": {"enabled": true,"listen": "0.0.0.0:6071"},"rpc": {"enabled": true,"listen": "0.0.0.0:6070"},"rrd": {"storage": "/data/graph/6070"},"db": {"dsn": "falcon:falcontest@tcp(ns-yun-020021.133.com:3307)/graph?loc=Local&parseTime=true","maxIdle": 4},"callTimeout": 5000,"migrate": {"enabled": false,"concurrency": 2,"replicas": 500,"cluster": {"graph-00" : "xx.xx.xx.21:6070","graph-01" : "xx.xx.xx.22:6070","graph-02" : "xx.xx.xx.23:6070","graph-03" : "xx.xx.xx.24:6070"}}
}

目录结构说明

# pwd
/apps/svr/falcon-plus/graph
# tree
.
├── bin
│   └── falcon-graph      启动文件
├── config
│   └── cfg.json          配置文件
└── logs

启动测试

# /apps/svr/falcon-plus/graph/bin/falcon-graph  -c /apps/svr/falcon-plus/graph/config/cfg.json
2020/08/18 13:20:10 debug.go:45: [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.- using env:   export GIN_MODE=release- using code:  gin.SetMode(gin.ReleaseMode)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /api/v2/health            --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func1 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /api/v2/version           --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func2 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /api/v2/workdir           --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func3 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /api/v2/config            --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func4 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] POST   /api/v2/config/reload     --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func5 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /api/v2/stats/graph-queue-size --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func6 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /counter/all              --> github.com/open-falcon/falcon-plus/modules/graph/http.configProcRoutes.func1 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /index/updateAll          --> github.com/open-falcon/falcon-plus/modules/graph/http.configIndexRoutes.func1 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] GET    /index/updateAll/concurrent --> github.com/open-falcon/falcon-plus/modules/graph/http.configIndexRoutes.func2 (3 handlers)
2020/08/18 13:20:10 debug.go:45: [GIN-debug] POST   /api/v2/index             --> github.com/open-falcon/falcon-plus/modules/graph/http.configIndexRoutes.func3 (3 handlers)
2020/08/18 13:20:10 cfg.go:90: g.ParseConfig ok, file /apps/svr/falcon-plus/graph/config/cfg.json
2020/08/18 13:20:10 db.go:26: g.InitDB ok
2020/08/18 13:20:10 rrdtool.go:55: rrdtool.Start ok
2020/08/18 13:20:10 main.go:22: 1364 register signal notify
2020/08/18 13:20:10 rpc.go:54: rpc.Start ok, listening on 0.0.0.0:6070
^C2020/08/18 13:20:26 main.go:27: recv interrupt
2020/08/18 13:20:26 main.go:31: graceful shut down
2020/08/18 13:20:26 main.go:36: http stop ok
2020/08/18 13:20:26 rpc.go:86: rpc, recv sigout and exiting...
2020/08/18 13:20:26 main.go:42: rpc stop ok

启动服务配置

/usr/lib/systemd/system/falcon-graph.service

[Unit]
Description=falcon hbs
After=network-online.target
Before=shutdown.target[Service]
Type=simple
User=apps
Group=apps
LimitNOFILE=65535
ExecStart=/apps/svr/falcon-plus/graph/bin/falcon-graph  -c /apps/svr/falcon-plus/graph/config/cfg.json
Restart=always
StandardOutput=journal

启动

[root@ns-yun-020021 config]# systemctl daemon-reload
[root@ns-yun-020021 config]# systemctl start falcon-graph
[root@ns-yun-020021 config]# systemctl status falcon-graph
● falcon-graph.service - falcon hbsLoaded: loaded (/usr/lib/systemd/system/falcon-graph.service; static; vendor preset: disabled)Active: active (running) since Tue 2020-08-18 13:22:17 CST; 2s agoMain PID: 1417 (falcon-graph)Memory: 7.0MCGroup: /system.slice/falcon-graph.service└─1417 /apps/svr/falcon-plus/graph/bin/falcon-graph -c /apps/svr/falcon-plus/graph/config/cfg.json
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 debug.go:45: [GIN-debug] GET    /api/...ers)
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 debug.go:45: [GIN-debug] GET    /coun...ers)
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 debug.go:45: [GIN-debug] GET    /inde...ers)
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 debug.go:45: [GIN-debug] GET    /inde...ers)
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 debug.go:45: [GIN-debug] POST   /api/...ers)
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 cfg.go:90: g.ParseConfig ok, file /ap...json
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 db.go:26: g.InitDB ok
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 rrdtool.go:55: rrdtool.Start ok
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 main.go:22: 1417 register signal notify
Aug 18 13:22:17 ns-yun-020021.133.com falcon-graph[1417]: 2020/08/18 13:22:17 rpc.go:54: rpc.Start ok, listening on...6070
Hint: Some lines were ellipsized, use -l to show in full.

这篇关于open-falcon graph 部署的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/495085

相关文章

Nginx分布式部署流程分析

《Nginx分布式部署流程分析》文章介绍Nginx在分布式部署中的反向代理和负载均衡作用,用于分发请求、减轻服务器压力及解决session共享问题,涵盖配置方法、策略及Java项目应用,并提及分布式事... 目录分布式部署NginxJava中的代理代理分为正向代理和反向代理正向代理反向代理Nginx应用场景

linux部署NFS和autofs自动挂载实现过程

《linux部署NFS和autofs自动挂载实现过程》文章介绍了NFS(网络文件系统)和Autofs的原理与配置,NFS通过RPC实现跨系统文件共享,需配置/etc/exports和nfs.conf,... 目录(一)NFS1. 什么是NFS2.NFS守护进程3.RPC服务4. 原理5. 部署5.1安装NF

通过Docker容器部署Python环境的全流程

《通过Docker容器部署Python环境的全流程》在现代化开发流程中,Docker因其轻量化、环境隔离和跨平台一致性的特性,已成为部署Python应用的标准工具,本文将详细演示如何通过Docker容... 目录引言一、docker与python的协同优势二、核心步骤详解三、进阶配置技巧四、生产环境最佳实践

Nginx部署HTTP/3的实现步骤

《Nginx部署HTTP/3的实现步骤》本文介绍了在Nginx中部署HTTP/3的详细步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学... 目录前提条件第一步:安装必要的依赖库第二步:获取并构建 BoringSSL第三步:获取 Nginx

redis-sentinel基础概念及部署流程

《redis-sentinel基础概念及部署流程》RedisSentinel是Redis的高可用解决方案,通过监控主从节点、自动故障转移、通知机制及配置提供,实现集群故障恢复与服务持续可用,核心组件包... 目录一. 引言二. 核心功能三. 核心组件四. 故障转移流程五. 服务部署六. sentinel部署

Linux部署中的文件大小写问题的解决方案

《Linux部署中的文件大小写问题的解决方案》在本地开发环境(Windows/macOS)一切正常,但部署到Linux服务器后出现模块加载错误,核心原因是Linux文件系统严格区分大小写,所以本文给大... 目录问题背景解决方案配置要求问题背景在本地开发环境(Windows/MACOS)一切正常,但部署到

使用IDEA部署Docker应用指南分享

《使用IDEA部署Docker应用指南分享》本文介绍了使用IDEA部署Docker应用的四步流程:创建Dockerfile、配置IDEADocker连接、设置运行调试环境、构建运行镜像,并强调需准备本... 目录一、创建 dockerfile 配置文件二、配置 IDEA 的 Docker 连接三、配置 Do

MySQL 主从复制部署及验证(示例详解)

《MySQL主从复制部署及验证(示例详解)》本文介绍MySQL主从复制部署步骤及学校管理数据库创建脚本,包含表结构设计、示例数据插入和查询语句,用于验证主从同步功能,感兴趣的朋友一起看看吧... 目录mysql 主从复制部署指南部署步骤1.环境准备2. 主服务器配置3. 创建复制用户4. 获取主服务器状态5

golang程序打包成脚本部署到Linux系统方式

《golang程序打包成脚本部署到Linux系统方式》Golang程序通过本地编译(设置GOOS为linux生成无后缀二进制文件),上传至Linux服务器后赋权执行,使用nohup命令实现后台运行,完... 目录本地编译golang程序上传Golang二进制文件到linux服务器总结本地编译Golang程序

如何在Ubuntu 24.04上部署Zabbix 7.0对服务器进行监控

《如何在Ubuntu24.04上部署Zabbix7.0对服务器进行监控》在Ubuntu24.04上部署Zabbix7.0监控阿里云ECS服务器,需配置MariaDB数据库、开放10050/1005... 目录软硬件信息部署步骤步骤 1:安装并配置mariadb步骤 2:安装Zabbix 7.0 Server