2022年9月3日

RouterOS CPU效能監控發送即時告警

CPU效能監控發送即時告警,DeviceAverageLoadThreshold設定為CPU平均用量超過40%,送出Slack告警通知

/system scheduler

add interval=5m name=CPUOverloadCheck on-event=":local ScriptName \"CPUOverloadCheck\";\r\

    \n:local ScriptRunning [system script job find where script=\$ScriptName];\r\

    \n:if (\$ScriptRunning) do={\r\

    \n    :log info \"The script \$ScriptName cannot be run, the script is already running (Change the NumberOfMeasurements to redu\

    ce the script)\";\r\

    \n} else={\r\

    \n    /system script run \$ScriptName;\r\

    \n}" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup

(繼續閱讀...)

2022年8月26日

RouterOS SCP備份Script

 #For SCP Backup
/system backup save name=full
:local strid (:put ([/system identity get name] . ".backup"));
:put $strid;
/tool fetch upload=yes url="sftp://10.77.21.41/home/autobackup/ROS-Backup/$strid" user=autobackup password=dafsdfXX13X src-path=full.backup src-address=10.33.41.26

(繼續閱讀...)

2022年8月10日

Cacti 指令加入監控device

先用下方指令找出對應的template ID的對應

php -q /var/www/html/cacti/cli/add_graph_template.php --list-hosts

php -q /var/www/html/cacti/cli/add_tree.php --list-hosts

建立設備清單對應表
[root@LAB ~]# vi ROSID
10.233.88.21 ROS-CHT-03-DCLAB
10.233.88.22 ROS-CHT-04-DCLAB
10.233.88.23 ROS-CHT-05-DCLAB
10.233.88.24 ROS-TFN-17-DCLAB
10.233.88.25 ROS-TFN-18-DCLAB
10.233.88.26 ROS-TFN-19-DCLAB
10.233.88.27 ROS-TFN-20-DCLAB
10.233.88.28 ROS-TFN-21-DCLAB

(繼續閱讀...)

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.