Mgmt Plug-in / OSLine refuses to work / Perl returns non suitable values?

Hi,
I am currently developing a simple management plugin to integrate basic metrics about our J2EE service in EM. So far I have defined two metrics (Response using OS and Availability using OSLine). In a first step both metrics should collect data from simple Perl scripts (just print commands). The Repsonse metric works perfectly fine, but I am getting an Error in EM when I want to display the Availability metric (Unable to obtain data for metric Container Availability).
The Availability metric is a table with 4 columns (or lines) and uses the OSLine fetchlet. When the Perl script returns a single Value (i.e. print "Value1") it works fine, but as soon as the script returns more than 1 line (i.e. print "Value1\nValue2\nValue3\nValue4", like the example in the Extensibility Guide, Chapter 9 - Fetchlets, to fill the whole table) I get an error when clicking on the metric in EM. So I suspect that the Perl script is returning something in the wrong format (hidden control character or something...).
I already took the following steps to solve the problem:
1. Read Extensibility Guide and study examples
2. Check that the fetchlets are available in fetchlet.reg
3. Compare code to oracle_listener.xml
4. Validate XMLs against the DTDs
5. Used OSLineToken without a delimiter (so it should act like OSLine), same problem
6. Used a shell script with echo (same problem)
7. Searched the forum :)
Here is the source code for my plugin (including the perl scripts):
J2EE_Target.xml:
<?xml version="1.0"?>
<!DOCTYPE TargetMetadata SYSTEM "../dtds/TargetMetadata.dtd">
<TargetMetadata META_VER="1.0" TYPE="J2EE_TARGET">
     <Display>
          <Label NLSID="J2EE_TARGET">J2EE Target</Label>
     </Display>
     <Metric NAME="Response" TYPE="TABLE" USAGE_TYPE="VIEW_COLLECT">
          <Display>
               <Label NLSID="Response">Response</Label>
          </Display>
          <TableDescriptor>
               <ColumnDescriptor NAME="Status" TYPE="NUMBER">
                    <Display>
                         <Label NLSID="Status">Status</Label>
                    </Display>
               </ColumnDescriptor>
          </TableDescriptor>
          <QueryDescriptor FETCHLET_ID="OS" NEED_CHARSET_CONVERT="FALSE">
               <Property NAME="command" SCOPE="GLOBAL">perl /usr/oracle/custom_target/j2ee_status.pl</Property>
          </QueryDescriptor>
     </Metric>
     <Metric NAME="Container Availability" TYPE="TABLE" USAGE_TYPE="VIEW_COLLECT">
          <Display>
               <Label NLSID="Container Availability">Container Availability</Label>
          </Display>
          <TableDescriptor>
               <ColumnDescriptor NAME="Availability" TYPE="STRING">
                    <Display>
                         <Label NLSID="Availability">Availability</Label>
                    </Display>
               </ColumnDescriptor>
               <ColumnDescriptor NAME="NumberofContainers" TYPE="STRING">
                    <Display>
                         <Label NLSID="NumberofContainers">NumberofContainers</Label>
                    </Display>
               </ColumnDescriptor>
               <ColumnDescriptor NAME="NumberofApplications" TYPE="STRING">
                    <Display>
                         <Label NLSID="NumberofApplications">NumberofApplications</Label>
                    </Display>
               </ColumnDescriptor>
               <ColumnDescriptor NAME="NumberofOwners" TYPE="STRING">
                    <Display>
                         <Label NLSID="NumberofOwners">NumberofOwners</Label>
                    </Display>
               </ColumnDescriptor>
          </TableDescriptor>
          <QueryDescriptor FETCHLET_ID="OSLine" NEED_CHARSET_CONVERT="FALSE">
               <Property NAME="command" SCOPE="GLOBAL">perl /usr/oracle/custom_target/avail_status.pl</Property>
          </QueryDescriptor>
     </Metric>
</TargetMetadata>
J2EE_Collection.xml:
<!-- $Header: oracle_listener.xml 25-apr-2005.05:33:05 jpegu Exp $ -->
<!DOCTYPE TargetCollection SYSTEM "../dtds/TargetCollection.dtd">
<TargetCollection TYPE="J2EE_TARGET" >
<CollectionItem NAME="Response">
<Schedule>
<IntervalSchedule INTERVAL="1" TIME_UNIT="Min"/>
</Schedule>
<Condition COLUMN_NAME="Status" CRITICAL="0" OPERATOR="EQ"
MESSAGE="The target is down."
MESSAGE_NLSID="Response_Status_alertmessage"
               CLEAR_MESSAGE="The J2EE Service is up."
               CLEAR_MESSAGE_NLSID="Response_Status_clearmessage"/>
