Connecting prometheus-alertmanager with zoom via an incoming-webhook - zooming

Hello I'm trying to start sending alerts to Zoom using prometheus-alertmanager's webhooks, but I keep getting error
msg="Notify for alerts failed" num_alerts=1 err="cancelling notify retry for \"webhook\" due to unrecoverable error: unexpected status code 401
Here is my config
global:
resolve_timeout: 30m
route:
receiver: 'zoom'
routes:
- match:
severity: warning
continue: true
receiver: zoom
group_by: ['resource']
group_wait: 10s
group_interval: 5m
repeat_interval: 3h
receivers:
- name: 'zoom'
webhook_configs:
- url: 'https://inbots.zoom.us/incoming/hook/<SECRET>/'
http_config:
bearer_token: '<SECRET>'
has anyone tried using Alertmanager with ZOOM ?

Turns out that Alert manager is formatting the Authentication header in a way different than the one Zoom is expecting. So the solution is to run a middleware between them. Simple proxy, which changes the Headers format should work if you don't care how the messages look in Zooms chat, but if you care about formatting messages something more complicated will be needed.

Related

Webhook handler for Stripe event ... of type <several events> failed: User not found

I have a test mode product which I am generating a payment link for and passing a uid encoded in hex through a client_reference_id param. I have an firebase cloud function event handler and a webhook in my test stripe dashboard pointing to my event endpoint. Everything seems to be functioning properly, but I'm seeing these errors in my log console for several of the events sent:
invoice.paid
invoice.payment_succeeeded
checkout.session.completed
customer.subscription.created
customer.subscription.updated
I'm seeing these in my google cloud logs explorer. The error is as stated in the description. I don't see a stacktrace, but there is a trace path. I found them in Google Cloud's Trace List, but there's no stacktrace in there either. Just the sequence that got me to the errror:
/ext-firestore-stripe-payments-handleWebhookEvents (2645.429 ms)
Handling Stripe event [<event name>] of type <event type>
❗️[Error]: Webhook handler for Stripe event [<eventname>] of type [checkout.session.completed] failed: User not found!
[Open in Logs Viewer]
Full Log Entry
{
textPayload: "❗️[Error]: Webhook handler for Stripe event [<eventname>] of type [checkout.session.completed] failed: User not found!"
insertId: "<id>"
resource: {2}
timestamp: "2023-02-04T00:24:11.569373Z"
severity: "ERROR"
labels: {2}
logName: "<path>"
trace: "<path>"
receiveTimestamp: "2023-02-04T00:24:11.661364910Z"
}
and finally
4. Function execution took 2248 ms, finished with status code: 200
It's just not clear to me what is causing this error. Since I am using a payment link, I don't know how I can have a user besides what the user enters for themselves in the payment screen (email, etc).
The issue here was that there was a second endpoint with a different name which I had created while testing which was still enabled. Since I changed the name, it appears the extension was reporting errors on the firebase side. Deleting / disabling the endpoint solves the reported errors.

chrome.downloads.download never starts, but no errors

I'm trying to create a Chrome ext that uses the chrome.downloads API. But it doesn't seem to... do anything. First time Chrome developing so I'm a bit unfamiliar with the environment, but no one else online seems to have this problem.
Searching for the issue, I've minimized my code to the following (using the jQuery code as a test download, but have tried many others):
chrome.downloads.download({
url: "https://code.jquery.com/jquery-3.6.0.min.js",
}, (dlid) => {
chrome.downloads.search({id: dlid}, (dl) => {
console.log(dl[0]);
});
});
This results in the following DownloadItem being printed in the console:
byExtensionId: [redacted for privacy]
byExtensionName: [redacted for privacy]
bytesReceived: 0
canResume: false
danger: "safe"
exists: true
fileSize: 0
filename: ""
finalUrl: "https://code.jquery.com/jquery-3.6.0.min.js"
id: 2675
incognito: false
mime: "application/javascript"
paused: false
referrer: ""
startTime: "2021-09-04T09:18:02.401Z"
state: "in_progress"
totalBytes: 0
url: "https://code.jquery.com/jquery-3.6.0.min.js"
But the file doesn't download, nor does anything happen to indicate even an attempt at it. Continued readings of the DownloadItem always gives the same result: stating that the download is in progress and 0 bytes has been downloaded so far. And nothing else on my system gives any indication that the file is being downloaded. But never does it result in any errors - instead it just sits seemingly idling.
Here's what I've ruled out to be the cause so far:
Permission is declared in manifest.json: "permissions": [..., "downloads", ...]. Removing it and running the same code throws errors.
Context is correct, this is not run in a content script. Trying to do so throws errors.
Playing around with any of the DownloadOptions parameters has no effect at all. DownloadOptions.saveAs opens no dialog, and DownloadOptions.filename has no effect on the DownloadItem.filename which is always an empty string.
I've tried many other download targets, both different domains and different filetypes. The resulting mime parameter updates according to the URL extension, but otherwise it creates the same error-free perpetual idling.
I've even tried fake URLs with the same outcome - invalid URL syntaxes throws errors, but nonexistent URLs just gives the same idle result.
There's no evident Internet connectivity issues with my system, and I don't use any proxy or VPN.
Running it on another machine, albeit with the same Chrome user login and the same Internet connection. Same result.

Autodesk-designautomation: Internal Server Error(Error Code 500): Missing parameter in WorkItem

