Can you add a Nagios Acknowledgment URL to Slack messages - scripting

I'm new to nagios and my first task has been slack integration. I am using the Nagios created plugin for Slack and everything is working correctly as far as posting the message in the channels for both hosts and services. I want to add an acknowledgment URL to the message that gets sent to slack, so our team can just acknowledge through the slack message. I have tried adding the URL in various places, like the host/service definitions so I could then call it in the command Slack_notification_handlers. Is it possible to add said acknowledgement urls with the current methods I'm using? or is this something I'm going to have to make myself?

Related

Spinnaker github webhook does not trigger pipeline

I have followed the guide for github pipeline triggers via webhooks and while I can verify that the webhook was sent successfully with the exact filepath artifact, my pipeline is not triggered.
I have verified the artifact expected is sent and the response is 200 from github with body:
{"eventId":"5a05b1b0-ac9f-4222-bdeb-caa1a7f4b216","eventProcessed":true}
I have checked the echo log and there doesn't seem to be anything but startup information. It must not be logging webhooks and responses, or else I figured I would see the ^^eventId I received on the github side.
Here is a gist with this information including the payload.
Below is an image of the pipeline config - at this time I'm just trying to trigger it and get a slack notification, but nothing is triggered:
What am I missing here? How can I debug further?
I found the error thanks to Pere on the spinnaker slack channel.
I have the spinnaker trigger watching master (which is what I want for production), and I was commit/pushing test files to develop. So while the webhook is configured to push for any case, it is filtering it on the spinnaker side. Changing the trigger to watch develop worked.
As a side note, neither successful nor unsuccessful triggers showed in the echo log.

Server Sent Events using Spring WebFlux, EventSource and RabbitMQ

I want to create live notifications for my website.
Reference link: http://sinhamohit.com/writing/spring-boot-reactive-sse
Above link contains example for SSE and Event Source. The stream of objects is created to create Flux stream.
In my case, I want to create server sent events and send them to RabbitMQ server, the rest controller should be able to listen to message queue and receive the message.
Right now I am able to receive the messages, but I am not sure how I can convert them into Flux and send the stream to rest URL.
How should I do it?
Refernces, links and examples will be great.
Refer following link, here activemq is used but you can also use RabbitMQ.

How to receive webhook signal from 3rd party service

I'm using a SaaS for my AWS instance monitoring and Mandrill for email sending/campaigns.
I had created a simple chart with Zapier but I'd rather like to host it myself. So my question is:
How can I receive a webhook signal from Mandrill and then send it to Datadog from my server? Then again I guess hosting this script right on the same server I'm monitoring would be a terrible idea...
Basically I don't know how to "receive the webhook" so I can report it back to my Datadog service agent so it gets updated on their website.
I get how to actually report the data to Datadog as explained here http://docs.datadoghq.com/api/ but I just don't have a clue how to host a listener for web hooks?
Programming language isn't important, I don't have a preference for that case.
Here you can find how to add a new webhook to your mandrill account: https://mandrillapp.com/api/docs/webhooks.php.html#method=add
tha main thing here is this:
$url = 'http://example/webhook-url';
this is your webhook URL what will process the data sent by mandrill and forward the information to Datadog.
and this is a description about what mandrill will send to your webhook URL: http://help.mandrill.com/entries/21738186-Introduction-to-Webhooks
a listener for webhooks is nothing else then a website/app which triggers an action if a request comes in. Usually you keep it secret or secure it with (http basic) authentication. E.g. create a website called http://yourdomain.com/hooklistener.php. You can then call it with HTTP POST or GET and pass some data like hooklistener.php?event=triggerDataDog or with POST and send data along with the body. You then run a script or anything you want to process that event.
A "listener" is just any URL that you host where you can receive data that is posted to it. Keep in mind, since you mentioned Zapier, you can set up a trigger that receives the webhook data - in this case the listener URL is provided by Zapier, and you can then send that data into any application (or even post to another webhook). Using Zapier is nice because it doesn't require you to write the listener code that receives the hook data and does something with it.

ejabberd auto allow subscription

I have installed and run ejabberd successfully. I've tested the chat function and it works well.
I have a problem with the 'Add Buddy' process. When I add a buddy, the buddy has to manually approve the request. I would like to skip this step and have all buddy requests to be approved automatically.
I'm getting a presence type of 'subscribe' for authorization requests. How can I authorize a buddy programmatically? I'm using objective c.
Ok I found the answer to my question.
Basically, just follow the protocol on http://xmpp.org/rfcs/rfc3921.html#sub and programmatically send a subscribe request.

Can someone please explaind me what is DLR and how it used in sms gateways?

Can someone please explaind me what is DLR and how it used in sms gateways?
It is a URL callback for Delivery Reports. Instead of the gateway logging the activity it will callback the provided URL using a querystring at the end with the parameters of the delivery report.
So in order for the URL callback to work you'll need a HTTP webserver with a URL that listens for incoming GET requests:
http://www.example.com/dlr.php
then requests are sent to it like so
"http://example.com/dlr.php?page=dlr&status=[status]&answer=[answer]&to=[to]&ts=[ts]&id=[id]"
The full listing of documentation can be found here.
When you send messages through a gateway you have the opportunity to specify wether or not you want to be notified of events other than the SMSC receiving your message.
When you do specify that you want to receive DLRs the gateway will send you a DLR to let you know that the result of attempting to deliver the message to the network. In case of failure the DLR will contain a code about the reason of failure.
Gateways may send more DLRs (Intermediate Notifications) to notify of other events that happen after the message has been delivered to the network, e.g., delivery to a handset.
You can find more by looking at the SMPP spec, below is a basic diagram of the flow for a Network Delivery Receipt (taken from the spec v3.4).