-
Notifications
You must be signed in to change notification settings - Fork 10
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
Webhook alerts, several warnings #170
Comments
You missed the pipe symbol for the template in the webhook notifier, it should look like: ...
webhook:
enabled: true
server: http://xxxxxxx:1880/webhook-frigate
header:
Content-Type: "application/json"
template: |
camera: "{{ .Camera }}"
label: "{{ .Label }}"
id: "{{ .ID }}" See more: https://yaml-multiline.info/ |
Thanks @freefd Strangely was working, not all the times maybe. |
@freefd
I've also placed correctly the indentation
If I remove the pipe, the config loads correctly and I get the proper webhook in nodered |
And now we need to summon @0x2142 here. |
Hi, The first is what you've already tried - which is providing a mapping of key / value pairs: template:
camera: "{{ .Camera }}" Which then generates a message like: { "camera": "test_cam" } Alternatively, you can enter a full JSON string, but at the moment it must be on one line: template: { "camera": "{{ .Camera }}" } Which would generate the same payload as above. Looks like because of the way I've implemented this, the typical YAML multiline string input isn't working - so I'll have to figure out a way to address that. I should also update the docs to add more info about this one, since it's a bit different than the other notification providers. |
Ok, thanks @0x2142 So, my configutation, that is lile the first one, is correct My issue, I don't know if is an issue, is the warning messages that I always get that are like
They are just warning or should I worry about? |
Hi @woody4165 - So, there are two things going on here... First, I tried spinning up a node red instance to see if I can replicate this - and sure enough it was pretty easy. I've never used node red before, so I added an "http in" for the incoming webhook, then some logic after to forward the request elsewhere. It looks like with this config, node red never responds to frigate-notify - so the app sits there until the request times out, which then initiates he retry errors you're seeing. In order to fix this, I needed to add a "http response" with a status code of 200. Seems like without this, node red never responds with a status code - so the connection just hangs and times out. Here's what my quick flow looks like: So perhaps this might be your issue as well? If so, you should just need to add a response to the initial inbound webhook from frigate-notify. Second - the warnings you are getting are in fact a bug in the HTTP retry logic. I'll get this resolved in the next release. |
@0x2142 I'm more worried about this one ^^^ @woody4165 can you please run your Frigate-notify instance in the trace logging mode (https://frigate-notify.0x2142.com/latest/config/options/) and provide more logs about the request? |
@freefd Yeah that's the issue I found. I'm not handling the request body properly in the retry, so once that first request is sent, subsequent retries are actually sending an empty body. I have a fix already in my current local branch & it will be out in the |
@0x2142, oh... got the problem. @woody4165, please ignore my request about the trace log level. |
Thanks @0x2142 My flow does not include http request node, since I get the data sent from the webhook directly from http in node @freefd thanks for your suggestion, I'll wait for your fix |
Just one more question, not related to webhook, in case it's needed I'll open a new issue Some times, most of the times, I get two telegram message for same event, one without the event clips link, one with. |
@woody4165 I wrote the message about this behavior but finally decided to ask you to create a new issue so as not to mix topics, please. |
Hi @freefd let me know if I can close this issue, since now it seems that everything is ok |
@woody4165, perhaps @0x2142 might want to make some commits with this issue as the ref, and close it after fixing, idk. |
I fixed the issue here and forgot to add a reference. But as far as I'm concerned, feel free to close it if you like - and thanks for reporting the issue! |
Hi
I have set webhook alerts and I get several WARN in the log
This is part of the log with warnings
and this is my configuration
What can I check/do?
Thanks
The text was updated successfully, but these errors were encountered: