Forum Discussion
Lerna_Ekmekciog
Nimbostratus
Sep 06, 2005MONITOR_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
13 Replies
- Loc_Pham_101863Historic F5 AccountSorry 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 - Loc_Pham_101863Historic F5 AccountAs 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 - Lerna_Ekmekciog
Nimbostratus
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:
{http://xml.apache.org/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 - Lerna_Ekmekciog
Nimbostratus
Any news on this one?
Lerna - Loc_Pham_101863Historic F5 AccountI'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 - Lerna_Ekmekciog
Nimbostratus
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 - Lerna_Ekmekciog
Nimbostratus
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 - Loc_Pham_101863Historic F5 AccountLerna,
We're actively looking into this issue, and will post back here as soon as we have further information.
Regards,
Loc - Lerna_Ekmekciog
Nimbostratus
ok. Thanks for the update.
Lerna - Lerna_Ekmekciog
Nimbostratus
Any updates on this? Please let me know.
Lerna
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
