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

相关文章

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 基

CentOS 7部署主域名服务器 DNS的方法

《CentOS7部署主域名服务器DNS的方法》文章详细介绍了在CentOS7上部署主域名服务器DNS的步骤,包括安装BIND服务、配置DNS服务、添加域名区域、创建区域文件、配置反向解析、检查配置... 目录1. 安装 BIND 服务和工具2.  配置 BIND 服务3 . 添加你的域名区域配置4.创建区域

OpenManus本地部署实战亲测有效完全免费(最新推荐)

《OpenManus本地部署实战亲测有效完全免费(最新推荐)》文章介绍了如何在本地部署OpenManus大语言模型,包括环境搭建、LLM编程接口配置和测试步骤,本文给大家讲解的非常详细,感兴趣的朋友一... 目录1.概况2.环境搭建2.1安装miniconda或者anaconda2.2 LLM编程接口配置2

大数据spark3.5安装部署之local模式详解

《大数据spark3.5安装部署之local模式详解》本文介绍了如何在本地模式下安装和配置Spark,并展示了如何使用SparkShell进行基本的数据处理操作,同时,还介绍了如何通过Spark-su... 目录下载上传解压配置jdk解压配置环境变量启动查看交互操作命令行提交应用spark,一个数据处理框架

如何使用Docker部署FTP和Nginx并通过HTTP访问FTP里的文件

《如何使用Docker部署FTP和Nginx并通过HTTP访问FTP里的文件》本文介绍了如何使用Docker部署FTP服务器和Nginx,并通过HTTP访问FTP中的文件,通过将FTP数据目录挂载到N... 目录docker部署FTP和Nginx并通过HTTP访问FTP里的文件1. 部署 FTP 服务器 (

C#集成DeepSeek模型实现AI私有化的流程步骤(本地部署与API调用教程)

《C#集成DeepSeek模型实现AI私有化的流程步骤(本地部署与API调用教程)》本文主要介绍了C#集成DeepSeek模型实现AI私有化的方法,包括搭建基础环境,如安装Ollama和下载DeepS... 目录前言搭建基础环境1、安装 Ollama2、下载 DeepSeek R1 模型客户端 ChatBo

Ubuntu 22.04 服务器安装部署(nginx+postgresql)

《Ubuntu22.04服务器安装部署(nginx+postgresql)》Ubuntu22.04LTS是迄今为止最好的Ubuntu版本之一,很多linux的应用服务器都是选择的这个版本... 目录是什么让 Ubuntu 22.04 LTS 变得安全?更新了安全包linux 内核改进一、部署环境二、安装系统

JAVA集成本地部署的DeepSeek的图文教程

《JAVA集成本地部署的DeepSeek的图文教程》本文主要介绍了JAVA集成本地部署的DeepSeek的图文教程,包含配置环境变量及下载DeepSeek-R1模型并启动,具有一定的参考价值,感兴趣的... 目录一、下载部署DeepSeek1.下载ollama2.下载DeepSeek-R1模型并启动 二、J