Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######## MIKROTIK - DIAY GRAPHING CAPTURE REPORT - LINE #########
- # #
- # build 0.2.20231105 public review #
- # BY: PHUKAO PONGSUWAN #
- # #
- # LINE Script: https://pastebin.com/Jk9kjH2A #
- # TELEGRAM Script: https://pastebin.com/v6RCJqBh #
- # #
- # * * * * IF USE ROS > v7.10 please use * * * * * #
- # LINE Script: https://pastebin.com/w6vWjjav #
- # TELEGRAM Script: https://pastebin.com/jnRBkwCx #
- # #
- # Capture with https://github.com/elestio/ws-screenshot #
- # #
- # fix 20231105 - add uniq value in url to avoid caching #
- # #
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- # #
- # !!! NEED THIS SCRIPT "func_LINEdateTime" as INCLUDE FIELS !!!! #
- # #
- # https://pastebin.com/tznx0BSu #
- # #
- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- # Multiple interface use =>
- #
- # :local interfaces { "<interface-name-1>"; "<interface-name-2>"; "<interface-name-n>" }
- :local interfaces { "<interface-name>" }
- :local token "<LINE_API_TOKEN>";
- :local domainWS "<DOMAIN_OR_IP_WS-CAPTURE-SERVICE>"
- :local domianGRAPH "<IP_PORT_TO_GRAPH>"
- :local msg "<MESSAGE TEXT>"
- :foreach inf in=$interfaces do={
- :local datetime [[:parse [/system/script/get func_LINEdateTime source]]]
- :local uniq [:rndnum from=100000 to=999999]
- :local url "https://$domainWS/api/screenshot%3Funiq=$uniq%26resX=1024%26resY=500%26outFormat=png%26waitTime=50%26isFullPage=true%26url=http://$domianGRAPH/graphs/iface/$inf/"
- :local postmsg "message=$msg$inf\n$datetime&imageThumbnail=$url&imageFullsize=$url"
- /tool/fetch http-method=post \
- http-header-field="Content-Type: application/x-www-form-urlencoded\nAuthorization: Bearer $token" \
- http-data=$postmsg \
- https://notify-api.line.me/api/notify \
- output=none
- :log info ("LINE Notify: $msg$inf")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement