夜莺安装部署(二进制)

目录

1.1 安装依赖组件

1.2 安装夜莺


夜莺的服务端有两个模块:n9e-webapi n9e-server,n9e-webapi 用于提供 API 给前端 JavaScript 使用,n9e-server 的职责是告警引擎和数据转发器。依赖的组件有 MySQL、Redis、时序库,时序库我们这里使用 Prometheus。

1.1 安装依赖组件

1. install prometheus

[root@localhost ~]# mkdir -p /opt/prometheus
[root@localhost ~]# wget https://s3-gz01.didistatic.com/n9e-pub/prome/prometheus-2.28.0.linux-amd64.tar.gz -O prometheus-2.28.0.linux-amd64.tar.gz
[root@localhost ~]# tar xf prometheus-2.28.0.linux-amd64.tar.gz
[root@localhost ~]# cp -far prometheus-2.28.0.linux-amd64/*  /opt/prometheus/
[root@localhost ~]# cat <<EOF >/etc/systemd/system/prometheus.service
> [Unit]
> Description="prometheus"
> Documentation=https://prometheus.io/
> After=network.target
> 
> [Service]
> Type=simple
> 
> ExecStart=/opt/prometheus/prometheus  --config.file=/opt/prometheus/prometheus.yml --storage.tsdb.path=/opt/prometheus/data --web.enable-lifecycle --enable-feature=remote-write-receiver --query.lookback-delta=2m 
> 
> Restart=on-failure
> SuccessExitStatus=0
> LimitNOFILE=65536
> StandardOutput=syslog
> StandardError=syslog
> SyslogIdentifier=prometheus
> 
> 
> [Install]
> WantedBy=multi-user.target
> EOF
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl enable prometheus
Created symlink from /etc/systemd/system/multi-user.target.wants/prometheus.service to /etc/systemd/system/prometheus.service.
[root@localhost ~]# systemctl restart prometheus
[root@localhost ~]# systemctl status prometheus
● prometheus.service - "prometheus"
   Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor preset: disabled)
   Active: active (running) since 四 2023-04-06 11:11:18 CST; 6s ago

2. install mysql

[root@localhost ~]# yum -y install mariadb*
[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@localhost ~]# systemctl restart mariadb
[root@localhost ~]# mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1234');"
# 建议使用默认1234的密码,这样无需修改配置文件,否则要手动修改/opt/n9e下的etc/server.conf和etc/webapi.conf

 3. install redis

[root@localhost ~]# yum install -y epel-release
[root@localhost ~]# yum install -y redis
[root@flashcat ~]# systemctl enable redis
[root@flashcat ~]# systemctl restart redis

1.2 安装夜莺

[root@flashcat ~]# mkdir -p /opt/n9e && cd /opt/n9e
# 最新安装包获取地址 https://github.com/didi/nightingale/releases
[root@flashcat n9e]# tarball=n9e-v6.0.0-ga.2.0.2-linux-amd64.tar.gz
[root@flashcat n9e]# urlpath=https://github.com/didi/nightingale/releases/download/v6.0.0-ga.2/${tarball}
[root@flashcat n9e]# wget $urlpath
# 无法下载时,建议先Windows下载好,再传到Linux机器
[root@flashcat n9e]# tar zxvf ${tarball}
[root@flashcat n9e]# mysql -uroot -p1234 < docker/initsql/a-n9e.sql
[root@flashcat n9e]# vim etc/service/n9e-server.service
# 修改如下两行
ExecStart=/opt/n9e/n9e server
WorkingDirectory=/opt/n9e
[root@flashcat n9e]# cp etc/service/n9e-server.service /usr/lib/systemd/system/
[root@flashcat n9e]# systemctl start n9e-server
[root@flashcat n9e]# systemctl enable n9e-server
4月 06 17:03:38 flashcat systemd[1]: n9e-server.service failed.
[root@flashcat n9e]# vim etc/service/n9e-webapi.service
[root@flashcat n9e]# cp etc/service/n9e-webapi.service /usr/lib/systemd/system
[root@flashcat n9e]# systemctl start n9e-webapi
[root@flashcat n9e]# systemctl enable n9e-webapi
Created symlink from /etc/systemd/system/multi-user.target.wants/n9e-webapi.service to /usr/lib/systemd/system/n9e-webapi.service.
[root@flashcat n9e]# systemctl status n9e-webapi

如果启动成功,server 默认会监听在 19000 端口,webapi 会监听在 18000 端口,且日志没有报错。

浏览器访问 webapi 的端口(默认是18000)就可以体验相关功能了,默认用户是root,密码是root.2020

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 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、付费专栏及课程。

余额充值