How to check the details of webhook call?

SonarQube:   Community Edition Version 8.4 (build 35506)

the webhook works well for nearly three months. Recently it failed with “Server Unreachable” info displayed on UI.

I add the same webhook url with IP format, then it works. But the same URL in domain format still failed.

Finally, I restart sonar. Then both of the two webhooks work.

Is the anyway that I can see the details of webhook request?

Hi @gebitang,

Yes, you can get some logs, although they are not very verbose for the Webhooks. To enable them, you must set the Compute Engine verbosity to DEBUG. Add the following to your $SQ_HOME/conf/sonar.properties file:

sonar.log.level.ce=DEBUG

You can then see the error in $SQ_HOME/logs/ce.log.

Hope this helps.

Thanks. It works. debug log is something like:

2020.10.21 10:30:15 DEBUG ce[AXVI_gynQqxgVa12m-LG][o.s.s.w.WebHooksImpl] Sent webhook 'su-result' | url=http://su.mycallback.com/su/result | time=655ms | status=200

I changed log level for app sonar.log.level.app=DEBUG, and it didn’t work. So, webhook handler belongs to Compute Engine, I guess.

It does. And like I said, it’s not very verbose :man_shrugging:. But at least, it can give you the HTTP status, or a short error description (like “timed out”). Hope this will help you if it ever happens again.