</CollectionItem>
</TargetCollection>
Perl:
j2ee_status.pl:
print "100";
avail_status.pl (V1:causes error in EM):
print "Value1\nValue2\nValue3\nValue4";
avail_status.pl (V2: works fine, but only first line of metric table is filled as expected):
print "Value1";
Perhaps you can spot the error.
Thanks in advance!
Andre

And is there a reason why you're not using the OS Line Token fetchlet? You could just as easily:
print "Value1|Value2|Value3|Value4";
and have it work...
You may also consider changing your column types to NUMBER, as it looks like that's what they'll be. It won't make a difference to the agent, which will parse everything as a string anyway, but it will make a difference in the repository and through the UI. Making those columns NUMBER will put the values in charts in the UI, whereas if you leave them as STRING all you will ever see is a text display.

Similar Messages

  • ICal refuses to work

    After updating to Lion 10.7.5, iCal refuses to work: won't change day/week/month, no previously entered appointments shown, can't add any new ones either. Now what? Of course, I have no backup (didn't think I needed to with iCloud). Aim is 1) to restore function, then 2) populate back from iPod Touch Any help appreciated.

    andybacon wrote:
    After updating to Lion 10.7.5, iCal refuses to work: won't change day/week/month, no previously entered appointments shown, can't add any new ones either. Now what? Of course, I have no backup (didn't think I needed to with iCloud).
    I'll just address the backup issue, iCloud is NOT a backup system, you still need one.

  • HT1329 I wish to transfer all the music on my ipod (synced with my home computer) to my itunes on my work computer. Is this possible? I am concerned if I plug my ipod into the work computer, which has itunes but no music content, that it will automaticall

    I wish to transfer all the music on my ipod (synced with my home computer) to my itunes on my work computer. Is this possible? I am concerned if I plug my ipod into the work computer, which has itunes but no music content, that it will automatically sync and wipe all the content from ipod. Can anyone advise?

    Only if you use a third-party utility such as Phone to PC and only if you use the same Apple ID for your other computer.

  • Adobe update refuses to work for CS6 and Photoshop elements. App manager refuses to install.

    Adobe update refuses to work for CS6 and Photoshop elements. App manager refuses to install. Support Advisor is of no help.Anyone had the same problem? It has all worked perfectly for some years now, but refuses this week.Has Adobe changed something.Windows 7.

    Re: Adobe update refuses to work for CS6 and Photoshop elements. App manager refuses to install.
    created by Pat Willener in Downloading, Installing, Setting Up - View the full discussion
    What exactly means "refuses"?
    This is the message which comes up if I try to update (from the Help menu) or re-install my licenced copies of CS6 or Photoshop Elements 9.
    “We've encountered the following issues
    Installer failed to initialize.Please download Adobe Support Advisor to detect the problem”
    Get Adobe Support Advisor”
    OR
    on trying to open PhotoshopCS6 I get this message:-
    “Adobe Application Manager required to start your trial, is missing or damaged.
    Please download a new copy of Adobe Application Manager from http://www.adobe.com/go/applicationmanager_uk”
    When I follow these instructions and try and start up/install or update Photoshop CS6 I get the same messages all over again. This has been going on since Tuesday afternoon and I am anxiuous to resolve the problem. For several years now all this has worked perfectly through your website and I cannot understand what has changed.  Once I cancel these messages the products themselves seem to function OK. When I attempt to use Adobe Update Manager I get the same messages as above. You will see that my products are properly licensed and up to date. Have you any solution?

  • CC 2014 nik efex - My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either

    My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either.  Help with this?

    BINGO !!!!
    Thanks so much Woodsroad. I had the exact same problem with my Dell Windows 7 64 bit with AMD Radeon 6700 Video card.
    All the video tests passed with flying colors.
    The sniffer rename trick fixed the problem.
    Thank goodness for the internet!

  • Since I updated to firefox 5.0, the windows media player plug in for firefox doesnt work anymore :(

    Ok I recently upgraded to firefox 5.0, and then when I went to a website that uses windows media player to watch videos and news reports, it said I needed to download the windows media player plug in for firefox. And yet I had already done that in the past. So it directs me to the plug in for windows media player 11, I download and install and it doesnt work. Website repeats the same message, you need to download plug in. It was working fine with firefox 4.0! I use the OS Windows 7, 64bit. Any help please?

    Yes I did, at first it identified it as already there, so it gave the option of repairing it, etc, so I uninstalled the Windows Media Player, then Installed it again, and it still doesn't seem to work! I have the same problem with several other plug ins, in the add ons and plug in section of Mozilla tools, I see that say, "incompatible with firefox 5.0" but as days go by those add-ons, that are built by those other websites seem to be repairing it, but I wanted to know for something as important as windows media player plug in, am I the only one getting this problem? :/

  • Microsoft Word 2008 refuses to work for me after installing the most recent Mavericks update, 10.9.1. It is 2008, yet Excel and Powerpoint work just fine. Help!

    Microsoft Word 2008 refuses to work for me after installing the most recent Mavericks update, 10.9.1. It is 2008, yet Excel and Powerpoint work just fine. Help!

    I suggest you do one of two things:
    1. Upgrade to Office 2011 for OS X.
    2. Try the freeware, Libre Office.

  • In Safari, why doesn't Internet Plug-in, stop plug-in to save power work anymore?

    In Safari, why doesn't Internet Plug-in, stop plug-in to save power work anymore?

    Yes, the Mozilla Plugin Check page is specifically for Firefox.

  • I restored my ipod touch, and now the touch screen refuses to work

    my ipod touch recently said it needed activation, although I've been using it for 18 months now. When I connected to Itunes, it said it could not read the contents of the Ipod, although it did read the model number and other details. It said to restore it to the factory settings, which I did. after restore, the touch screen refused to work. after 24, it began working, but then said it needed activation again. Hook up to Itunes, same song and dance. It is frozen again. Has anyone else had t

    You should take it to the nearest apple store to let them restore it and activate it. iTunes wouldn't dare restore my ipod touch everytime i tried to restore always an error. So the next day i took it to apple and they fixed it.

  • Thread refuses to work

    Ok, this is the weirdest thing ever happened to me ever since i started working with cellphone programming.
    Lately, one of my thread refuses to activate. I have this thread that communicates with a thermal printer to print something right. Well, i have been working developing the interpretative code for it (since the SDK won't do any good for my needs) for about 4 weeks and been working perfectly. But then i tried to implement it on my application i was working on and it refused to work. Well, i though something was wrong with my code so i went back to my test program and tried to invoke de print thread and now it also refuses to work, but i noticed on the device log (i'm developing on blackberry) a IllegalMonitorStateException was thrown in the wait() method of my thread.
    My thread is running all the time expecting for me to call it to work so it has this structure
    class printThread implements Thread
        private boolean sleep = true;
        printThread(){} // Constructor
        public void run()
             while(sleep)
                 try
                     wait();
                 catch(InterruptedException e){}
                 if(sleep)
                    // Do the work when notifyed
        public void work()
             notify();
    }Thats my basic thread structure, and been working like a charm for ages already (my application has 4 thread running backward, one of it works every 5 minutes in the background) but then i added the print thread and this problem started to appear. then i went back to my test program for the printer and the problem followed me there.
    What might this be causing the problem? I could understand this problem happening in my application with the other 4 threads working there, but on the test program there's only 1 thread!!!

    hm it looks like you lost synchronized keyword while making changes in the code.
    IllegalMonitorStateException is definitely a WYSIWYC (What You See Is What You Coded). I mean, this exception is indeed the correct behavior for the code you posted.
    Consider changing *while(sleep){...}* to something like *synchronized(this){while(sleep){...}}* - that will probably make exception go away, but...
    ... on the test program there's only 1 thread!!!...but given above, after fixing the exception you can get into the next problem - your application will hang.
    You know, it takes two to tango. While one thread waits, there should be another one to notify.
    If there's only one thread waiting, it can wait forever. I won't guarantee that this is your case though because from your explanation it is not clear if there's indeed only one thread.
    I would also recommend you to consider studying Sun's [online tutorial on concurrency|http://java.sun.com/docs/books/tutorial/essential/concurrency/]. +"...This lesson introduces the platform's basic concurrency support..."+ - studying it can help fix problems faster than waiting for the answer at the forum. :)

  • Volume adjust refuses to work unless FN is pressed

    I didn't start having this problem until a week or so ago. My volume refuses to work unless FN is pressed while f9 or f10 is as well. That or I have to open the function key app and then it will work without the key.
    I have windows 8 and my model is the satellite s855-s5378

    Try checking the UEFI settings for a function key mode setting. Most models have a toggle that allows you to choose wheter you want to have to hold down the FN key to access the "special" keys or hold down the FN key to access the F# keys. Try switching it.
    - Peter

  • Youtube and itunes app refuse to work

    I've got an ipod touch ..
    And i have wifi at home
    I am able to use safari but itune store and youtube features refuse to work
    every time i click on the youtube and itune icon it tells me :
    '' cannot connect to Youtube or cannot connect to Itune ''
    I find that weird because it once worked !
    Please help solve my problem .

    I am sure i am , and i know that my wifi is not he problem
    because my brother's itouch works

  • Plug-in container has stopped working. No printing from web

    Went to print a receipt from a web page and got firefox 'not responding'. Then error message after I click to close..."plug-in container has stopped working". I have reset ff, i have uninstalled and reinstalled. flash is up to date. I have EWPS plug in (I have an epson printer) and E web page plug in.
    When I checked in my pc for the ewps, it doesn't open but says it needs plug in container and to re download e-web print. did that. No better.
    Not an epson issue as other stuff prints.
    Please help
    thanks

    I'm trying to figure out what plugin(s) the problem page is using.
    Are there other pages on the site (same host name, e.g., www.example.com) that do not lock up Firefox? If so, please open one of those pages and then switch all the plugins to "Ask to Activate" for the site. Here's what I mean:
    Click the padlock or globe in the address bar and then click "More Information". At the top of the Page Info dialog, click Permissions. Then, in the plugins section, click "Always Ask" for each one and close the dialog.
    The next time you visit the problem page, Firefox should show a bar telling you which plugin needs to be activated. Actually, this might not kick in until after you exit and start Firefox up again.

  • Curve 9300 Browser refuses to work?!

    Hi guys!
    Yet another fault with my BlackBerry 9300, the browser refuses to work, I have full 3G coverage and I am connected to my home wifi with an excellent connection, yet my Blackberry just refuses to connect to any websites, all I get is a message saying Unable to connect to server, have had the problem for a few days, tried the usual battery pull, turned of my network coverage and tried running off my wifi and vice versa yet ive had no luck... 
    Would be so grateful if someone had a solution, cos i really dont have the time or the energy to contact my network provider..
    Thanks

    Hi there!
    I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB...please wait for that before proceeding to the next step):
    1) Register HRT
    KB00510 How to register a BlackBerry smartphone with the wireless network
    2) Delete and Resend Service Books
    KB05000Delete the service book for the BlackBerry Internet Service email account from the BlackBerry smartphone
    KB02830 Send the service books for the BlackBerry Internet Service
    3) Batt Pull Reboot
    Anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    Hopefully that will get things going again for you! If not, then you should contact your wireless service provider for formal support.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Messges often refuses to work

    I seem to have this problen all too often as Messages refuses to work. I am trying to send a message to a iOS user and it does not work and I get the red Exlamation point. I have attempted to reboot the Mac, log in and out of iMessage but it does not fix the problem. Perhaps this is a system wide issue on Apples end.

    Hi John,
    I had the iMessages arrive on my iPhone early this morning.   (Thanks Apple).
    The Mac appeared to sync this evening (my time) at 21.08.
    However I have not go the "Are you reading this" that may have been the prompt for the sync.
    As you can see I have yesterday's AIM chat still "open".
    I have not reported it.
    The Status page Apple run says there have been no issues
    http://www.apple.com/support/systemstatus/
    We are currently on British Summer Time which is GMT+ 1 hour if this helps explain what happend at 4.41 BST for me or the sync time this evening.
    9:25 PM      Friday; May 17, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • Terminal Commands for Internet Connect VPN?

    I could maybe do this as an applescript but I'm hoping there are terminal commands which I can incorporate into an rsync script... I need to open a PPTP VPN connection on a computer (Internet Connect VPN client, 10.4.8) , to connect to VPN services o

  • Differences Between 10g version 10.2 & 10.1

    I have an application that uses outlook version 2003. The application sends out emails and pops open email distribution lists. The application worked fine in Oracle 8i and also in Oracle 10g version 10.1, but when trying to run the application in ora

  • Security when using EM web interface to administer the database

    When I'm connecting to the database via EM Database Control web interface, it uses http protocol (http://machine:5500/em), can it be used for safety https protocol, or are there when using standard http protocol at least passwords encrypted before se

  • F-53 change of document type

    HI In F-53 after entering and simulate the data can't we chenge the document type without going back to beginning??? Pls advice...................... Thanx.

  • LR vs. Aperture

    I've just started playing with the demo that is now available and I'm looking for reviews/and or opinions on LR vs. Aperture. I posted in an older thread how I'm considering LR and is there any conversion software. For now the easiest approach for me