【滴滴开源运维监控系统】夜莺V5版本部署实践

本文涉及的产品
云数据库 Tair(兼容Redis),内存型 2GB
Redis 开源版,标准版 2GB
推荐场景:
搭建游戏排行榜
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
简介: 【滴滴开源运维监控系统】夜莺V5版本部署实践

【滴滴开源运维监控系统】夜莺V5版本部署实践


滴滴开源运维监控系统-夜莺Nightingale


夜莺是新一代国产智能监控系统。对云原生场景、传统物理机虚拟机场景,都有很好的支持,10分钟完成搭建,1小时熟悉使用,经受了滴滴生产环境海量数据的验证,希望打造国产监控的标杆之作


新版Nightingale在2020.3.20发布v1版本,目前是v5.0版本,从这个版本开始,与Prometheus、VictoriaMetrics、Grafana、Telegraf等生态做了协同集成,力争打造国内最好用的开源运维监控系统。

640.jpg


640.jpg


本文参考如下链接完成


640.jpg



https://n9e.gitee.io/quickstart/standalone/
https://n9e.gitee.io/quickstart/telegraf/
https://blog.csdn.net/smallbird108/article/details/122497200


相关组件安装包准备


1、https://downloads.mysql.com/archives/community/
2、https://github.com/prometheus/prometheus/releases/download/v2.33.1/prometheus-2.33.1.linux-amd64.tar.gz
3、https://dl.influxdata.com/telegraf/releases/telegraf-1.21.3-1.x86_64.rpm
4、https://github.com/n9e/fe-v5/releases
n9e-5.3.3.tar.gz


640.jpg


640.jpg


640.jpg


一、安装MySQL

640.png


640.png

 rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm 
 rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
 rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm
 rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm

640.jpg


640.jpg


systemctl start mysqld
netstat -anp | grep 3306
systemctl enable mysqld
查看初始密码
grep 'temporary password' /var/log/mysqld.log
修改密码
set password for root@localhost=password('MySQL_2022');
grant all privileges on *.* to root@'%' identified by 'MySQL_2022';
flush privileges;

640.jpg


二、安装prometheus


