MONITOR_RULE_TYPE_NONE

Hi again,

I see that in the sdk there is a LocalLBMonitorRuleType called “MONITOR_RULE_TYPE_NONE”.

Explanation in sdk for this is as follows:

“The object is explicitly set to disable monitoring, i.e. no explicit nor default monitor in use.”

This makes sense when you want to temporarily disable the set of monitors on a pool instead of removing them all together and readding them.

In the GUI under pools->advanced configuration->Availability Requirement , I see that you can set monitor type to “ALL” or "AT LEAST " where you set to a number.

I could create monitors of type “undefined”,“and_list”,“m_of_n” and “single” through the GUI by playing with the availability requirement.

How can I create a mon association through the GUI so that it has type “MONITOR_RULE_TYPE_NONE”, i.e. how can I disable monitors on a given pool?

Lerna

Sorry for the delay in getting the response posted. I needed to verify some details before getting a response.

Anyways, the MonitorRuleType::MONITOR_RULE_TYPE_NONE actually should only be returned from get_monitor_association( ). MonitorRuleType::MONITOR_RULE_TYPE_UNDEFINED is used to indicate an uninitialized state. They are NOT meant to be used to disable monitoring. I’ll update the iControl SDK documentation to clearly indicate this, and will update the iControl code to raise an exception when these monitor rule types are passed in to the set_monitor_association( ).

Currently, one has to remove the monitor associations to disable monitoring, and re-add them to enable monitoring. You can do this in iControl using the remove_monitor_association and set_monitor_association methods respectively.

The health monitor system design is such that there’s no way to temporarily disable monitoring on an object without removing the monitor associations first. I’ll enter a request for this enhancement.

Regards,

Loc

As an update to my last post, although generally you’ll have to remove the association to disable monitoring and re-add the association to re-enable monitoring (and this is true for the pool), you can also theoretically temporarily disable monitoring by disabling the monitor template. For example, from the CLI, you can do this by “bp monitor http instance disable”, or with iControl, use the Monitor::set_template_state (DISABLED). This will disable monitoring of all the affected objects that are using the “http” monitor template.

Or, as an alternative, you can specifically disable certain monitor instances by using the “bp monitor http instance x.x.x.x:y disable” from the CLI, or using the Monitor::set_instance_state ( ).

Regards,

Loc

Alright.

As a separate issue with monitors I am getting a weird error while trying to get all monitors that are created on an F5. I invoke get_template_list() method on a LocalLBMonitorBindingStub obj and get this error:

{WebServices - Axis}stackTrace:java.lang.IllegalArgumentException

at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:176)

at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)

at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)

at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)

at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:347)

at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)

at org.apache.axis.client.Call.invoke(Call.java:2437)

at org.apache.axis.client.Call.invoke(Call.java:2336)

at org.apache.axis.client.Call.invoke(Call.java:1793)

at iControl.LocalLBMonitorBindingStub.get_template_list(LocalLBMonitorBindingStub.java:908)

at lbControl.Test.main(Test.java:35)

where line 35 in Test.java is:

m_monitor.get_template_list();

m_monitor is a LocalLBMonitorBindingStub obj and it binds fine since I can invoke other methods on it and get their results without issues. Any idea what is causing this problem?

Lerna

Any news on this one?

Lerna

I’m not sure why you’re getting this error, but it looks like a client-side deserialization error from Apache Axis toolkit. I’ve been running get_template_list method over and over, and there seems to be no problem.

This is what the actual XML payloads look like for both the request and response. Can you check to see if you’re getting something similar to this?

=====================

REQUEST

=====================

POST /iControl/iControlPortal.cgi HTTP/1.1

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.0.3705.6018)

Content-Type: text/xml; charset=utf-8

SOAPAction: “urn:iControl:LocalLB/Monitor”

Authorization: Basic YWRtaW46YWRtaW4=

Content-Length: 496

Expect: 100-continue

Host: localhost:8080

xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/”

xmlns:tns=“urn:iControl”

xmlns:types=“urn:iControl/encodedTypes”

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

=====================

RESPONSE

=====================

HTTP/1.1 100 Continue

HTTP/1.0 200 OK

Date: Tue, 13 Sep 2005 20:40:45 GMT

Server: Apache

Set-Cookie: BIGIPAuthCookie=368F251F0C5DBA5780F668F2C9FBB18A6FBA8ED4; path=/; Secure;

SOAPServer: EasySoap++/0.6

Connection: close

Content-Type: text/xml; charset=“UTF-8”

xmlns:E=“http://schemas.xmlsoap.org/soap/envelope/”

xmlns:A=“http://schemas.xmlsoap.org/soap/encoding/”

xmlns:s=“http://www.w3.org/2001/XMLSchema-instance”

xmlns:y=“http://www.w3.org/2001/XMLSchema”

xmlns:iControl=“urn:iControl”

E:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>

xmlns:m=“urn:iControl:LocalLB/Monitor”>

s:type=“A:Array”

