Check_http with proxy
Posted: Mon Dec 07, 2015 5:50 pm
Hello,
I am trying to setup a check_http and check_https with proxy authentication.
I have seen that check_http is expected to support proxy with -b parameters.
However packet capture confirmed that it is not using proxy.
here:
[lxadmin@ymq-lpnagapp1 ~]$ nslookup http://www.lemonde.fr
Server: 172.26.64.81
Address: 172.26.64.81#53
Non-authoritative answer:
http://www.lemonde.fr canonical name = http://www.lemonde.fr.2-01-271d-000d.cdx.cedexis.net.
http://www.lemonde.fr.2-01-271d-000d.cdx.cedexis.net canonical name = wac.3604.edgecastcdn.net.
wac.3604.edgecastcdn.net canonical name = gp1.wac.edgecastcdn.net.
Name: gp1.wac.edgecastcdn.net
Address: 72.21.91.8
[lxadmin@ymq-lpnagapp1 ~]$
[lxadmin@ymq-lpnagapp1 ~]$ /usr/local/nagios/libexec/check_http -H http://www.lemonde.fr -b USER:PASS@proxy
HTTP OK: HTTP/1.1 200 OK - 406317 bytes in 0.137 second response time |time=0.136517s;;;0.000000 size=406317B;;;0
[lxadmin@ymq-lpnagapp1 ~]$
[lxadmin@ymq-lpnagapp1 ~]$ sudo tcpdump -i eth0 host 72.21.91.8
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
17:46:44.736973 IP ymq-lpnagapp1.corp.ad.iata.org.44564 > 72.21.91.8.http: Flags , seq 2701623995, win 14600, options [mss 1460,sackOK,TS val 2088361543 ecr 0,nop,wscale 7], length 0
17:46:44.747860 IP 72.21.91.8.http > ymq-lpnagapp1.corp.ad.iata.org.44564: Flags [S.], seq 1784666919, ack 2701623996, win 65535, options [mss 1380,sackOK,TS val 192948574 ecr 2088361543,nop,wscale 9], length 0
17:46:44.747885 IP ymq-lpnagapp1.corp.ad.iata.org.44564 > 72.21.91.8.http: Flags [.], ack 1, win 115, options [nop,nop,TS val 2088361554 ecr 192948574], length 0
17:46:44.747983 IP ymq-lpnagapp1.corp.ad.iata.org.44564 > 72.21.91.8.http: Flags [P.], seq 1:228, ack
I am running Nagios XI 5.2.2
Could you please assist ?
Thank you Igor
I am trying to setup a check_http and check_https with proxy authentication.
I have seen that check_http is expected to support proxy with -b parameters.
However packet capture confirmed that it is not using proxy.
here:
[lxadmin@ymq-lpnagapp1 ~]$ nslookup http://www.lemonde.fr
Server: 172.26.64.81
Address: 172.26.64.81#53
Non-authoritative answer:
http://www.lemonde.fr canonical name = http://www.lemonde.fr.2-01-271d-000d.cdx.cedexis.net.
http://www.lemonde.fr.2-01-271d-000d.cdx.cedexis.net canonical name = wac.3604.edgecastcdn.net.
wac.3604.edgecastcdn.net canonical name = gp1.wac.edgecastcdn.net.
Name: gp1.wac.edgecastcdn.net
Address: 72.21.91.8
[lxadmin@ymq-lpnagapp1 ~]$
[lxadmin@ymq-lpnagapp1 ~]$ /usr/local/nagios/libexec/check_http -H http://www.lemonde.fr -b USER:PASS@proxy
HTTP OK: HTTP/1.1 200 OK - 406317 bytes in 0.137 second response time |time=0.136517s;;;0.000000 size=406317B;;;0
[lxadmin@ymq-lpnagapp1 ~]$
[lxadmin@ymq-lpnagapp1 ~]$ sudo tcpdump -i eth0 host 72.21.91.8
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
17:46:44.736973 IP ymq-lpnagapp1.corp.ad.iata.org.44564 > 72.21.91.8.http: Flags , seq 2701623995, win 14600, options [mss 1460,sackOK,TS val 2088361543 ecr 0,nop,wscale 7], length 0
17:46:44.747860 IP 72.21.91.8.http > ymq-lpnagapp1.corp.ad.iata.org.44564: Flags [S.], seq 1784666919, ack 2701623996, win 65535, options [mss 1380,sackOK,TS val 192948574 ecr 2088361543,nop,wscale 9], length 0
17:46:44.747885 IP ymq-lpnagapp1.corp.ad.iata.org.44564 > 72.21.91.8.http: Flags [.], ack 1, win 115, options [nop,nop,TS val 2088361554 ecr 192948574], length 0
17:46:44.747983 IP ymq-lpnagapp1.corp.ad.iata.org.44564 > 72.21.91.8.http: Flags [P.], seq 1:228, ack
I am running Nagios XI 5.2.2
Could you please assist ?
Thank you Igor