Ad Widget

Collapse

HTTP Header check (Beginner)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tzzui
    Junior Member
    • Sep 2020
    • 18

    #1

    HTTP Header check (Beginner)

    [Disclaimer: Started training to be an IT systemintegrator this month with no prior knowledge]

    Hey,

    i just managed to upgrade our Zabbix server to the latest version and now I'm supposed to monitor a few of our websites through HTTP headers.
    I'm not sure where to start and I couldnt really find any guides/tutorials on this.

    I have successfully monitored one of our websites using Web scenarios, by looking for a certain string/word within a body of text. Now I should only check if Zabbix can find the http header.

    (My first question would be wether I should be using Web scenario or HTTP agent and kinda where to go from there.) I'm pretty sure it's HTTP agent and request type HEAD. I'm completely lost when it comes to the Key input though. I have no idea what Zabbix wants from me here and the "Select" button is greyed out as well. Zabbix documentations says: "The supported item keys can be found in individual item type sections." There's not a single key listed on the HTTP agent documentation page. Not even the one they are using as an example?!

    Any help is much appreciated.

    Kind regards
    tzzui


    Last edited by tzzui; 29-09-2020, 15:54.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Using an http agent check and sending a HEAD request may indeed work. I wouldn't have thought to try that, as I probably would have started with a Web scenario.

    Unlike with the Zabbix agent, where the agent understands a well-defined set of item keys (and those keys are documented), it appears that for the http agent you just make up a unique item key. That seems a bit weird, but that appears to be what's done in the examples on that page (look at example 3 and example 4, too). Try make up one that makes sense to you, something like http_agent_check_header

    Comment

    • tzzui
      Junior Member
      • Sep 2020
      • 18

      #3
      Originally posted by tim.mooney
      Using an http agent check and sending a HEAD request may indeed work. I wouldn't have thought to try that, as I probably would have started with a Web scenario.

      Unlike with the Zabbix agent, where the agent understands a well-defined set of item keys (and those keys are documented), it appears that for the http agent you just make up a unique item key. That seems a bit weird, but that appears to be what's done in the examples on that page (look at example 3 and example 4, too). Try make up one that makes sense to you, something like http_agent_check_header
      I couldn't find an option to use HEAD requests with a Web scenario. The HTTP agent seems to work fine. I get a 200 status code and the content of the header back. Yeah i figured that i just have to make those ekys up and it works.


      I have another question though:

      Is there an easy way to monitor web services? I only need to know wether it's running or not. I don't have any information about the service other than its address.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Web scenarios, may not allow HEAD (not sure, I haven't set one up recently), since they're designed to be a full-featured monitoring method for web sites.

        If you only care about whether something's running/listening, and not whether it's actually functioning correctly, then a net.tcp.port[] check to see if the port is listening might be enough. Otherwise, if the agent is installed on the server(s) where the web service is running, you could use a proc.num[] check.

        Really, though, a web scenario is probably what you want to use.

        Comment

        Working...