DX Application Performance Management

 View Only
  • 1.  RabbitMQ EPA Instructions

    Posted Sep 11, 2014 08:45 AM

    Sorry if I'm being thick and missing something obvious, but can someone point me to the instructions for using the EPA for RabbitMQ?  The download doesn't seem to include any instructions (even in the readme) or examples.  What should the command be (if I just use "python rabbitmqadmin.py" I get "ERROR: Action not specified")?  Where should I specify the port, username etc (in a config file?  as options to the command?)?

     

    Hiko_Davis



  • 2.  Re: RabbitMQ EPA Instructions

    Broadcom Employee
    Posted Sep 11, 2014 07:26 PM
    The instructions are included with each of the plug-ins. Open each Perl programs for details.


  • 3.  Re: RabbitMQ EPA Instructions

    Posted Sep 12, 2014 10:43 AM

    Ah - you use the perl scripts individually, I was expecting that we called the python script once and it in turn calls all the perl scripts.

     

    So the command would be something like:

     

        perl epaplugins/RabbitMQ/RabbitMQ_Connections.pl --host=localhost --port=5672 --user=guest --pswd=guest

     

    right?  I tried that though, and I get this if I run it myself from the command line:

     

        [root@myhost RabbitMQ]# perl epaplugins/RabbitMQ/RabbitMQ_Connections.pl --host=localhost --port=5672 --user=guest --pswd=guest

        Traceback (most recent call last):

        File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 943, in <module>

          main()

        File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 384, in main

          method()

        File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 526, in invoke_list

          format_list(self.get(uri), cols, obj_info, self.options)

        File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 407, in get

          return self.http("GET", "/api%s" % path, "")

        File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 436, in http

          resp = conn.getresponse()

        File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse

          response.begin()

        File "/usr/lib64/python2.6/httplib.py", line 391, in begin

          version, status, reason = self._read_status()

        File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status

          line = self.fp.readline()

        File "/usr/lib64/python2.6/socket.py", line 433, in readline

          data = recv(1)

        socket.error: [Errno 104] Connection reset by peer

       

    And the same thing in the epa.log when running it in the agent:

     

        9/12/14 03:36:59 PM BST [INFO] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] Starting plugin 'RABBITMQ_CONNECTIONS'.

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] Traceback (most recent call last):

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 943, in <module>

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     main()

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 384, in main

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     method()

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 526, in invoke_list

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     format_list(self.get(uri), cols, obj_info, self.options)

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 407, in get

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     return self.http("GET", "/api%s" % path, "")

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/opt/wily/RabbitMQ/epaplugins/RabbitMQ/rabbitmqadmin.py", line 436, in http

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     resp = conn.getresponse()

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     response.begin()

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/usr/lib64/python2.6/httplib.py", line 391, in begin

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     version, status, reason = self._read_status()

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     line = self.fp.readline()

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]   File "/usr/lib64/python2.6/socket.py", line 433, in readline

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ]     data = recv(1)

        9/12/14 03:36:59 PM BST [ERROR] [EPAgent.EPAgent RABBITMQ_CONNECTIONS] [ stderr ] socket.error: [Errno 104] Connection reset by peer

     

    Am I doing something wrong?



  • 4.  Re: RabbitMQ EPA Instructions

    Broadcom Employee
    Posted Sep 12, 2014 11:00 AM
    That's a problem with either python or rabbitmq.
    Try running the admin script by itself to verify.


  • 5.  Re: RabbitMQ EPA Instructions

    Posted Sep 12, 2014 11:38 AM

    Same thing:

     

            [root@brsuxtsnmq31 RabbitMQ]# python rabbitmqadmin.py --host=localhost --port=5672 --username=guest --password=guest --format=tsv list connections

            Traceback (most recent call last):

              File "rabbitmqadmin.py", line 943, in <module>

                main()

              File "rabbitmqadmin.py", line 384, in main

                method()

              File "rabbitmqadmin.py", line 526, in invoke_list

                format_list(self.get(uri), cols, obj_info, self.options)

              File "rabbitmqadmin.py", line 407, in get

                return self.http("GET", "/api%s" % path, "")

              File "rabbitmqadmin.py", line 436, in http

                resp = conn.getresponse()

              File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse

                response.begin()

              File "/usr/lib64/python2.6/httplib.py", line 391, in begin

                version, status, reason = self._read_status()

              File "/usr/lib64/python2.6/httplib.py", line 349, in _read_status

                line = self.fp.readline()

              File "/usr/lib64/python2.6/socket.py", line 433, in readline

                data = recv(1)

            socket.error: [Errno 104] Connection reset by peer

           

    The problem is we don't have a resident expert in RabbitMQ yet and the above error doesn't really seem to give any indication what the problem is.  Any ideas?



  • 6.  Re: RabbitMQ EPA Instructions

    Broadcom Employee
    Posted Sep 12, 2014 03:31 PM

    Is this a test or a Prod/Prod-like setup?

     

    Have you created channels, queues, etc?

     

    What version of RabbitMQ are you using?

     

    What version of Python?

     

    I found online a series of test apps for RabbitMQ someone developed in .NET to exercise the different functions. It also helps to setup RabbitMQ for testing.



  • 7.  Re: RabbitMQ EPA Instructions

    Posted Oct 21, 2014 11:47 AM

    Sorry for not replying here, I just noticed hadn't when I was replying to your post on my other thread about the same plugin.  Thanks for your help, when I started calling the perl scripts instead of the python script it all worked (except the errors described in the other thread).