Tips for webhook debugging?

Hmm... Looks like your target site is down?

dig rpt.clarity.com

; <<>> DiG 9.8.3-P1 <<>> rpt.clarity.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 22984
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;rpt.clarity.com.		IN	A

;; AUTHORITY SECTION:
clarity.com.		51	IN	SOA	ns1.p14.dynect.net. hostmaster.clarity.com. 2012264626 3600 600 604800 60

;; Query time: 27 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Oct  7 15:54:57 2015
;; MSG SIZE  rcvd: 98
$ ping -a rpt.clarity.com
ping: cannot resolve rpt.clarity.com: Unknown host

Sounds like a DNS issue?

Thanks,
David

Hmm, double-checking this, I don’t see any hooks anywhere registered to anything at clarity.com, what url are you hitting?

Thanks,
David

Hi @sjaybach,

Ahh, cool, thanks!

It looks like the hook is getting reporting that SSL certificate as being untrusted for some reason. I just ran the site through ssllabs.com validator and got a failed report from the server.

https://www.ssllabs.com/ssltest/analyze.html?d=rpt.clarity-iq.com

If you want your hook to ignore a bad SSL certificate, you can add a parameter to it when creating it:

#add this to your hook

rejectUnauthorized: false

edit: It’s possible we might be missing a newer Certificate authority, but you should definitely also checkout the ssllabs report when you have time, it’s important to keep up on changes to SSL too. I hope that helps! :slight_smile:

Thanks!
David

Ahh, I thought originally that it was either a CORS, SSL, or Remote Database Access Hosts issue with my database. Now we know. Thank you for looking and providing a work around until I can get the SSL properly registered.
I will update everyone on how this works.
Sam

1 Like

Okay, this works. Note that I have one hook called "breathe" and I have two devices (a photon sending the event name "breathe" and an electron sending the event name "breathe2"). "breathe" responds to both "breathe" and "breathe2". I did not know if this was your intent.

Regardless, I have to call it a success for an electron to dutifully log data directly into my database every so many minutes. Great work guys!

2 Likes

Hi @sjaybach,

Glad it’s working again for ya! The webhook event name filters are ‘prefix’ filters, so any event starting with your filtered event name will be included. :slight_smile:

Thanks,
David

A friend just pointed me at testssl.sh as a tool like the ssllabs validator, but with source code and local execution. Thought I’d pass on the tip.

1 Like