mkdir -p /opt/prometheus
tar xf prometheus-2.33.1.linux-amd64.tar.gz
cp -far prometheus-2.33.1.linux-amd64/*  /opt/prometheus/
cd /opt/prometheus
chown -R root:root *

640.jpg

# service 
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
systemctl daemon-reload
systemctl enable prometheus
systemctl restart prometheus
systemctl status prometheus

640.jpg


其中prometheus在启动的时候要注意开启 --enable-feature=remote-write-receiver


640.jpg


三、安装Redis


建议给Redis添加密码

640.jpg

640.jpg


640.jpg


curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y redis
systemctl enable redis
vim /etc/redis.conf
systemctl restart redis


四、n9e部署


mkdir /usr/local/n9e
tar -zxvf n9e-5.3.3.tar.gz -C /usr/local/n9e/
vim /usr/local/n9e/etc/server.conf 
配置文件中MySQL Redis连接密码修改以及对接IP地址修改
vim /usr/local/n9e/etc/webapi.conf 
mysql -uroot -p'MySQL_2022' < /usr/local/n9e/docker/initsql/a-n9e.sql


640.jpg


640.jpg

640.jpg

640.jpg


640.jpg


mkdir /opt/n9e
cat <<EOF >/etc/systemd/system/n9e-server.service
[Unit]
Description="n9e-server"
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/n9e/n9e server
WorkingDirectory=/usr/local/n9e
Restart=on-failure
SuccessExitStatus=0
LimitNOFILE=65536
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=n9e-server
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/n9e-webapi.service
[Unit]
Description="n9e-webapi"
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/n9e/n9e webapi
WorkingDirectory=/usr/local/n9e
Restart=on-failure
SuccessExitStatus=0
LimitNOFILE=65536
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=n9e-server
[Install]
WantedBy=multi-user.target
EOF

640.jpg


640.jpg


640.jpg


systemctl enable n9e-server.service
systemctl enable n9e-server.service
systemctl enable n9e-webapi.service 
systemctl restart n9e-server.service  n9e-webapi.service
systemctl status n9e-server.service
systemctl status n9e-webapi.service 
firewall-cmd --permanent --zone=public --add-port=18000/tcp
firewall-cmd --permanent --zone=public --add-port=19000/tcp
firewall-cmd --reload


五、监控主机上安装采集器telegraf


例如找一台监控主机作为监控主机客户端进行测试


rpm -ivh telegraf-1.21.3-1.x86_64.rpm

640.jpg


640.jpg


cat <<EOF > /etc/telegraf/telegraf.conf
[global_tags]
[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  hostname = ""
  omit_hostname = false
[[outputs.opentsdb]]
  host = "http://192.168.31.127"
  port = 19000
  http_batch_size = 50
  http_path = "/opentsdb/put"
  debug = false
  separator = "_"
[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = true
[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.system]]
  fielddrop = ["uptime_format"]
[[inputs.net]]
  ignore_protocol_stats = true
EOF
systemctl restart telegraf.service


六、登录n9e web服务端参看监控指标项


默认用户名密码为:root/root.2000

640.jpg

640.jpg

640.jpg


这里使用telegraf作为采集器,本文只简单介绍入门部署,更多功能待研究与实践

相关文章
|
22天前
|
数据采集 运维 数据可视化
AR 运维系统与 MES、EMA、IoT 系统的融合架构与实践
AR运维系统融合IoT、EMA、MES数据,构建“感知-分析-决策-执行”闭环。通过AR终端实现设备数据可视化,实时呈现温度、工单等信息,提升运维效率与生产可靠性。(238字)
|
1月前
|
传感器 人工智能 运维
AR智慧运维系统介绍
阿法龙XR云平台是一款面向工业领域的增强现实(AR)智能化平台,助力企业实现数字化转型。平台集成智能巡检工作流、远程协助、AI视频验收、人脸识别等功能模块,支持AR眼镜与移动终端,提供虚实融合的运维体验。具备高度定制化能力,适配多种工业场景,提升运维效率与智能化水平。
|
2月前
|
数据采集 运维 监控
运维靠经验拍脑袋?不如上车:构建“数据驱动”的智能决策系统
运维靠经验拍脑袋?不如上车:构建“数据驱动”的智能决策系统
117 0
|
2月前
|
存储 运维 安全
运维知识沉淀工具深度解析:从结构设计到落地实践全拆解
运维知识沉淀工具助力团队将零散经验结构化存储,实现问题处理路径标准化、知识复用化。通过标签、模板与自动化调取机制,让每次处理都留下可复用资产,提升团队协同效率与系统稳定性。
|
3月前
|
人工智能 运维 监控
聚焦“AI+运维”深度融合,龙蜥系统运维联盟 MeetUp 圆满结束
现场 40 多位开发者进行了深入的技术交流,探索 AI 与运维深度融合的未来路径。
|
1月前
|
机器学习/深度学习 人工智能 运维
三重Reward驱动的运维智能体进化:多智能体、上下文工程与强化学习的融合实践
这篇文章系统性地阐述了 AI 原生时代下,面向技术风险领域的智能体系统(DeRisk)的架构设计、核心理念、关键技术演进路径与实践落地案例。
三重Reward驱动的运维智能体进化:多智能体、上下文工程与强化学习的融合实践
|
2月前
|
人工智能 运维 Prometheus
运维还要天天盯人值班?现代化运维就该让系统自己跑!
运维还要天天盯人值班?现代化运维就该让系统自己跑!
91 4
|
13天前
|
人工智能 运维 监控
运维安全还能靠“人盯人”?别闹了,聊聊自动化处理的真功夫
运维安全还能靠“人盯人”?别闹了,聊聊自动化处理的真功夫
82 17
|
5月前
|
数据采集 机器学习/深度学习 人工智能
运维人的“福音”?AI 驱动的自动化网络监控到底香不香!
运维人的“福音”?AI 驱动的自动化网络监控到底香不香!
403 0

热门文章

最新文章