监控服务器状态,夜莺( nightingale)方案介绍
创始人
2024-09-26 04:53:07
0

前提

选择一台服务器,部署一个监控服务端,然后在各个windows或者linux中部署数据采集节点。

类似如下结构

在这里插入图片描述

目前我这边采用的技术是

https://flashcat.cloud/product/nightingale/

Nightingale 的解决方案

1 部署内容

服务端(服务端为 centos7 为例子)需要部署的清单:
prometheus(新版本不需要了)
mysql
redis
n9e

客户端需要部署的清单:
linux版本categraf
windwos版本categraf

2 开始进行部署

本次演示的采用 CentOS7 操作系统,其中 mysql redis 可以复用已经安装好的

2.1 部署prometheus(新版本不需要了)

下载安装包:
https://github.com/prometheus/prometheus/releases/download/v2.28.0/prometheus-2.28.0.linux-amd64.tar.gz

选择一台服务器
上传安装包
prometheus-2.28.0.linux-amd64.tar.gz

执行以下命令

mkdir -p /opt/prometheus tar xf prometheus-2.28.0.linux-amd64.tar.gz cp -far prometheus-2.28.0.linux-amd64/*  /opt/prometheus/ 

执行安装文件

# install prometheus mkdir -p /opt/prometheus 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 tar xf prometheus-2.28.0.linux-amd64.tar.gz cp -far prometheus-2.28.0.linux-amd64/*  /opt/prometheus/  # service  cat </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  systemctl daemon-reload systemctl enable prometheus systemctl restart prometheus systemctl status prometheus 

Prometheus访问端口为:9090

2.2 部署mysql

可复用现有的,或参考博主文档

2.3 部署redis

可复用现有的,或参考博主文档

2.4 部署n9e并导入n9e数据库

cd /opt wget https://github.com/ccfos/nightingale/releases/download/v7.0.0/n9e-v7.0.0-linux-amd64.tar.gz  mkdir -p /opt/n9e tar -C /opt/n9e -xzf n9e-v7.0.0-linux-amd64.tar.gz 

配置mysql和redis的路径

cd /opt/n9e/etc vi config.toml 

创建n9e_v6数据库
将n9e.sql导入 n9e_v6数据库中

cd /opt/n9e nohup ./n9e &> n9e.log & # 注意,如果有异常,请查看 n9e.log 文件 

访问端口 17000

IP:17000 账号 root 密码 root.2020

在这里插入图片描述

4、监控linux服务器

下载并解压文件

cd /opt/softwarePackage wget https://github.com/flashcatcloud/categraf/releases/download/v0.3.76/categraf-v0.3.76-linux-amd64.tar.gz tar -C /opt/categraf -xzf categraf-v0.3.76-linux-amd64.tar.gz 
cd /opt/categraf/conf vi config.toml # 编辑配置文件 

启动

nohup ./categraf &> stdout.log & 

4.1 在管控台修改标签

查看上报过来的监控对象
在这里插入图片描述

因为目前是采用服务器hostname进行标识的,有时候不好分辨,所以需要打备注一下

5、监控windowd服务器

wget https://github.com/flashcatcloud/categraf/releases/download/v0.3.76/categraf-v0.3.76-windows-amd64.zip unzip categraf-v0.3.76-windows-amd64.zip 

修改配置文件

conf/config.toml

启动
categraf.exe

6、导入监控大盘

在这里插入图片描述
在这里插入图片描述

7、配置报警

以邮箱告警为例子

先配置邮件地址

在这里插入图片描述
在这里插入图片描述

配置告警规则

在这里插入图片描述
当服务器失联的时候,会进行告警并发送邮件

在这里插入图片描述

相关内容

热门资讯

透视辅助!wepokerplu... 无需打开直接搜索;操作使用教程:透视辅助!wepokerplus透视挂真的假的,wepoker开挂辅...
为切实保障!微乐智能辅助app... 为切实保障!微乐智能辅助app,三哥玩辅助器,妙招教程(一贯确实有挂)-哔哩哔哩1、操作简单,无需注...
据监测!道游互娱辅助(辅助挂)... 据监测!道游互娱辅助(辅助挂)原来真的是有挂(有挂总结)-哔哩哔哩1、据监测!道游互娱辅助(辅助挂)...
目前来看!红龙poker有辅助... 目前来看!红龙poker有辅助吗,wpk俱乐部是真的吗,操作教程(一贯透视是有挂的)-哔哩哔哩1、实...
透视辅助!wepoker德州出... 透视辅助!wepoker德州出牌规律,微乐扑克辅助器免费版,安装教程(推荐攻略开挂辅助器)是一款可以...
此事引发网友热议!亲友圈辅助吧... 此事引发网友热议!亲友圈辅助吧,潮汕汇辅助神器,步骤教程(原来确实有挂)-哔哩哔哩此事引发网友热议!...
反观!川南休闲辅助(辅助挂)其... 反观!川南休闲辅助(辅助挂)其实真的有挂(有挂资料)-哔哩哔哩1、许多玩家不知道川南休闲辅助辅助软件...
此事引发广泛关注!wpk透视是... 此事引发广泛关注!wpk透视是真的假的,wepoker免费透视脚本,指南教程(一直透视真的是有挂)-...
辅助工具!wepoker开挂辅... 您好:wepoker开挂辅助挂教程的软件,软件加客服确实是有挂的,很多玩家在这款游戏中打牌都会发现很...
围绕透视问题!闲逸辅助app下... 围绕透视问题!闲逸辅助app下载,多乐跑辅助,课程教程(果然确实有挂)-哔哩哔哩亲,关键说明,闲逸辅...