I am using Autodesk Revit and have been trying to implement the Design Automation API. I have been successful in trying out the sample, modify-your-model tutorial where the dimensions of a window are altered. However the example code is not executing perfectly anymore and it displays an internal server error message(error code 500). The error console claims that some parameter in the workItem is missing. The code worked again on the morning of 14th March again, but by noon it started showing the same error. The error log on the web page and console are given below respectively.
My question is, has the Autodesk OSS server been down for some time now or is it some fault from my side? Please help me out.
P.S. The same code worked perfectly before. I have not edited anything. Yes, I did try changing the Client ID and Client Secret and also update the ngrok address every 2hours.
Sincerely
Error list
-Failed to load resource: the server responded with a status of 500 (Internal Server Error)
-No webpage was found for the web address: http://localhost:3000/api/forge/designautomation/workitems
error in debugger
-fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HM76OJJ532MV", Request id "0HM76OJJ532MV:00000002": An unhandled exception was thrown by the application.
System.Net.Http.HttpRequestException: The server returned the non-success status code 400 (Bad Request).
More error details:
{
"url": [
"Error converting value \"http://aa025317d1f2.ngrok.io /api/forge/callback/designautomation?id=76m1z2sw7uQi-jtAYzYvgA&outputFileName=20210314024133_output_revit_sample_file.rvt\" to type 'System.Uri'. Path 'url', line 1, position 2376."
],
"workItem": [
"A value for the 'workItem' parameter or property was not provided."
]
}
As suggested in the comments there is a space in the ngrok url posted to the workitem:
http://aa025317d1f2.ngrok.io /api/forge/callback/designautomation?id=76m1z2sw7uQi-jtAYzYvgA&outputFileName=20210314024133_output_revit_sample_file.rvt

Invalid HTTP_HOST header: 'api.binance.com'

I keep on getting this error the moment I enabled error messaging in Django. I research about it. This binance thingy is about bitcoin and it is not related to what I'm doing.
Is this an attack that's trying to check/access my Django Web app?
Invalid HTTP_HOST header: 'api.binance.com'. You may need to add 'api.binance.com' to ALLOWED_HOSTS.
Report at /api/v1/time
Invalid HTTP_HOST header: 'api.binance.com'. You may need to add 'api.binance.com' to ALLOWED_HOSTS.
Request Method: GET
I check the api.binance.com. It is like an api and it says "ok"
What's your thought about this?
This is issue just means that external device on the internet is trying to connect on Django however since the the URL " api.binance.com" is not on the allowed list on Django settings.
It is giving error only when you enable the debugging to sent on your email.

Unable to send lenghty JSON string to ASP.NET HttpHandler using jquery ajax call (IIS 6)

BACKGROUND:
I have an Http handler which receives SIM/CDMA numbers ('8953502103000101242') in json string format from jQuery Ajax call using http POST method to activate them on server.
THE PROBLEM:
On Local Development Environment I can send up to 65K SIMS' Numbers (8953502103000101242 key/value pair in json string) BUT when I deploy to LIVE server then I faced the following problem.
If I send 2000 SIMS numbers separated by comma to Http handler then Http handlers receives http request successfully But when I send more than that (3000, 4000, 5000 SIM numbers in json string) then http request doesn’t reach to HttpHandler at server even after few hours.
If I send 5000 sim numbers in http POST using jquery then the total size request sent is 138.0 KB. and it should be passed to server because server maxRequestLength is 2048576. but it is not being sent to server when we deploy it on live server and it work fine on local development environment.
TRIED SOLUTION:
I tried to resolve the problem by editing httpRuntime configuration in web.config as follows
By using above httpRuntime configuration I noticed in Firefox firebug net state that It keeps waiting sending the request as executionTimeout="7200" but if executionTimeout="600" then it returns timeout error.
ITENDED SOLUTION:
I think if I try to sync above httpRuntime element in Machine.config file as well then it work fine.
REQUIRED SOLUIOTN
WHAT CAN THE BE PROBLEM AND HOW TO RESOLVE IT. PLEASE SUGGEST IN THIS REGARD. WAITING FOR A QUICK SOLUTION.
Jquery call to HttpHandler is as follows:
$.ajax({
type: "POST",
url: "../../HttpHandlers/PorthosCommonHandler.ashx",
data: { order: JSON.stringify(orderObject), method: "ValidateOrderInput", orgId: sCId, userId: uId, languageId: lId },
success: function(response) {
var orderResult = new dojo.data.ItemFileReadStore({
data: {
jsId: "jsorderResult",
id: "orderResult",
items: response.Data
}
});
});
UPDATE
I have diagnosed the problem. one problem was executionTimeout configuration in web.config. and the after making this change second problem was due to long operation time the request was being interrupted by internet (network communication). I made sure I have reliable internet connectivity and tested it again and it worked.
BUT Now i am facing another problem. My httphandler send request to a webservice and I am getting following exception in response.
The operation has timed out
I have fixed the problem.
one problem was executionTimeout configuration in web.config. and the after making this change second problem was due to long operation time the request was being interrupted by internet (network communication). I make sure I have reliable internet connectivity and tested it again.
configured the webserivces as follows.
<httpRuntime executionTimeout="7200" enable="true" maxRequestLength="2048576" useFullyQualifiedRedirectUrl="false" />
and
[WebMethod(Description = "Delete template",BufferResponse = false)]
Specifying "BufferResponse=false" indicates that .NET should begin sending the response to the client as soon as any part of the response becomes available, instead of waiting for the entire response to become available.