From 03920075e4b3c7851e65978f7a9240eca87d46f3 Mon Sep 17 00:00:00 2001 From: Greg <2653109+glinton@users.noreply.github.com> Date: Fri, 8 Mar 2019 12:25:20 -0700 Subject: [PATCH] Fix links and add config to webhook readme (#5558) --- plugins/inputs/webhooks/README.md | 33 +++++++++++++++++++-- plugins/inputs/webhooks/filestack/README.md | 2 +- plugins/inputs/webhooks/mandrill/README.md | 2 +- plugins/inputs/webhooks/particle/README.md | 2 +- plugins/inputs/webhooks/rollbar/README.md | 2 +- plugins/inputs/webhooks/webhooks.go | 2 +- 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/plugins/inputs/webhooks/README.md b/plugins/inputs/webhooks/README.md index 13141fc4b..c6c7daf35 100644 --- a/plugins/inputs/webhooks/README.md +++ b/plugins/inputs/webhooks/README.md @@ -13,7 +13,36 @@ $ cp config.conf.new /etc/telegraf/telegraf.conf $ sudo service telegraf start ``` -## Available webhooks + +### Configuration: + +```toml +[[inputs.webhooks]] + ## Address and port to host Webhook listener on + service_address = ":1619" + + [inputs.webhooks.filestack] + path = "/filestack" + + [inputs.webhooks.github] + path = "/github" + # secret = "" + + [inputs.webhooks.mandrill] + path = "/mandrill" + + [inputs.webhooks.rollbar] + path = "/rollbar" + + [inputs.webhooks.papertrail] + path = "/papertrail" + + [inputs.webhooks.particle] + path = "/particle" +``` + + +### Available webhooks - [Filestack](filestack/) - [Github](github/) @@ -23,7 +52,7 @@ $ sudo service telegraf start - [Particle](particle/) -## Adding new webhooks plugin +### Adding new webhooks plugin 1. Add your webhook plugin inside the `webhooks` folder 1. Your plugin must implement the `Webhook` interface diff --git a/plugins/inputs/webhooks/filestack/README.md b/plugins/inputs/webhooks/filestack/README.md index 585e6f202..7af2a780d 100644 --- a/plugins/inputs/webhooks/filestack/README.md +++ b/plugins/inputs/webhooks/filestack/README.md @@ -1,6 +1,6 @@ # Filestack webhook -You should configure your Filestack's Webhooks to point at the `webhooks` service. To do this go to `filestack.com/`, select your app and click `Credentials > Webhooks`. In the resulting page, set the `URL` to `http://:1619/filestack`, and click on `Add`. +You should configure your Filestack's Webhooks to point at the `webhooks` service. To do this go to [filestack.com](https://www.filestack.com/), select your app and click `Credentials > Webhooks`. In the resulting page, set the `URL` to `http://:1619/filestack`, and click on `Add`. ## Events diff --git a/plugins/inputs/webhooks/mandrill/README.md b/plugins/inputs/webhooks/mandrill/README.md index 2fb4914e1..9c4f3a58c 100644 --- a/plugins/inputs/webhooks/mandrill/README.md +++ b/plugins/inputs/webhooks/mandrill/README.md @@ -1,6 +1,6 @@ # mandrill webhook -You should configure your Mandrill's Webhooks to point at the `webhooks` service. To do this go to `mandrillapp.com/` and click `Settings > Webhooks`. In the resulting page, click on `Add a Webhook`, select all events, and set the `URL` to `http://:1619/mandrill`, and click on `Create Webhook`. +You should configure your Mandrill's Webhooks to point at the `webhooks` service. To do this go to [mandrillapp.com](https://mandrillapp.com) and click `Settings > Webhooks`. In the resulting page, click on `Add a Webhook`, select all events, and set the `URL` to `http://:1619/mandrill`, and click on `Create Webhook`. ## Events diff --git a/plugins/inputs/webhooks/particle/README.md b/plugins/inputs/webhooks/particle/README.md index 4e3426da5..688898db0 100644 --- a/plugins/inputs/webhooks/particle/README.md +++ b/plugins/inputs/webhooks/particle/README.md @@ -1,7 +1,7 @@ # particle webhooks -You should configure your Particle.io's Webhooks to point at the `webhooks` service. To do this go to `(https://console.particle.io/)[https://console.particle.io]` and click `Integrations > New Integration > Webhook`. In the resulting page set `URL` to `http://:1619/particle`, and under `Advanced Settings` click on `JSON` and add: +You should configure your Particle.io's Webhooks to point at the `webhooks` service. To do this go to [https://console.particle.io](https://console.particle.io/) and click `Integrations > New Integration > Webhook`. In the resulting page set `URL` to `http://:1619/particle`, and under `Advanced Settings` click on `JSON` and add: ``` { diff --git a/plugins/inputs/webhooks/rollbar/README.md b/plugins/inputs/webhooks/rollbar/README.md index b3f1bfeaa..471dc9fd0 100644 --- a/plugins/inputs/webhooks/rollbar/README.md +++ b/plugins/inputs/webhooks/rollbar/README.md @@ -1,6 +1,6 @@ # rollbar webhooks -You should configure your Rollbar's Webhooks to point at the `webhooks` service. To do this go to `rollbar.com/` and click `Settings > Notifications > Webhook`. In the resulting page set `URL` to `http://:1619/rollbar`, and click on `Enable Webhook Integration`. +You should configure your Rollbar's Webhooks to point at the `webhooks` service. To do this go to [rollbar.com](https://rollbar.com/) and click `Settings > Notifications > Webhook`. In the resulting page set `URL` to `http://:1619/rollbar`, and click on `Enable Webhook Integration`. ## Events diff --git a/plugins/inputs/webhooks/webhooks.go b/plugins/inputs/webhooks/webhooks.go index fa31ec490..4baaf6ffb 100644 --- a/plugins/inputs/webhooks/webhooks.go +++ b/plugins/inputs/webhooks/webhooks.go @@ -67,7 +67,7 @@ func (wb *Webhooks) SampleConfig() string { [inputs.webhooks.particle] path = "/particle" - ` +` } func (wb *Webhooks) Description() string {