A:arrayType=“iControl:LocalLB.Monitor.MonitorTemplate[28]”>

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>none

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_NONE

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>icmp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_ICMP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>gateway_icmp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_GATEWAY_ICMP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>tcp_echo

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_TCP_ECHO

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>tcp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_TCP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>tcp_half_open

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_TCP_HALF_OPEN

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>http

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_HTTP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>external

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_EXTERNAL

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>udp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_UDP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>ftp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_FTP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>nntp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_NNTP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>pop3

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_POP3

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>smtp

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_SMTP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>imap

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_IMAP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>radius

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_RADIUS

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>ldap

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_LDAP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>mssql

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_MSSQL

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>oracle

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_ORACLE

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>scripted

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_SCRIPTED

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>wap

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_WAP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>wmi

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_WMI

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>real_server

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_REAL_SERVER

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>snmp_dca

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_SNMP_DCA

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>snmp_dca_base

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_SNMP_DCA_BASE

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>https

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_HTTPS

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>sip

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_SIP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>soap

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_SOAP

s:type=“iControl:LocalLB.Monitor.MonitorTemplate”>

s:type=“y:string”>https_443

s:type=“iControl:LocalLB.Monitor.TemplateType”>TTYPE_HTTPS

I ran ssldump on the F5 and captured the request/response pair for get_template_list. It is quite similar to what you had. I replaced all the axis related jars with the latest from apache site. I still get the same error. I do not see how this is an issue with the axis toolkit deserializer since I can successfully invoke get_list on pools, virtuals,etc. without a problem. Could this be related to a versioning problem? What version of axis and iControl do you have?

Lerna

To shed some more light on this problem I’m sending you the code that I use to reproduce it.

String os = System.getProperty("os.name");
System.setProperty("javax.net.ssl.trustStore", System.getProperty("user.home") + "/.keystore");
String m_endpoint = "https://:@:/iControl/iControlPortal.cgi";
LocalLBMonitorBindingStub m_monitor = (LocalLBMonitorBindingStub)
new LocalLBMonitorLocator().getLocalLBMonitorPort(new java.net.URL(m_endpoint));
m_monitor.setTimeout(300);
m_monitor.get_template_list();

Replace , with your own values. As you can see I am not doing anything fancy but simply binding and invoking get_template_list(). I run my code on a Linux box from within Eclipse. I have no problems getting list of pools, virtuals and so on from the same F5 in this same setup using iControl sdk methods for pools,virtuals,etc. This is why I think axis should not be the problem. Let me know what your suggestion is to track this down.

Lerna

Lerna,

We’re actively looking into this issue, and will post back here as soon as we have further information.

Regards,

Loc

ok. Thanks for the update.

Lerna

Any updates on this? Please let me know.

Lerna

Lerna,

I’ve just been able to recreate this with the iControl 9.0 bits. It is corrected with our latest build of the SDK so I’ll look into seeing what has changed between then and now and see if I can get you a temporary solution until we release the 9.2 SDK.

I’ll have something posted by tomorrow morning (PST time).

-Joe

It seems there were a couple of enum values added to the LocalLB::Monitor::TemplateType enum in the BIG-IP v9.0.3 release. This should have triggered a new SDK release but it somehow slipped the cracks.

This will be addressed in the upcoming release of the SDK, but in the meantime, you can get the most current WSDL files from the BIG-IP itself.

If you open your browser and type in the address to the iControl Portal on your BIG-IP device, you will be presented with a list of available WSDL files.

https://bigip_address/iControl/iControlPortal.cgi

For the LocalLB.Monitor file, this can be accessed by:

https://bigip_address/iControl/iControlPortal.cgi?WSDL=LocalLB.Monitor

If you overwrite the wsdl file in your SDK distribution and recompile your app you should be in business.

We will be much more diligent in the future about issuing SDK updates when the enum value changes.

Background: Pre 9.x we implemented all enums as integers. This made additions to the enum structures possible because client apps that have strong bindings to the interfaces would interpret the value as an integer and could deserialize all values regardless of their value.

In 9.0 we changed enums to be of type string so that you could represent them by their string value which is much more understandable (quick, which is easier to know: template type of “5” or “TTYPE_HTTP”?). This was a often asked for request so we applied it in that release. The reason why your client is breaking is that it doesn’t have deserializer code built for the enum types of TTYPE_TCP_HALF_OPEN, TTYPE_SCRIPTED, and TTYPE_WAP). You’ll need to recompile the updated wsdl into your app (or at least the updated LocalLBMonitorTemplateType generated class). The offending code is the following:

public static LocalLBMonitorTemplateType fromValue(java.lang.String value)
          throws java.lang.IllegalArgumentException {
        LocalLBMonitorTemplateType enumeration = (LocalLBMonitorTemplateType)
            _table_.get(value);
        if (enumeration==null) throw new java.lang.IllegalArgumentException();
        return enumeration;
    }

That “IllegalArgumentException” look familiar. The code can’t find the updated string values in the lookup table and is tossing the exception.

Hopefully this explains things a bit. Sorry for the confusion and thanks for pointing this out to us. We will correct our process for this the future.

If you have any problem getting an updated WSDL, let me know which version of the product you are running and I’ll post the appropriate one as an attachment.

-Joe

Joe -

Thanks for the detailed explanation. I’ll try your suggestion and post back if I run into problems.

Lerna