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

相关文章

Web技术与Nginx网站环境部署教程

《Web技术与Nginx网站环境部署教程》:本文主要介绍Web技术与Nginx网站环境部署教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Web基础1.域名系统DNS2.Hosts文件3.DNS4.域名注册二.网页与html1.网页概述2.HTML概述3.

Nginx使用Keepalived部署web集群(高可用高性能负载均衡)实战案例

《Nginx使用Keepalived部署web集群(高可用高性能负载均衡)实战案例》本文介绍Nginx+Keepalived实现Web集群高可用负载均衡的部署与测试,涵盖架构设计、环境配置、健康检查、... 目录前言一、架构设计二、环境准备三、案例部署配置 前端 Keepalived配置 前端 Nginx

ubuntu如何部署Dify以及安装Docker? Dify安装部署指南

《ubuntu如何部署Dify以及安装Docker?Dify安装部署指南》Dify是一个开源的大模型应用开发平台,允许用户快速构建和部署基于大语言模型的应用,ubuntu如何部署Dify呢?详细请... Dify是个不错的开源LLM应用开发平台,提供从 Agent 构建到 AI workflow 编排、RA

ubuntu16.04如何部署dify? 在Linux上安装部署Dify的技巧

《ubuntu16.04如何部署dify?在Linux上安装部署Dify的技巧》随着云计算和容器技术的快速发展,Docker已经成为现代软件开发和部署的重要工具之一,Dify作为一款优秀的云原生应用... Dify 是一个基于 docker 的工作流管理工具,旨在简化机器学习和数据科学领域的多步骤工作流。它

Nginx部署React项目时重定向循环问题的解决方案

《Nginx部署React项目时重定向循环问题的解决方案》Nginx在处理React项目请求时出现重定向循环,通常是由于`try_files`配置错误或`root`路径配置不当导致的,本文给大家详细介... 目录问题原因1. try_files 配置错误2. root 路径错误解决方法1. 检查 try_f

Python 中的 with open文件操作的最佳实践

《Python中的withopen文件操作的最佳实践》在Python中,withopen()提供了一个简洁而安全的方式来处理文件操作,它不仅能确保文件在操作完成后自动关闭,还能处理文件操作中的异... 目录什么是 with open()?为什么使用 with open()?使用 with open() 进行

Spring Boot项目部署命令java -jar的各种参数及作用详解

《SpringBoot项目部署命令java-jar的各种参数及作用详解》:本文主要介绍SpringBoot项目部署命令java-jar的各种参数及作用的相关资料,包括设置内存大小、垃圾回收... 目录前言一、基础命令结构二、常见的 Java 命令参数1. 设置内存大小2. 配置垃圾回收器3. 配置线程栈大小

tomcat多实例部署的项目实践

《tomcat多实例部署的项目实践》Tomcat多实例是指在一台设备上运行多个Tomcat服务,这些Tomcat相互独立,本文主要介绍了tomcat多实例部署的项目实践,具有一定的参考价值,感兴趣的可... 目录1.创建项目目录,测试文China编程件2js.创建实例的安装目录3.准备实例的配置文件4.编辑实例的

SpringBoot配置Ollama实现本地部署DeepSeek

《SpringBoot配置Ollama实现本地部署DeepSeek》本文主要介绍了在本地环境中使用Ollama配置DeepSeek模型,并在IntelliJIDEA中创建一个Sprin... 目录前言详细步骤一、本地配置DeepSeek二、SpringBoot项目调用本地DeepSeek前言随着人工智能技

通过Docker Compose部署MySQL的详细教程

《通过DockerCompose部署MySQL的详细教程》DockerCompose作为Docker官方的容器编排工具,为MySQL数据库部署带来了显著优势,下面小编就来为大家详细介绍一... 目录一、docker Compose 部署 mysql 的优势二、环境准备与基础配置2.1 项目目录结构2.2 基