ZooeyBot
ZooeyBot copied to clipboard
About OnAlertCallbackCommand
Would you let me know the format for "OnAlertCallbackCommand"?
When I describe as below, command execution was failed.
OnAlertCallbackCommand=curl -X POST -H "Authorization: Bearer ASSESS_TOKEN" -F "message=Warning! from PC" https://notify-api.line.me/api/notify
Already confirmed on command prompt.
Hi, Could it be that your token expired?
@Masuzu Not expired. I got token yesterday and confirmed execution and notified to my phone. I checked by windows command prompt window.
Thanks,
Does anyone use this feature and working? If so, would you introduce command format summary? OnAlertCallbackCommand=[ your code ]
What is the exact error? A curl could be not found
error?
@Masuzu How do you test the command?
Also, does this look correct to you?
OnAlertCallbackCommand=curl -XPOST -d "token=<>" -d "channel=#general" -d "text=Hello @username" -d "username=token" "https://slack.com/api/chat.postMessage"
That looks correct. I will go and grab a test token from slack then to try and reproduce the error. I ran a python script on my side, that script handling the service API logic.
Will there be a turtorial about how to use the call back alert system?
No time right now, but that'd be helpful.
If anyone wants to know how to formulate the command to receive a notification on discord from a webhook bot, i use the following
curl -X POST -d "{\"content\":\""<@yournameid>" \"}" yourwebhookurl
On a computer that is running a 64-bit version of Windows , a 32-bit application cannot access the following folder: %WinDir%\System32
When a 32-bit application tries to access the System32 folder, access is redirected to the following folder: %WinDir%\SysWOW64
As a walk-around solution, 32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32.
So, if we want to access C:\Windows\System32\curl.exe from 32-bit application, we can use C:\Windows\Sysnative\curl.exe instead.
Try describing as below.
OnAlertCallbackCommand=C:\Windows\Sysnative\curl.exe -X POST -H "Authorization: Bearer ASSESS_TOKEN" -F "message=Warning! from PC" https://notify-api.line.me/api/notify
@Singapura310 Thanks for your comments. As per "C:\Windows\Sysnative", I can't find in my Windows and you means "C:\Windows\System32"?
I'll try.
The Sysnative is a virtual directory not a real one.
@Vatar Hey, I really appreciate that! Just wondering, does mine look right?
curl -X POST -d "{"content":""<@Username#0000>" "}" webhook url
Do you know any way of testing it?
I tried with following command but still failed.
OnAlertCallbackCommand=C:\Windows\System32\curl -X POST -H "Authorization: Bearer <TOKEN>" -F "message=Warning! from PC" https://notify-api.line.me/api/notify
@DarkHorse1121
On a 64-bit Windows, ZooeyBot cannot access C:\Windows\System32 because of a file system redirector.
Use Sysnative instead.
Incorrect: OnAlertCallbackCommand=C:\Windows\System32\curl ... Correct: OnAlertCallbackCommand=C:\Windows\Sysnative\curl ...
@Vatar Hey, I really appreciate that! Just wondering, does mine look right?
curl -X POST -d "{"content":""<@Username#0000>" "}" webhook url
Do you know any way of testing it?
Just open up a terminal(right-click windows at bottom-left->terminal), copy-paste and try to execute it.
Zoeey will do just that.