Spinnaker github webhook does not trigger pipeline - spinnaker

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.

Related

Can you add a Nagios Acknowledgment URL to Slack messages

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?

Log Laravel API calls to AWS Cloudwatch

I have been using this package (https://github.com/maxbanton/cwh) to setup logging in my laravel 8 app.
I can already send the logs properly and see them in Cloudwatch and what I am trying to do is to log the API calls (request and response). I was able to do this by doing it by adding it in the middleware. My only question is that how can you do this asynchronously? I have found this discussion posted as an issue and this was the suggested solution (https://github.com/maxbanton/cwh/issues/25#) but I couldn't figure out how to implement it.
Has anybody able to send API logs to Cloudwatch asynchronously? Thank you.
What you can try is sent the call to a queued job or listener (beanstalkd preferably as using DB as storage will probably take the same time as sending the log to AWS) that is not running on the sync queue.
This way you can fire the call off to something else, and that can deal with it without you waiting for it.

Setting up a drone.io server with a github repo , get oauth_error

I have setup a drone server (not in a container , running on my machine for the first part of this).
I have a github repo set up and the details for the github client and secret.
The server is http://localhost:4040 and the 'Authorization callback URL' set to http://localhost:4040/authorize
When I hit access http://localhost:4040 to login am sent to github to authorize the application. (This is in line with what I expected). The details all look correct (what I think it should be).
When I click the Authorize application button in the github screen I am redirected back to http://localhost:4040/authorize and on to http://localhost:4040/login?error=oauth_error
Where can I get more information on this error? Can I provide more details?
Where can I get more information about setting up a drone server (first) then a docker drone (as it seems that is the setup preferred (correct?))?
Thanks in advance for your time on this

API connect published api in developer portal can't work

https://new-console.ng.bluemix.net/docs/services/apiconnect/apic_tutorial.html#apic_tutorial_01
Follow previous link to do create loopback project named ibmsvt and do test locally, we can post and get.
then publish this api as running api app on bluemix and we will get api target url and tls file.
type url and tls in api designer invoke, and publish api product again.
check api connect service and we can find that published api product has been published, configure developer portal, and invite developers
login developer portal and register one app
subscribe app to api product and run post command.
We will see that we only get can't post error information...
Please see attachment info for error info and api file.
From the screen capture provided, it looks like you're displaying the logs for the loopback application deployed on bluemix. It also looks like the POST request from APIConnect hit the Bluemix application as well. However, I'm unable to see the exact message of the error. What error did you get when you execute the POST from APIConnect? I suspect the POST did not include the $(request.path), what did you change the invoke url to be ? Can provide the x-ibm-configuration section in your yaml file? It will be located in your /definitions.
Thanks and best regards,
I am just have the exact problem, and struggled for days on redoing the tutorial several times, but still met with the same problem until found the upper reply, and gave me a hint.
In the tutorial, it says like the following:
Update the following fields with the values you copied previously:
Invoke URL: Insert the API target URL. You must specify the secure protocol HTTPS. For example:
apiconnect-ca3283b0-525c-488d-993b-3ab72fca78d0.youremail-dev.apic.mybluemix.net
TLS Profile: Insert the API invoke tls-profile.
For example:
client:Loopback-client
The origininal URL is $(runtime-url)$(request.path)$(request.search).
And the correct URL after updating is like following:
https://apiconnect-ca3283b0-525c-488d-993b-3ab72fca78d0.youremail-dev.apic.mybluemix.net$(request.path)
no slash before $(request.path), and $(request.search) should be deleted.
I also checked a tutorial video, it also do like this, but the screen for this step is passed away very quickly, you will not pay attention to this detail normally.
https://www.youtube.com/watch?v=Qku71JLv8vA&list=PLFa8jnU0KqE2eW5E449ziaurv8obSbcou&index=3&cm_mc_uid=24774488665514672571374&cm_mc_sid_50200000=1468400063

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.