#!/bin/bash
date=`date +%Y-%m-%d_%H:%M:%S`
name=`'hostname'`
nwip=`ifconfig|grep 'inet '|grep -v '127.0'|xargs|awk -F '[ :]' '{print $2}'`
#内存监控
men_use=`free | awk '/Mem/{printf("%.2f\n"), $3/$2*100}' | cut -d "." -f 1`
if [ $men_use -gt 1 ];then
curl -s -d '' "https://api.telegram.org/bot1643559086:AAGiZrUdTedIkhN67FruNmlzP7Dho8TVcCU/sendMessage?chat_id=-442623357&text=""内网IP：$nwip %0A主机名：$name %0A在$date 内存使用："
fi


