Ad Widget

Collapse

Web monitoring - http headers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hannibal20
    Junior Member
    • Jan 2007
    • 22

    #1

    Web monitoring - http headers

    Hi,

    I have to monitor a picky webapp. It's a java app, reachable via HTTP. It expects a POST with Content-Type with one of the following:
    - 'application/soap+xml'
    - 'text/xml'
    - 'multipart/related'

    Zabbix queries the webapp with a POST, which content type is set to 'application/x-www-form-urlencoded' (the default from libcurl), and the app responds with an error because of the content-type header.

    Is there a possibility to add custom headers to httpstep or httptest? libcurl is very flexible in that matter (http://curl.haxx.se/libcurl/c/curl_e...LOPTHTTPHEADER). It could be a simple field where one could insert his own headers, ie:
    - tell the app what is the content-type of the POST
    - pass a custom Host/Accept string
    - pass a custom X-* header to tell the app to make some assumptions
    - etc
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    I see this as being useful for more people in the longterm.

    It's probably relevant to open a request in the Tracker

    Comment

    • cferraro
      Junior Member
      • Jun 2011
      • 16

      #3
      Here are 2 feature requests related to adding additional curl support





      Vote them up if they are important to you.

      Comment

      • zabbix_zen
        Senior Member
        • Jul 2009
        • 426

        #4
        Already did it,
        a long time ago

        Comment

        • fpaternot
          Member
          Zabbix Certified Specialist
          • Feb 2013
          • 52

          #5
          +1

          Looking for this feature too ;
          i want to change the http header request so i can fetch a website healthcheck and give the webserver the vhost i should be coming from
          I say should because i'm really not. The vhost is loadbalanced and i want to monitor all webservers, not just the delivery of the content from the loadbalancer.


          Code:
          ~$ curl -H 'Host: my.vhostsome.domain.com' http://webserver:8000/healthcheck
          <html>
          <body>
          WORKING
          </body>
          </html>
          
          ~$ curl http://webserver:8000/healthcheck
          <html>
          <head><title>400 Bad Request</title></head>
          <body bgcolor="white">
          <center><h1>400 Bad Request</h1></center>
          <hr><center>nginx</center>
          </body>
          </html>
          ~$

          Comment

          Working...