Ad Widget

Collapse

1.4: Problems with web monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bobrivers
    Senior Member
    • Feb 2007
    • 115

    #1

    1.4: Problems with web monitoring

    Hi,

    I have a website that requires authentication. If I access it (using firefox or ie) through this url (https://www.mysite.com/login/loginFE...gin&pwd=mypwd), I'm able to gain access to the restricted area.

    So, I configured a scenario for web monitoring doing the following:

    Application: web
    Name: mysite
    Update: 30
    Agent: Firefox Win & IE 6
    Variables: {login}=mylogin
    {pwd}=mypwd

    Steps:

    Name: mypage
    URL: http://www.mysite.com/login/loginFE.do
    Post: login={login}&pwd={pwd}
    Timeout: 15
    Required: Welcome
    Status code: 200

    But it isn't working. It shows: "Error: Page didn't match". So I think that zabbix isn't authenticated.

    I also tried to use curl directly from console (curl http://www.mysite.com/login/loginFE....gin&pwd=mypwd), and I could see that the retrived page isn't the authenticated page. So this is why zabbix didn't found "Welcome".

    Am I missing something? Does anybody got success accessing autheticated content?

    Zabbix works fine if I try to monitor "regular" content (not authenticated). Even when I use required strings.

    TIA,

    Bob
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    It seems you're doing everything correctly. I'm not sure about using of POST variable, shouldn't it be GET variables like this:

    http://www.mysite.com/login/loginFE.do?login=me&pwd=mypwd
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • bobrivers
      Senior Member
      • Feb 2007
      • 115

      #3
      More tests

      Hi,

      I changed the steps. First I tried to get rid of the variables, passing login=mylogin&pwd=mypwd directly in the post. Same error.

      Then I changed the url to http://.../loginFE.do?login=mylogin&pwd=mypwd and it didn't worked also...
      Last edited by bobrivers; 01-06-2007, 13:42. Reason: False alarm...

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Note that you may use macros in the URL as well. Perhaps the WEB page requires something else? Maybe you have some cookies on your WEB browser side which help?
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • qix
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2006
          • 423

          #5
          Hello Alexei,

          I'm having a look at 1.4.1.
          I've tried using the {HOSTNAME} and {IPADDRESS} macros in the url, but I get the message that the hostname can not be resolved.

          When I put {IPADDRESS}=x.x.x.x in the variable field, it works fine.

          I would like to make an Application template that monitors certain website responses on a host so I can apply that template on multiple hosts.
          It would be great if I could use the already set DNS name for the specific host for this.

          Any idea on how I can do this without editing the web monitoring for each host by hand?

          Thanks in advance,
          With kind regards,

          Raymond

          Comment

          • ahanson
            Junior Member
            • Sep 2007
            • 15

            #6
            This is something of interest to me as well. I have about 80 web servers, and I want to test them all in basically the same way. It would be really useful to use the {IPADDRESS} variable here.

            Comment

            • gelowe
              Member
              • Jun 2008
              • 30

              #7
              I think I have a solution for you

              If you append a ? at the end of your URL I bet it will work.

              Name: mypage
              URL: http://www.mysite.com/login/loginFE.do?
              Post: login={login}&pwd={pwd}

              So far it looks like the Zabbix web monitoring does not to true posts. I am still trying to find out why.

              Comment

              Working...