Forum Discussion

breizho35_11667's avatar
breizho35_11667
Icon for Nimbostratus rankNimbostratus
May 07, 2010

how to do xml parsing with moinitor ?

Hello,

 

 

I want to make a monitor carrying a xml parsing on a remote server.

 

The bigip is it intended to do that ?

 

If yes, can you give me an example syntax ?

 

 

Thank you in advance for your help.

 

 

bzh

 

9 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    You should be able to do this using perl. The perl installation has a couple of XML modules installed on it.

     

     

    For examples, have a look at http://www.cpan.org/

     

     

    H
  • Hello,

     

    Thank you for your reply and sorry I was not there for a few days.

     

     

    Could you provide me a sample script that would do that ?

     

     

    I am not familiar with perl but I adjust it if necessary.

     

     

    Thank you in advance

     

     

    BZH
  • Here is a template external monitor which calls a bash script to perform the monitoring requests:

     

     

    http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/TemplateForExternalLtmMonitors.html

     

     

    You could use that with this Perl example to build your monitor:

     

     

    http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/NetSoapMonitor.html

     

    http://devcentral.f5.com/Portals/0/Repository/soapnet-monitor.pl.tar.2902badc-15b4-4128-a83c-6cf874cc3852.gz

     

     

    Aaron
  • BZH,

     

     

    can you post sample xml from the server and let us know under what condition you want to mark the server up/down?

     

     

    You can also explore of using xmllint from bash script. For more info, you can go to http://xmlsoft.org/xmllint.html.
  • Hi,

     

    Thank you for your explanations, these scripts are very interesting.

     

     

    The core functionality of parsing file should be sufficient to my needs but the bigip appears to limit the parsing of file to a number of characters. Looking for ways to increase this size, perhaps with a script ...

     

     

    eric

     

  • With a default monitor, there's a hardset limit of 5120 bytes of response headers/content that will be checked. If you need to look further in the response than this, you'll need to use an external monitor.

     

     

    Aaron
  • Hi !

     

    thank you, that's what I think without really knowing

     

     

    I manage to use external monitors but I do not see how to set arguments (ipNode, port, textToSearch). I try to fill the line "arguments" by "NODE_IP NODE_PORT ServiceAuthentication" but without success, the monitors are still red.

     

     

    Eric