折腾啥 头像

消息来源频道

折腾啥

@zhetengsha

频道40,410 位成员公开可见0 人在线

Power Users/Automators 折腾/讨论/分享各种开源工具/脚本/自动化工作流 👥 群组 @zhetengsha_group 📌 资源合集导航 https://t.me/zhetengsha/2 🎁 恰饭推荐 https://t.me/zhetengsha/957 📢 广告投放 @xream Buy ads: https://telega.io/c/zhetengsha feedId:55438372655431680+userId:62307599601855488

成员规模40,410 位成员
在线情况0 人在线
消息总数4,340 条消息
浏览量总数7,753,402 次浏览

在这个频道里搜索消息……

t.me/zhetengsha

哪吒探针 Agent 保活 自动重启
检测到日志里有关键词或进程不存在时, 清空日志, 重启, 发送 Telegram 通知
#!/usr/bin/env bash
api_key=""
chat_id=""
if ! pgrep -x nezha-agent > /dev/null || journalctl -o cat -u nezha-agent | grep -i "error" > /dev/null; then
# 重启服务
systemctl restart nezha-agent
# 清空日志
journalctl --rotate
journalctl --vacuum-time=1s
echo "nezha-agent service restarted and logs cleared."
curl -F disable_notification=true -F chat_id=$chat_id -F text="[$(hostname)] 哪吒探针已重启" https://api.telegram.org/bot$api_key/sendMessage > /dev/null
fi
📌 资源合集导航
👏 欢迎评论 & 转发(请保留来源)
加入 折腾啥 📢 频道 | 👥 群组
※ 机场推荐 大流量电话卡 支付宝红包
可点击查看 👉 恰饭推荐
🙏 本频道 99.99% 的内容均为原创 感谢老板们的支持
#哪吒探针 #nezha #agent #nezha-agent #哪吒 #探针 #监控 #IP #unraid #nas #保活 #自动重启