azure-monitor-datasource icon indicating copy to clipboard operation
azure-monitor-datasource copied to clipboard

Application Insights: Bad Gateway: Cannot connect to Application Insights REST API.

Open adcalsie opened this issue 7 years ago • 5 comments

Show this error when a try Save & Test the new data source to Azure Application Insights.

"1. Application Insights: Bad Gateway: Cannot connect to Application Insights REST API."

adcalsie avatar Mar 06 '18 16:03 adcalsie

Could it be something do with your firewall or VPN?

Can you reach https://api.applicationinsights.io/ - it should show the following message:

{"error":{"message":"The requested path does not exist","code":"PathNotFoundError"}}

daniellee avatar Mar 08 '18 08:03 daniellee

The communications are correct, when connecting with the url that message is shown.

Does the error may be due to the volume of data in app insights? Last month was 15 Gb.

adcalsie avatar Mar 13 '18 13:03 adcalsie

I am getting the same error, the Grafana logs print "2018/06/07 11:07:10 http: proxy error: remote error: tls: access denied" I tried to add https://api.applicationinsights.io:443 to the config file [security] data_source_proxy_whitelist but it didn't help

full log ←[32mINFO←[0m[06-07|11:07:09] Requesting ←[32mlogger←[0m=data-proxy-log ←[32murl←[0m=https://api.applicationinsights.io/beta/apps/537b8538-3925-48e7-88ea-5937660e2405/metrics/metadata 2018/06/07 11:07:10 http: proxy error: remote error: tls: access denied ←[32mINFO←[0m[06-07|11:07:10] Request Completed ←[32mlogger←[0m=context ←[32muserId←[0m=1 ←[32morgId←[0m=1 ←[32muname←[0m=admin ←[32mmethod←[0m=GET ←[32mpath←[0m=/api/datasources/proxy/3/appinsights/beta/apps/537b8538-3925-48e7-88ea-5937660e2405/metrics/metadata ←[32mstatus←[0m=502 ←[32mremote_addr←[0m=[::1] ←[32mtime_ms←[0m=456 ←[32msize←[0m=0 ←[32mreferer←[0m=http://localhost:8080/datasources/edit/3

asaflevi1983 avatar Jun 07 '18 08:06 asaflevi1983

UPDATE: I installed Grafana on azure ubuntu VM and the issue didn't reproduce

asaflevi1983 avatar Jun 07 '18 12:06 asaflevi1983

I have the same with a on prem server behind firewall. Tested https://management.azure.com https://api.applicationinsights.io I can open both url's fine from that server. Any hint?

biohazardxxx avatar Aug 21 '18 14:08 biohazardxxx