502 bad Gateway


#1

Hi Team,

I have installed latest version of grafana-5.4.2 and integrated with nagios core using PNP datasource. I am getting following error 502 bad gateway while adding pnp datasource. Please help me in order to resolve this issue.
I already use the same setup on other server and it’s working fine.

t=2019-02-13T18:06:37+0400 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/2/index.php/api status=502 remote_addr=“IP Addresses” time_ms=30001 size=0 referer=https://Grafana-URL/datasources/edit/2
t=2019-02-13T18:07:40+0400 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/2/index.php/api status=502 remote_addr=“IP Addresses” time_ms=30001 size=0 referer=https://Grafana-URL/datasources/edit/2

Regards,
rlinux57


#2

Hi,

I have sorted out the issue by myself by adding URL entry for localhost in /etc/hosts file.

Regards,
rlinux57