探针搭建——安装哪吒监控

最近撸了很多Azure100,服务器太多我也不确定哪台会挂,所以搭了个哪吒探针。

1.解析域名到服务器ip

2.访问Github,打开链接https://github.com/settings/developers,创建应用,回调地址http://cdn.example.com/oauth2/callback,之后创建Client Secret并保存。

3.连接SSH,输入命令

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

按照提示输入即可

4.配置反向代理,目标URL:http://127.0.0.1。配置文件:

#PROXY-START/
location / {
    proxy_pass http://127.0.0.1:8008;
    proxy_set_header Host $http_host;
    proxy_set_header      Upgrade $http_upgrade;
}
location ~ ^/(ws|terminal/.+)$  {
    proxy_pass http://127.0.0.1:8008;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
}
#PROXY-END/

访问即可

后续管理命令:

./nezha.sh
Comments | 2 条评论
  • zjy

    膜拜养鸡大户旭老板

  • zjy

    新主题颜值在线👍

消息盒子
# 您需要首次评论以获取消息 #
# 您需要首次评论以获取消息 #

只显示最新10条未读和已读信息