Ad Widget

Collapse

Do Zabbix web checks download included JS / CSS / Images

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NotTheFace
    Junior Member
    • Feb 2012
    • 10

    #1

    Do Zabbix web checks download included JS / CSS / Images

    Hi All,

    Do the Zabbix web checks download included JavaScript / CSS / Images etc in the HTML or does it just download the HTML.

    Thanks
  • Predatorian
    Junior Member
    • Apr 2013
    • 12

    #2
    I am also wondering the same thing. From what I understand, the way that JavaScript works, and why it is a bit hard to monitor it compared to HTML, is that it executes client side instead of server side.

    When you 'curl' something, which is what Zabbix uses to do its web checks, correct me if I'm wrong, it doesn't show the JavaScript, or if it loaded when you started the page.

    Is it possible to use a browser like w3m on a *nix box, and have the Zabbix Agent look for JavaScript executing on that client?
    Last edited by Predatorian; 15-07-2013, 17:37. Reason: Came up with a new idea.

    Comment

    • nobody
      Junior Member
      • Jul 2013
      • 17

      #3
      I'm pretty sure web monitor downloads the file that you point at it, however it can't interpret script as it is just plain text as far as it cares. You can check the contents of the javascript file if you want to; any javascript including in, say index.php, will show up and can be checked with Zabbix. Some of it however doesn't work, I find using values like "<title>" in my Required String causes it to fail.

      To find out exactly what it does, run wireshark on your host with dest port 80, and go to a plain text website which has the files that you want. Check to for GET REQUESTS for a specific file.

      Next set up Zabbix to do the same thing, run tcpdump or the like on the zabbix agent (if it's installed on a linux box) and monitor it for the same GET REQUEST.

      tcpdump -nAvvvs0 'host 127.0.0.1 and dstp 80' | less
      Should reveal all of the packet data in ASCII and be very verbose.
      Last edited by nobody; 17-07-2013, 21:32. Reason: Clarification, could be interpreted wrong.

      Comment

      Working...