Ad Widget

Collapse

Time to First byte statistics availability on zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbixrp2014
    Junior Member
    • Apr 2014
    • 1

    #1

    Time to First byte statistics availability on zabbix

    Hi All,

    I am new to zabbix. we are using web monitoring facility and i wanted to know that is there a way to implement and retrieve the time to first byte (TTFB) statistics for particular web site on zabbix.

    THANKS
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    1.) download source code
    2.) change code for web monitoring - file httptest.c https://www.zabbix.org/websvn/wsvn/z...ler/httptest.c
    Code:
    if (CURLE_OK != (err = curl_easy_getinfo(easyhandle, CURLINFO_TOTAL_TIME, &stat.total_time)) &&
    change:
    Code:
    if (CURLE_OK != (err = curl_easy_getinfo(easyhandle, CURLINFO_STARTTRANSFER_TIME, &stat.total_time)) &&
    3.) compile and use it - with this code Zabbix collects time to first byte, instead of total time

    You can add more your code lines (if you want to preserve also total time. or you want to use starttransfer time only for selected web sites, ...) or you can use custom script (if you have worries about code change), but this is IMHO the best hack for you.

    Reference to used libcurl: http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    Working...