-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Webhook Logger #102
Comments
You can now use log configuration like this <log type="webhook">
<option name="uri" value="https://some.host.com/webhook" />
<option name="username" value="misterX" />
<option name="password" value="secret" />
<option name="method" value="POST" />
<option name="contentType" value="application/json" />
</log> This will trigger the configured webhook with a json body like this. {
"status": 0,
"timestamp": 31726381641,
"duration": 234,32
"backupCount": 1,
"backupFailed": 0,
"errorCount": 0,
"errors": [],
"backups": [
{
"name": "MySQL code DB",
"status": 0,
"checks": {
"executed": 1,
"failed": 0
},
"crypt": {
"executed": 0,
"skipped": 0,
"failed": 0
},
"syncs": {
"executed": 1,
"skipped": 0,
"failed": 0
}
"cleanup": {
"executed": 1
"skipped": 0
"failed": 0
}
}
]
} |
Right now this os only available in dev-master, but I hope I can release version 5 early next week. |
Nice feature! hey @sebastianfeldmann this will be called at the end of the process? |
Yes the |
Awesome! @sebastianfeldmann one final question, is there any way to avoid the wait when I call the cmd class?
So the webhook will be notified when the process end? I read something about that here: I just worried about big files, did you test this framework with large amount of data? I mean if the upload connection is bad, the timeout of php could be a problem. Thanks in advance Sebastian! |
If I understand you correctly you are calling You could either use shell_exec('phpbu --configuration=my/config.xml &'); If you use this approach there will be no delay/wait what so ever, but you won't be able to get any feedback on how phpbu is doing within the script you execute it in. Only the log/webhook will tell you what happened. Hope that helps ;) |
It would be nice to be able to Log to a webhook, eg Zabbix etc.
A Webhook Logger should at least be able to do the following:
I took the liberty of creating a PR with my proposal for such a Webhook (will be pushed in a minute). Maybe it's not all you guys want, so feel free to criticize.
The text was updated successfully, but these errors were encountered: