滴滴(夜莺)Nightingale监控部署

        Nightingale是一套衍生自Open-Falcon的互联网监控解决方案,融入了滴滴的最佳实践,由于改动太大,优化太多,产品上已经无法与Open-Falcon平滑兼容,故而单开一个项目。

       本文主要讲述滴滴Nightingale通过源码编译安装,喜欢的小伙伴可以访问https://n9e.didiyun.com/docs/了解更多关于Nightingale的介绍。

1.关闭防火墙

[root@localhost ~]#systemctl stop firewalld
[root@localhost ~]#systemctl disable firewalld
[root@localhost ~]#systemctl status firewalld

2.安装golang   //已安装可忽略,自行对应配置

[root@localhost ~]#wget https://studygolang.com/dl/golang/go1.12.7.linux-amd64.tar.gz 
[root@localhost ~]#tar -zxvf go1.12.7.linux-amd64.tar.gz -C /usr/local/
[root@localhost ~]#vim /etc/profile   //为GO设置全局环境变量,在最后添加一行
export PATH=$PATH:/usr/local/go/bin
[root@localhost ~]#source /etc/profile
[root@localhost ~]#go version

  3.安装mysql //已安装可忽略,自行对应配置

[root@localhost ~]#yum install mariadb mariadb-server -y
[root@localhost ~]#systemctl start mariadb.service    	//启动mysql
[root@localhost ~]#systemctl enable mariadb.service   	//添加开机自启动
[root@localhost ~]#systemctl status mariadb.service		//查看mysql状态
[root@localhost ~]#mysqladmin -uroot -p password 123456 //设置mysql密码为123456

4.安装redis //已安装可忽略,自行对应配置

[root@localhost ~]#yum install -y redis
[root@localhost ~]#systemctl enable redis				//添加开机自启动
[root@localhost ~]#systemctl start redis				//启动redis
[root@localhost ~]#systemctl status redis				//查看redis状态

5.安装nginx  //已安装可忽略,自行对应配置

[root@localhost ~]#yum install nginx -y 
[root@localhost ~]#systemctl enable nginx				//添加开机自启动
[root@localhost ~]#systemctl start nginx				//启动nginx
[root@localhost ~]#systemctl status nginx				//查看nginx状态

6.安装Nightingale

[root@localhost ~]#yum install git -y        //安装git命令,已经安装可忽略
[root@localhost ~]#cd /home/
[root@localhost home]##git clone https://github.com/didi/nightingale.git n9e	//克隆安装包到n9e目录,若更改配置目录,后续配置则需手动更改
[root@localhost home]##cd n9e
[root@localhost n9e]#export GO111MODULE=on            //启用 Go Modules 功能,服务器若可以翻墙访问golang可忽略此操作
[root@localhost n9e]#export GOPROXY=https://goproxy.io    //配置 GOPROXY 环境变量,服务器若可以翻墙访问golang可忽略此操作
[root@localhost n9e]#./control build
[root@localhost n9e]#./control pack
初始化数据库
[root@localhost n9e]#mysql -uroot -p < sql/n9e_hbs.sql
[root@localhost n9e]#mysql -uroot -p < sql/n9e_mon.sql
[root@localhost n9e]#mysql -uroot -p < sql/n9e_uic.sql
导入nginx配置文件
[root@localhost n9e]#cp -rp etc/nginx.conf /etc/nginx/
[root@localhost n9e]#systemctl restart nginx
修改配置文件
[root@localhost n9e]#vim etc/mysql.yml    //修改mysql访问的用户名和密码
启动各模块进程
[root@localhost n9e]#./control start all
[root@localhost n9e]#ps -ef|grep n9e     //查看进程启动成功

如下6个进程存在则启动成功7.添加开机自启动

[root@localhost n9e]#chmod 754 etc/service/n9e-*
[root@localhost n9e]#cp -rp etc/service/* /etc/systemd/system/
[root@localhost n9e]#systemctl enable n9e-index
[root@localhost n9e]#systemctl enable n9e-judge
[root@localhost n9e]#systemctl enable n9e-monapi
[root@localhost n9e]#systemctl enable n9e-transfer
[root@localhost n9e]#systemctl enable n9e-tsdb
[root@localhost n9e]#systemctl enable n9e-collector

8.登录Nightingale

我的实例IP为192.168.32.10,输入服务器IP访问 http://192.168.32.10 ,用户名和密码默认为root

登录如下,初步搭建完成

9.collector部署

collector的部署依赖的文件是n9e-collector二进制、etc/collector.yml、etc/address.yml,修改address.yml配置对应的服务端地址,把这3个文件打个包,分发到目标机器上启动就可以

[root@localhost n9e]#tar -zcvf n9e-collector.tar.gz n9e-collector etc/collector.yml etc/address.yml

拷贝n9e-collector.tar.gz到需要监控的服务器上
客户端操作:
[root@localhost ]#mkdir /home/n9e/
[root@localhost ]#tar -zxvf n9e-collector.tar.gz  -C /home/n9e/
[root@localhost ]#./n9e-collector

 

  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Rancher可以通过部署RKE集群,并使用Rancher UI将Nightingale的Helm Chart安装到该集群中来进行夜莺部署。首先,需要安装Rancher并使用RKE引擎部署下游集群。然后,可以通过Rancher Explorer UI,在App & Marketplace中添加Nightingale的Helm Chart Repo,并刷新后在Charts中找到Nightgale。# docker ps -a |grep rancher 748c46c44385 rancher/rancher:stable "entrypoint.sh" 16 hours ago Up 16 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp rancher 请注意,启动过程需要3-5分钟,期间访问80端口是无法访问的。只有在服务器完全启动后,才能正常访问Rancher。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [监控告警平台的国产化选择—Rancher与夜莺的集成](https://blog.csdn.net/RancherLabs/article/details/124962030)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [rancher 部署](https://blog.csdn.net/ljx1528/article/details/126418845)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值