datalust / seq-app-httprequest Goto Github PK
View Code? Open in Web Editor NEWSend events and notifications to an HTTP/REST/Webhook endpoint.
License: Apache License 2.0
Send events and notifications to an HTTP/REST/Webhook endpoint.
License: Apache License 2.0
I am getting the following error when i try install Seq.App.HttpRequest with the default settings
Could not install app
Package Seq.App.HttpRequest could not be interrogated for app configuration: The command failed: 'Syntax' property specified was not found.
Could not install app
Package Seq.App.HttpRequest could not be interrogated for app configuration: no type marked with [SeqApp]
could be found.
I cannot install the package in Seq 4.2.1113. what is the problem or the package does not support this version of seq
I seem to be unable to extract custom properties from the underlying event that caused the alert when using this app, yet I feel like I've followed the documents to a tee.
I want to extract the Application
and MachineName
from this simple event
Yet I can't receive any of my custom properties
{
"Message": "Alert condition triggered by admin/Healthcheck",
"MessageTemplate": "Alert condition triggered by {NamespacedAlertTitle}",
"Dictionary": {
"@seqid": "event-50fa9bbbc4a408d90000000000000000",
"NamespacedAlertTitle": "admin/Healthcheck",
"Alert": {
"Id": "alert-40",
"Title": "Healthcheck",
"Url": "http://localhost:80/#/alerts/alert-40",
"OwnerUsername": "admin",
"SignalExpressionDescription": null,
"Query": "select count(*) as count from stream where functionName = 'Health' and status = 'Succeeded' group by time(1m) having count > 0 limit 100",
"HavingClause": "count > 0",
"TimeGrouping": "1 minute"
},
"Source": {
"RangeStart": "2021-12-21T17:05:36.1917627Z",
"RangeEnd": "2021-12-21T17:06:36.1917627Z",
"ResultsUrl": "http://localhost:80/#/events?q=select%20count%28%2A%29%20as%20count%20from%20stream%20where%20functionName%20%3D%20%27Health%27%20and%20status%20%3D%20%27Succeeded%27%20group%20by%20time%281m%29%20having%20count%20%3E%200%20limit%20100&from=2021-12-21T17:05:36.1917627Z&to=2021-12-21T17:06:36.1917627Z",
"Results": [
[
"time",
"count"
],
[
"2021-12-21T17:05:36.1917627Z",
4
]
],
"ContributingEvents": [
[
"@Id",
"(Column 2)",
"@Message"
],
[
"event-2913c038c4a408d99cc2060000000000",
"2021-12-21T17:05:59.2476728Z",
"Executed 'Health' (Succeeded, Id=b026d54f-1bf8-40b1-bfd5-deb376336c6e, Duration=1ms)"
]
]
},
"SuppressedUntil": "2021-12-21T17:08:06.1917627Z",
"Failures": null,
"@i": "a1e77001"
}
}
Is this something I've done wrong?
I've installed the following app: HTTP 1.0.0-dev-00016 by Datalust...
Added an instance (_REMOVED_PART indicates part of the secret has been removed for posting here):
{
"Url": "https://inbots.zoom.us/incoming/hook/XIuu0_REMOVED_PART",
"Method": "POST",
"Body": "",
"BodyIsTemplate": "False",
"MediaType": "application/json",
"AuthenticationHeader": "",
"OtherHeaders": "Authorization: dZH7ayu8_REMOVED_PART",
"ExtendedErrorDiagnostics": "False"
}
The error I get is:
{"@t":"2022-11-15T00:45:22.6578637Z","@mt":"Outbound HTTP request failed with status code {StatusCode}","@m":"Outbound HTTP request failed with status code BadRequest","@i":"93101f49","@l":"Error","StatusCode":"BadRequest","AppId":"hostedapp-69","AppInstanceId":"appinstance-71"}
I've also tried this, but got the same error:
...
"Body": "test",
"BodyIsTemplate": "true",
...
I've proven the webhook works by run this locally:
curl 'https://inbots.zoom.us/incoming/hook/XIuu04_REMOVED_PART' -X POST -H 'Authorization: dZH7ayu_REMOVED_PART' -d 'Hello World!'
Should we be able to substitute inside a JSON template using expressions / directives?
e.g.
{ { 'rawTime': @t, 'formattedTime': 'The time is {@t:HH:mm:ss}' } }
outputs
{ "rawTime": "2022-01-05T16:29:09.7599190+00:00", "formattedTime": "The time is {@t:HH:mm:ss}" }
I can't seem to find any relevant documentation as to how I might "escape" out of the JSON to indicate a substitution is required when trying to perform interpolation
Outbound HTTP request failed with status code Unauthorized
tried using : in Authentication Header
tried also using base64 encoded version of : in Authentication Header
same response
What am I missing?
System.ArgumentException: The value cannot be null or empty. (Parameter 'mediaType')
at System.Net.Http.Headers.MediaTypeHeaderValue.CheckMediaTypeFormat(String mediaType, String parameterName)
at System.Net.Http.StringContent..ctor(String content, Encoding encoding, String mediaType)
at Seq.App.HttpRequest.HttpRequestMessageFactory.FromEvent(LogEvent evt) in C:\projects\seq-app-httprequest\src\Seq.App.HttpRequest\HttpRequestMessageFactory.cs:line 57
at Seq.App.HttpRequest.HttpApp.OnAsync(Event`1 evt) in C:\projects\seq-app-httprequest\src\Seq.App.HttpRequest\HttpApp.cs:line 84
at SeqCli.Apps.Hosting.AppContainer.SendTypedEventAsync(String clef) in C:\projects\seqcli\src\SeqCli\Apps\Hosting\AppContainer.cs:line 121
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.