Siebel JMX monitoring using JRuby

Hi,
I am trying to use JRuby to monitor the performance of a Siebel adapter using JRuby. Whist I am able to read the mbean data from the server I am unable to successfully submit the command "reset = conn.invoke(name, 'Reset', '', '' )" The error message I receive is
D:\Scripts\JRuby\jmx.rb:17: for method RemoteMBeanServerConnection.invoke expected [class javax.management.ObjectName, class java.lang.String, class [Ljava.lang.Object;, class [Ljava.lang.String;]; got: [javax.management.ObjectName,java.lang.String,java.lang.String,java.lang.String]; error: argument type mismatch (TypeError)
     from C:/Program Files/jruby-1.4.0/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in `call'
     from C:/Program Files/jruby-1.4.0/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in `each'
     from D:\Scripts\JRuby\jmx.rb:15
The complete code is listed below.
#!/usr/bin/env jruby
include Java
include_class 'javax.management.ObjectName'
include_class 'javax.management.remote.JMXConnectorFactory'
include_class 'javax.management.remote.JMXServiceURL'
jmxurl = 'service:jmx:rmi:///jndi/rmi://localhost.au:8687/jmxrmi'
username, password = 'admin', 'sun12345'
svcurl = JMXServiceURL.new(jmxurl)
cred = java.lang.String[2].new
cred[0], cred[1] = username, password
env = {'jmx.remote.credentials' => cred}
conn = JMXConnectorFactory.connect(svcurl, env).getMBeanServerConnection
names = conn.query_names(ObjectName.new( 'IDM:serverName=localhost,resourceAdapterType=CCB Siebel CRM Position,resourceAdapterName=CCB Siebel CRM Position'), nil)
names.each do |name|
    puts "OperationCount: #{conn.get_attribute(name, 'Account_Get_OperationCount')} " + "OperationMaxTime: #{conn.get_attribute(name, 'Account_Get_OperationMaxTime')}"
    reset = conn.invoke(name, 'Reset', '', '' )
end

Hi,
Does anyone have any clues.
Thanks

Similar Messages

  • About using OSB JMX Monitoring API

    hi Experts,
    My customer is using OSB11.1.1.7, they are trying to use JMX Monitoring API to get the statistic info, but have the following issues:
    1. For the non-soap service, the serviceDomainMbean.getBusinessServiceStatistics method always return error when typeFlag was set with ResourceType.WEBSERVICE_OPERATION.value(), reason is there is no ws operation for this service, customer wants to know how to know if a service has no ws operation ,therefore they can avoid to get ws-operation statistic info for those kind of services.
    2. Is there a way to get statistic info for the current aggregation interval? the api seems works with period from last reset.
    3. Further more, How to get statistic info for special period, for example, customer want to query statistic info from 05/01 to 05/03, or from 05/03 12:00 to 05/03 13:00
    Thanks for the help.
    Best regards

    Davinder Singh wrote:
    Hi ,
    I have an application deployed on weblogic server 8.1 . This has some MBeans exposed
    for management purposes. This needs to be accessed from another web application
    running on another weblogic instance on different machine. For this the managed
    application has a Connector server and the management application is trying to
    connect it through Connector client.
    At the managed application side , i am getting NoSuchMethodError: javax.management.MBeanServer.getClassLoaderRepository()
    I am not using weblogic implementation of JMX (MBean Server).
    My guess about the error :the weblogic implements JMX version 1.0 and i am using
    JMX remoting API (RI from Sun) which requires JMX 1.2
    Is there a way i can make weblogic use JMX 1.2 ?I dont think there is a way to do this. But I might be wrong.
    >
    Thanx,
    Davinder

  • Enterprise monitoring using JMX

    Hello,
    So, my company has a lot of J2EE/Tomcat servers running on java 1.6. I'm trying to find a way to monitor them all via JMX from a centralized system, which would be accessible to multiple users (web based, ideally).
    Based on my understanding of JMX, it should be possible to extract the data we need from each JVM. I have been using JConsole to do this on an ad-hoc basis when we have problems with a particular JVM and it's great.
    But I can't seem to find any good software for doing enterprise-wide monitoring and long-term data collection... can anyone suggest a good package, either free/open-source (ideally) or commercial?
    Basically, I want to be able to:
    * collect CPU, memory, DB (hibernate), HTTP request stats, etc. via JMX and archive it
    * view graphs of the above
    * ideally, we could also receive email alerts if certain conditions were met, e.g. memory almost full.
    As a side note:
    We're already using Zenoss (http://www.zenoss.com) to monitor the OS-level stuff and we really like it, but we need more visibility into each JVM (we have multiple JVMs per physical server). As far as I can tell, Zenoss doesn't support JMX monitoring... but has anyone found a way to make this work? If so, I'd love to hear about it, since this would be ideal for me.

    You may want to have a look at Glassbox, an open source troubleshooting agent for pinpointing problems in Enterprise Java applications.
    http://www.glassbox.com
    It offers both JMX and web-based access to the collected data but I'm not sure the web-based console allows you to present the collected data graphically. But still you could write your own JConsole plugins and display the collected
    data coming from Glassbox and your own custom MBeans in a graphical way but of course JConsole is Swing-based.
    Have a look at the JavaOne 2007 Hands-On Lab 1420 to get more detailed info about using Glassbox/JMX/JConsole together.
    http://blogs.sun.com/lmalventosa/entry/j1_07_hol_1420
    Regards,
    Luis-Miguel Alventosa
    Java SE JMX/JConsole development team
    Sun Microsystems, Inc.
    http://blogs.sun.com/lmalventosa/

  • Limiting JMX Monitor Executor Pool size

    Hi all,
    does anybody know how to limit (or in general, set) the size of the Scheduler/Executor Pool in JMX for Monitors?
    By default it seems that 10 threads are created, named [JMX Monitor Executor Pool [Thread-n]]. They get created when I create the first Monitoring MBean, in my case this was a simple GaugeMonitor.
    I don't have a problem with the 10 threads, but its just that our app already has enough threads as it is, plus the granularity period we will use is fairly big (minutes) and we only have a few Monitor beans, so we won't have high load on them.
    Any help appreciated.
    Cheers, Mark

    Mark,
    You can set the system property jmx.x.monitor.maximum.pool.size to control this, either on the command line with e.g. -Djmx.x.monitor.maximum.pool.size=3 or by calling System.setProperty("jmx.x.monitor.maximum.pool.size", "3"). The value of this property is consulted the first time the class javax.management.monitor.Monitor is loaded (typically when you create your first monitor), and not thereafter, so you must be sure to set it beforehand.
    This property is non-standard and will not necessarily work with other implementations of the JMX API, but it does work with the implementation that is in the JDK platform, starting with JDK 6. (Before JDK 6, every monitor had its own thread, so if you are seeing a limit of 10 threads then you are using JDK 6.)
    From my reading of the code, it does look as if more threads will be created than strictly necessary. For example, if you only have one monitor then you don't need more than one thread, but if the monitor's granularity period is less than 60 seconds you will end up with 60/period threads, up to the maximum (default 10). For example 4 threads if the period is 15 seconds. I think we should probably fix that. (The core pool size should probably be 1 rather than the same as the max pool size.)
    Regards,
    �amonn McManus -- JMX Spec Lead -- [http://weblogs.java.net/blog/emcmanus]

  • The JMX Monitoring APIs for OSB

    hi
    I know Using the JMX Monitoring APIs can monitor Oracle Service Bus at run time to know how many messages in a particular service have processed successfully and how many have failed. but those are Statistical Information . i want to monitor the details when a particular service is invoked,such as the caller's IP address, the call is successful or not, the error message and error code.
    帖子经 David编辑过

    There are no public API that are present except for monitoring and Deployment.
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/app_apis.htm#CHDHAJGD
    The runtime information for OSB artifacts and their instances are not exposed though API.This use-case can be accomplished by using reporting action. http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/reporting_console.htm#CACJFDGF
    Getting IP address of cleints invoking proxy on OSB is little tricky, but some transports do support. eg HTTP. Can you describe in brief actual business case so that we can come-up with some solution. Is this monitoring, part of Business logic or Administrator requirement (Technical) etc.
    Thanks
    Manoj

  • Near Cache JMX Monitoring

    Hi,
    Can the JMX monitoring capabilities of Coherence be used to monitor the hit-rate of a near cache, i.e. by adding the JMX command line options to the extend client - to determine how effective it is?
    Thanks

    Hi dxfelcey,
    You can get to the NearCache statistics by querying CacheMBean(s) with key attribute "tier=front". For example, the following query will return you a set of ObjectNames for all MBeans representing NearCache called "test" instances across the cluster:
    MBeanServer mbs=MBeanHelper.findMBeanServer();
    Set setNames = mbs.queryNames(new ObjectName("type=Cache,name=test,tier=front,*"), null);For more information please see the Registry Javadoc here:
    http://download.oracle.com/otn_hosted_doc/coherence/330/com/tangosol/net/management/Registry.html
    and the Coherence Wiki page here:
    http://wiki.tangosol.com/display/COH33UG/Managing+Coherence+using+JMX
    Regards,
    Gene

  • Service Bus JMX monitoring

    How can i use JMX monitroing feature?
    Server started with:
    -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
    I trying to check can i use ServiceDomainMBean:
    java -jar c:\pdprogram\java_lib\cmdline.jar - 192.168.154.142:7092 | grep -i "ServiceDomainMbean"
    But result is null.
    Am i right understand documentation (http://docs.oracle.com/cd/E21764_01/doc.1111/e15867/app_jmx_monitoring.htm) that some MBean's thread (com.bea.wli) must be open for access for working with JMX monitoring?

    What is in c:\pdprogram\java_lib\cmdline.jar ? And what exactly are you trying to achieve?

  • JMX monitoring front Coherence cache running on IBM WebSphere

    I have a question regarding JMX monitoring a Coherence front cache running in a IBM WebSphere v6.1 JVM (1.5).
    My setup is that I have three Coherence nodes (back cache) each running 10 JVMs each. Via JMX all these 30 JVMs are setup to be monitored from one of the 30 JVMs which is configured to be the JmxServer for the other 29 instances. The other 29 JVMs set -Dtangosol.coherence.management.remote=true at startup to indicate that their MBean tree will be managed centrally. This works fine but when I try to extend this to also be able to manage the front cache (running on WebSphere on a separate node in the tier above) by adding the same flag (-Dtangosol.coherence.management.remote=true) it does not appear in the MBean tree as the other 30 Coherence cache (Sun) JVMs do.
    Are there other things I have to consider to get this working? There are no firewalls in between the nodes so that is not the problem. How much of IBM WebSpheres (non-standard) JMX-functionality is required to get this to work?
    /Jonas

    How is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
    Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
    Thanks,
    Everett

  • HDTV as external monitor using ethernet connection

    Hello,
    I want to connect my HDTV to my iMac and use it as an external monitor.
    My HDTV is about 25 ft away from my iMac.
    A HDMI cable of that length cost over 200 $.
    So, its not an option to me.
    I just bought a smart rooter but my HDTV Panasonic Viera P50GT30 is not a smart TV.
    It needs a DLNA server and I can't find one.
    Question : Is there a way to use my HDTV as an external monitor using the Ethernet or Wifi connection?
    Thank's,
    Pierre.

    This look's good.
    http://www.startech.com/AV/Extenders/HDMI/HDMI-over-IP-Extender-with-Audio~IPUSB 2HD2
    But its not.
    OS Compatibility                                                                                                                                                                  Windows® XP(32bit)/ Vista(32/64bit)/ 7(32/64bit) Aero themes supported

  • Can you hook up a monitor using hdmi?

    Hi I am using a Cintiqi Display and would like to add another monitor using the other port HDMI is that possible or do I need to do something else. I just wanted another display to watch videos to learn how to do some Adobe products and thought it be easier to watch it on a monitor while I work on the products ...kind of step by step process. 
    thanks for any help  Maggie

    Not all or even many monitors have HDMI ports but it does have one yes it can be connected. You can also use a HDMI to DVI adapter, in fact Apple include such an adapter in the Mac mini box.
    There is one issue you need to consider though, the Mac mini only supports a maximum resolution of 1920x1200 pixels on the HDMI port. If you monitor has a higher resolution then this may not be the best solution.
    Your other alternative is to get a USB Displaylink adapter to allow connecting a monitor via USB.

  • How do you get your tv to act as a monitor using apple tv?

    Can you get your television to act as a monitor using Apple TV?

    I presume you mean you want to view your computer screen on your TV by going through the Apple TV. Right now you can't do that but the next version of Mac OS X, 10.8 Mountain Lion, will allow Mac computers to mirror their computer screen on a TV connected to Apple TV.

  • Concerning: VGA monitors using an Aluminum Powerbook G4 PowerPC 2004 15"-screen 1.5Ghz  The DVI (converted to VGA) video output stopped working on this computer after 9 years of service. This raises question 1:  Is there any way of fixing this? I've tried

    Concerning: VGA monitors using an Aluminum Powerbook G4 PowerPC 2004 15"-screen 1.5Ghz
    The DVI (converted to VGA) video output stopped working on this computer after 9 years of service. This raises question 1:
    Is there any way of fixing this? I've tried the usual: triple checked all vga cables & devices through trial & error. Bought a new DVI-VGA adapter. Reset PRAM, PMU, etc. Nothing works. Something is probably damaged, because my KVM switch was not working unless I hot-reseated the vga cable into it, leading to this DVI port, and that is pretty rough stuff.
    Question 2 (related):
    This dovetails into this: Can I drive a VGA monitor with the s-video output port on this computer. It would take an s-video (male)-to-15-pin-VGA adapter. Has anyone does this? So far, I haven't even found the adapter mentioned anywhere.
    Thanks for reading this.
    el7

    Thanks for the useful feedback, Knucklesmac. I agree. I must have blown something on the logic board -- because I had a faulty old KVM switch that would not switch between computers without some nasty hot-plugging/unplugging the VGA video cables. (wince!). It's like when Dizzy Dean ruined his arm because a line drive hit him in the foot and he readjusted his mechanics around the injury. I take the blame because this has been a great computer, and does not deserve any blame.
    If it will help anyone else reading this thread, C2G (née Cables to Go) has some interesting ideas for still getting external video out of this computer:
    -USB-to-VGA
    http://www.cablestogo.com/product/30545
    -Convert s-video or composite video signals to high resolution VGA
    http://www.cablestogo.com/product/40971
    The price range is $75-$85, which doesn't make horse sense to me for such an old computer -- which has a lot of life in it anyway, because its own 15" monitor is not chopped liver.
    el7

  • External monitor using separate menu bars

    I got an external monitor plugged in. Is it possible to run separate menu bars on each monitor? Menu bars corresponding to the applications on each monitor?

    Only the foremost application's menus are visible on the menu bar. The foremost application will span both monitors.
    It's not possible to have two different applications both active on different monitors.
    You can however duplicate the menu bar of the foremost application on the second monitor using shareware programs. Try MenuEverywhere if that's what you wanting to do.

  • Can the last link in a thunderbolt daisy-chain be a non-thunderbolt monitor using miniDisplay port?

    Can the last link in a thunderbolt daisy-chain be a non-thunderbolt monitor, using miniDisplay port?
    For example, Mac mini <--> external SSD <--> apple cinema display 30" (using miniDisplay port adaptor plugged into the SSD's second thunderbolt port)

    TechnoMax wrote:
    for instance STAE122 or STAE 127?
    FWIW, STAE129 is the current version TB adapter
    that is self powered and has TB daisy chain port.
    STAE122 and STAE127 are older versions and
    not the current model, though there may be stock of
    these around.  As to whether this will solve your issue,
    I don't know.
    Can I trick the Mac under Bootcamp as OS to use HDMI for the monitor? Dell officially says that the monitor can only accept 1900x1080 over HDMI, but some have fiddled wth different computers with custom settings that worked with some Monitors but mostly under Linux and to Dell 2711.
    The MacMini HDMI port is hardware limited to 1980x1200.

  • Add and Remove Publishers from Replication Monitor using T SQL

    Is there any possibility to add an Publishers from Replication Monitor using T SQL.i am trying to configure the replication using T SQL..i can create all other steps but didn't find any way to add publisher to the replication monitor..kindly suggest..

    Hi Snehasis,
    Tom is correct, there is no T-SQL command to add a publisher to Replication Monitor.  However, the server from which you launch Replication Monitor will automatically be added to Replication Monitor if it is a Publisher.  Also, you can add additional
    Publishers using the Add Publisher dialog.
    This is covered in
    Add and Remove Publishers from Replication Monitor
    Brandon Williams (blog |
    linkedin)

Maybe you are looking for