Ad Widget

Collapse

Web service (SOAP) monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maruta
    Junior Member
    • Sep 2009
    • 1

    #1

    Web service (SOAP) monitoring

    Is it possible to monitor SOAP messages.

    Sending XML requests via Zabbix system and get an answer. And received answer i want store in zabbix data base for some time or Zabbix can verify the correctness of the answer XML information.

    If this action in Zabbix system is possible to do so maybe someone could give some examples.
  • getUP
    Member
    • Jun 2006
    • 34

    #2
    I am looking for exactly the same. It doesn't seem possible with Zabbix at the moment? We need to adjust the POST headers as well.

    Comment

    • exkg
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified Specialist
      • Mar 2007
      • 718

      #3
      My two cents ...

      ZABBIX can't do it alone, a think 'xmlstarlet' can help, maybe as a 'External Check'.

      Code:
      NAME
             xmlstarlet - command line XML/XSLT toolkit
      
      SYNOPSIS
             xmlstarlet [<options>] [<command>] [<cmd-options>]
      
      INTRODUCTION
             XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit
             XML documents and files using simple set of shell commands in similar way it is done for plain text files using
             UNIX grep, sed, awk, diff, patch, join, etc commands. This set of command line utilities can be used by those
             who deal with many XML documents on UNIX shell command prompt as well as for automated XML processing with
             shell scripts.
      --
      Luciano Alves
      www.zabbix.com
      Brazil | México | Argentina | Colômbia | Chile
      Zabbix Performance Tuning

      Comment

      • bwlang
        Junior Member
        • Jun 2010
        • 1

        #4
        I've come up with this simple curl script to monitor my SOAP items

        I like it because :
        it works...

        I don't like it because:
        the script has the POST data shoved into a variable
        it's invisible to the UI
        It's not integratable with the web testing stuff

        It sure would be nice to add a content-type field to
        httpstep so that SOAP testing could integrate well with web scenarios.

        see sourceforge feature request 378686

        Code:
        #!/bin/sh
        XML_POST_DATA='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://tempuri.org/ws/GetConnectionString">   <soapenv:Header/>   <soapenv:Body>     ...</soapenv:Body></soapenv:Envelope>'
        CONNSTRPATH='/ws/someservice.asmx'
        URL=https://somehost/$CONNSTRPATH
        
        curl -s --data-binary "$XML_POST_DATA" -H"Content-Type: text/xml" $URL | grep -c 'some required text')

        Comment

        • notnightman
          Junior Member
          • Apr 2013
          • 10

          #5
          Has anyone tried using Zabbix trapper with Zabbix_sender?
          I think a script to do the post using cURL or wget, then use zabbix_sender to insert the statistics into zabbix would work.

          Its not the ideal solution, but its an option.

          Its hard to believe zabbix can do so many things, but web service checks with modified header values isn't one of them.

          Comment

          • mohsenrahimi
            Junior Member
            • Jun 2013
            • 4

            #6
            is there a new way to monitor webservices in recent version?
            can we use Web monitor to monitor webservices?
            if so, how could we set HTTP header?

            Best Regards
            Mohsen

            Comment

            • notnightman
              Junior Member
              • Apr 2013
              • 10

              #7
              This doesn't seem to be part of 2.0.6 and based on the manual for 2.2, the ability to post empty strings, check preform digest authentication or modify http headers won't be included there either

              Comment

              • mohsenrahimi
                Junior Member
                • Jun 2013
                • 4

                #8
                so then what is the best practice to monitor a web service (call a method and verify the result)?

                Comment

                • simonquentel
                  Member
                  • Mar 2013
                  • 49

                  #9
                  I agree that it would be great to have SOAP queries available directly in zabbix, just like web monitoring is included now.

                  Having a script running and sending the data through Zabbix_sender is a work around but given that web services are quite normalized and widespread that would be nice not to have to write and maintain scripts out of zabbix front-end!

                  Comment

                  • mohsenrahimi
                    Junior Member
                    • Jun 2013
                    • 4

                    #10
                    Web Service monitoring

                    I added the ability of Web Service monitoring to Zabbix, by modifying Zabbix source. Now you can set HTTP Header too (multiple header is also possible), when you configure a web monitoring step and it works just fine .
                    I modified version 2.0.8

                    Comment

                    • notnightman
                      Junior Member
                      • Apr 2013
                      • 10

                      #11
                      This is great news! I've been using shell scripts and zabbix_sender to get these checks working.

                      Would you mind sharing the steps to make this work?

                      Comment

                      • mohsenrahimi
                        Junior Member
                        • Jun 2013
                        • 4

                        #12
                        Originally posted by notnightman
                        This is great news! I've been using shell scripts and zabbix_sender to get these checks working.

                        Would you mind sharing the steps to make this work?
                        Sure I attached the modifications, you should find and replace the files in frontend and source code (you need to build the zabbix_server).
                        also you need to modify httpstep table in database too
                        "alter table httpsep add header varchar(500) not null default('')"

                        after doing all of this modifications, you will see header Textarea in config Steps.
                        you can add multiple Headers but each header should be in new line.
                        Good Luck
                        Mohsen
                        Attached Files
                        Last edited by mohsenrahimi; 09-09-2013, 11:03.

                        Comment

                        • mwtzzz
                          Junior Member
                          • Nov 2013
                          • 5

                          #13
                          Has anyone updated this for 2.2.0? The 2.2.0 code is substantially different than 2.0.9 and the patches given here won't work in 2.2.0.

                          I'm taking a stab at it, but looks like it's pretty involved with the configuration.httpconf.edit.php file, and probably equally involved with some of the others.

                          Comment

                          • mamux
                            Junior Member
                            • Jan 2010
                            • 7

                            #14
                            Zabbix 2.2.2 web headers (and more) patch

                            Hi,

                            I have published a patch that apply to 2.2.x version, and add some additional simple features.
                            You can find it at http://mamux.org/?p=453

                            Best regards

                            Comment

                            Working...