I have a question regarding the Slack Webhooks for Zabbix. I've configured Zabbix to send Slack messages when a trigger of any kind is triggered. However the alerts are send, but zabbix does not recognize that the messages have been send, as seen in the pictures below:
Slack Alerts
Slack Problem
The Error messages state: Slack notification failed : Error: cannot get URL: Timeout was reached
Resolved Message: Slack notification failed : channel_not_found
I've followed this tutorial for the Slack intergration.
My configuration is as follows:
Actions,
Zabbix Admin user Media
on Zabbix 4.4.7
Hopefully someone can help me with this!
if you use HTTPProxy parameter, modify script as follows:
function getPermalink(channelId, messageTimestamp, httpProxy) {
var req = new CurlHttpRequest();
if (typeof httpProxy === 'string' && httpProxy.trim() !== '') {
req.SetProxy(httpProxy);
}
and
result.tags.__message_link = getPermalink(resp.channel, resp.ts, params.HTTPProxy);
Related
I tried to send alerts from Sumologic to Slack. But when I test the connection, it always failed and return 400 http code. I used the connection type as Webhook
When test the connection, it should pass
If you are using WebHook and testing the connection, you must use a valid payload. If you don't provide a valid payload, the connection test will not succeed.
You can use the connection type as SLACK over WebHook. Still, you are using a webhook URL.
This link shows how to integrate Sumologic with Slack.
https://www.youtube.com/watch?v=qEz8dcp9SgI
for project i used pusher to create realtime chat using laravel 9 . i can send message from front end to backend with api but can not received messages from backend
chat channel created but won't show up anything
for example when an event called backend completely received that but could not send anything or can not connect to channel
js :
Echo.channel('chat').listen('.MyMessage', (e) => {
console.log(e)
})
could anyone help me ?
I have a proactive messaging endpoint that works fine when a user is actively engaged in a conversation. For example, one use case where user asks for invoice data to be retrieved, which happens asynchronously and is sent back via proactive message. This works fine. But if a try to continue a conversation weeks later, the continueConversation action is failing. If I go into teams and initiate a new conversation with the bot, then resending the proactive message (without changing anything) works again.
In one of my use cases, the bot needs to follow up with the user 1+ weeks in the future. So I need to figure out how to send a proactive message to a teams user even if they haven't recently conversed with the bot. I'm not sure why continueConversation isn't working because the conversation ID doesn't change (and hasn't changed in months, probably not ever).
Here is the function I am using to send the proactive message.
server.post('/api/notify', async (req, res) => {
//console.log(req.body);
try {
const conversationReference = req.body.conversationReference;
await adapter.continueConversation(conversationReference, async turnContext => {
// If you encounter permission-related errors when sending this message, see
// https://aka.ms/BotTrustServiceUrl
await turnContext.sendActivity(req.body.message);
});
res.setHeader('Content-Type', 'text/html');
res.writeHead(200);
res.write('<html><body><h1>Proactive messages have been sent.</h1></body></html>');
res.end();
} catch (error) {
console.log('Bad Request. Please ensure your message contains the conversation reference and message text.');
console.log(error);
appInsightsClient.trackTrace({
message: `${error.name} - ${path.basename(__filename)}`,
severity: 4,
properties: {'error':error.message,'callStack':error.stack, 'botName': process.env.botName}
});
res.setHeader('Content-Type', 'text/html');
res.writeHead(400);
res.write('<html><body><p>Bad Request. Please ensure your message contains the conversation reference and message text.</p></body></html>');
res.end();
}
});
As the link in my own code says,
If your bot is restarted, a user awaiting a proactive message cannot receive it unless they have messaged the bot again after it restarted.
So that was exactly what the issue was. But the instructions on that page aren't giving the full details. You have to add the class via const { MicrosoftAppCredentials } = require('botframework-connector') as well as set the serviceUrl to pass (which is already available at conversationReference.serviceUrl).
So with these changes I added MicrosoftAppCredentials.trustServiceUrl(conversationReference.serviceUrl); before I send the proactive message and it started working fine even after bot was restarted.
I want notification on my discord app after completing every scan in sonarqube. I have tried to configured my discord webhook URL in sonarqube webhook option but it getting 400 error code after scanning the code and not sending notification.
Steps i tried :
Created webhook URL from my discord chennel.
Configured that webhook URL in sonarqube > Administration > Configuration > Webhooks.
Run code scan So that it send notification to configured webhook.
But i am getting below error.
Error :
Last delivery of Spidey Bot
Response: 400
Duration: 186ms
Payload: .....
Discord webohook screenshot attached
SonarQube Error screenshot attached
It turns out, request body format which SonarQube sends to Discord is not acceptable. It leads to bad request error. Below is logged response from Discord,
{
"message": "Cannot send an empty message",
"code": 50006
}
To successfully post the message it must be in the specific format documented https://discordapp.com/developers/docs/resources/webhook#execute-webhook
The solution to this could be a mediatory URL which parses the request body and hits Discord Webhook with excepted body params.
After successfully sent the URI to the web service from the push client, I send a toast notification from web service by using the URI, in web service I get the response as :
Push status 200,
NotificationStatus : Received,
DeviceConnectionStatus : Connected,
NotificationChannelStatus : Active.
But no message is received in the push client. The same scenario used to work fine earlier today. Can anyone tell me what is going wrong?
Is the message you are sending the same (ie. identical)? I seem to remember that some instances of a malformed message would get through the service OK, but then be suppressed on the device.
Do you have code to handle toast messages that arrive while your app is running? If you do, put a breakpoint in there and send a toast to the app while you're debugging and see what comes out. In this way you can make sure that the toast is making it to the device, and also see what the content is or what the problem might be.
channel.ShellToastNotificationReceived += channel_ShellToastNotificationReceived;
where channel is your channel object, and then
void channel_ShellToastNotificationReceived(object sender, NotificationEventArgs e)
{
Dispatcher.BeginInvoke(() => MessageBox.Show(e.Collection["wp:Text1"] + Environment.NewLine + e.Collection["wp:Text2"]));
}
or something similar to pop the message out to the display.
In web service, if a wrong setRequestProperty is set for example, setting wrong X-WindowsPhone-Target and wrong X-NotificationClass, then web service will receive notification received status, but the push client will not receive any message.
In my case I was sending a toast message with X-WindowsPhone-Target as token and X-NotificationClass as 1. After giving correct value it has started working fine.