DX Application Performance Management

 View Only
Expand all | Collapse all

Problem with RabbitMQ agent Nodes plugin and Queues plugin

  • 1.  Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Posted Oct 15, 2014 08:01 AM

    I'm using the RabbitMQ EPAgent plugins by Hiko_Davis (I think you wrote them, sorry if I'm wrong) and most of it's working, not the Nodes plugin.  When I run it directly from the command line I get this:

     

    [myusr@myhost RabbitMQ]$ perl epaplugins/RabbitMQ/RabbitMQ_Nodes.pl --host=localhost --port=15672 --user=********--pswd=********

    Unknown option: user

    Unknown option: pswd

    usage: epaplugins/RabbitMQ/RabbitMQ_Nodes.pl [--host=HOST] [--port=PORT] [--user=USERNAME] [--pswd=PASSWORD] [--help|-?]

     

    which makes no sense to me@.  Is this working for anyone, or is it a bug in the script?

     

    Also, I noticed when running the Queues plugin that I get a few lines that look like errors:

     

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:vhost" value="/" />

    Argument "False" isn't numeric in int at epaplugins/RabbitMQ/RabbitMQ_Queues.pl line 122.

    <metric type="LongCounter" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:active_consumers" value="0" />

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:auto_delete" value="0" />

    Argument "True" isn't numeric in int at epaplugins/RabbitMQ/RabbitMQ_Queues.pl line 134.

    <metric type="LongCounter" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:consumers" value="0" />

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:durable" value="Unknown" />

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:exclusive_consumer_tag" value="2014-10-15 12:04:54" />

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:idle_since" value="21640" />

    <metric type="LongCounter" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:memory (KB)" value="0" />

    <metric type="LongCounter" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:messages" value="0" />

    <metric type="LongCounter" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:messages_ready" value="0" />

    Argument "rabbit@brsuxtsnmq31" isn't numeric in int at epaplugins/RabbitMQ/RabbitMQ_Queues.pl line 176.

    <metric type="LongCounter" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:messages_unacknowledged" value="0" />

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:node" value="Unknown" />

    <metric type="StringEvent" name="RabbitMQ|Queues|CF_TO_OBA_EVENTS:policy" value="running" />

     

    Third and final question: the Bindings plugin lists a few items as "unknown" (eg "Unknown > OBA_SEMAPHORES:vhost".  I assume this is something to do with how our RabbitMQ admins have set it up, but I don't know what to tell them they need to do.  Can anyone tell me how the name is set for these items?



  • 2.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 15, 2014 10:07 AM
    Can you run the Python script manually with the same values the Perl plugin is using?

    Also check the output since your values don't match up to what is expected by the plugin.


  • 3.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 18, 2014 01:06 PM

    In my FP, there is a copy of test output I generated from other users and my test setup.

    Check to see if your out matches the samples. The errors you're seeing are related to the fact that the plugin is expecting a particular value type.



  • 4.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 18, 2014 01:10 PM

    If you look at line #114 in the Bindings program, you'll see the following comment:

     

    # check @results for empty string & replace with "Unknown"



  • 5.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 18, 2014 07:12 PM

    AH HA!

     

    Perl reveals the truth!

     

    Yes, there is indeed a problem with my program starting at line#97.

     

    I will update the packaged FP and repost.

     

    In the meantime, just update RabbitMQ_Nodes.pl like this:

     

    my ($help, $rmqHost, $rmqPort, $rmqUser, $rmqPswd, $debug);

     

     

    # get commandline parameters or display help

    &usage if ( @ARGV < 1 or

        not GetOptions( 'help|?'      =>  \$help,

                                'host=s'    =>  \$rmqHost,

                                'port=i'      =>  \$rmqPort,

                                'user=s'    =>  \$rmqUser,

                                'pswd=s'  =>  \$rmqPswd,

                                'debug!'    =>  \$debug,

                                )

        or defined $help );



  • 6.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin
    Best Answer

    Broadcom Employee
    Posted Oct 18, 2014 07:17 PM

    You can find the updated package here: Rabbit MQ | CA Communities



  • 7.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Posted Oct 21, 2014 11:49 AM

    Thanks Haruhiko, I've been off for a few days and will hopefully be able to try out your fix tomorrow

     

    By the way, the developers tell me that there should be two queues but the agent only finds one.  I read something about this in another thread - is it a known issue?  I couldn't tell quite was was resolved in RabbitMQ Monitoring and what's still outstanding.



  • 8.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 21, 2014 11:54 AM
    I resolved all of the issues in that thread.
    Please send me a private message and attach your output for the query using the python CLI.


  • 9.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 21, 2014 04:30 PM

    Each script runs iteratively over the resulting output, so if there were more than one, it would've been found and displayed.

    I'll take a look at your output as soon as you send it to me. Have you checked to see if your queues output looks like mine from the samples directory?



  • 10.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Posted Oct 24, 2014 07:43 AM

    Apparently I can't send you a PM unless we're friends/followers?

     

    When you say using the python CLI, do you mean I shouldn't be calling perl directly?  My command is:

     

    perl epaplugins/RabbitMQ/RabbitMQ_Queues.pl --host=localhost --port=15672 --user=guest --pswd=guest



  • 11.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Posted Oct 24, 2014 11:26 AM

    Hi Sam,

     

    Any member can start a private discussion without following each other. It's not the same as a direct message but does a very similar thing - almost identical. When starting a discussion, just choose 'specific people' instead of a place as seen below. Note, it does help to know screen names or other info when doing this.

     

    https://communities.ca.com/servlet/JiveServlet/downloadImage/2-241715174-6748/discussion.png

     

    Regs,

     

    Florian.



  • 12.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Oct 24, 2014 11:44 AM

    Try running the python script on its own with the commands I pass with Perl.

    Send the output to me directly following Florian's suggestion.



  • 13.  Re: Problem with RabbitMQ agent Nodes plugin and Queues plugin

    Broadcom Employee
    Posted Aug 17, 2015 08:18 PM

    The problem has been identified and it's related to a difference in the output since version 3.3.0.

    Anyone wanting to use this FP and need an update, please contact directly from your mobile app or from the community inbox.

    I will need a copy of your TSV output that needs correcting.