ugoviti / zabbix-templates

Misc self made Zabbix templates
48 stars 42 forks source link

about Zabbix Template URL Monitor to visit url under cloudflare #15

Open gmicroul opened 3 weeks ago

gmicroul commented 3 weeks ago

in prometheus can use UserAgent as below to visit cloudflare protected sites but zabbix7.0 can not. May i know if can help on it?

Zabbix Template URL Monitor

define custom curl User-Agent header

curlUserAgent="Mozilla/5.0 (compatible; Zabbix-URL-Monitor/$version;)"

curlUserAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36 Edg/103.0.1264.49"

default arguments passed to the curl command

force http 1.1 protocol (avoid error 92 when testing cloudflare protected sites)

curlArgs="--http1.1"

And test command in console, can receive the http code

200;4.164968root@8272207db854:/# ^C_

ugoviti commented 3 weeks ago

Hi,

in prometheus can use UserAgent as below to visit cloudflare protected sites but zabbix7.0 can not. May i know if can help on it?

with zabbix 7 what error do you get?

can explain better?

thank you

gmicroul commented 3 weeks ago

Sorry, may be it is not UserAgent issue but Frontend can not receive the data. Please help to test the url. Thank you so much.

root@8272207db854:/# /etc/zabbix/scripts/url-monitor.sh url.monitor https://flybace.com { "data": [{ "http_code": 200, "time_total": 5.130255, "ssl_time_expire": 1730792699, "ssl_time_left": 1028784 }] }

image
gmicroul commented 2 weeks ago
image