Forum Discussion
breizho35_11667
Nimbostratus
May 07, 2010how 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
Cirrocumulus
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 - breizho35_11667
Nimbostratus
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 - breizho35_11667
Nimbostratus
Can you tell me where and how to execute a script monitoring ?
BZH - hoolio
Cirrostratus
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 - hwidjaja_37598
Altostratus
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. - breizho35_11667
Nimbostratus
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 - hoolio
Cirrostratus
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 - breizho35_11667
Nimbostratus
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 - breizho35_11667
Nimbostratus
Hi Aaron,
I have find it, all is ok now, thank you for your help !
Eric
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects