4 Replies Latest reply on Mar 7, 2013 4:31 AM by Arun Raj

    How to get the data from the  postgres

    udayatom Newbie

           Hello friends,

       

       

                                       what are the procedures to get the data from the postgres as grid form, is you have any plugin, give the meterials...  please explain through source code pls guys...

       

       

      Regards,

       

      UdayaKumar

        • 1. Re: How to get the data from the  postgres
          jay shaughnessy Expert

          The Postgres plugin has very limited support for this, any work you do to improve this would be welcome.  Today the plugin is targeted more at DB inspection and administration, not as a query tool.  There is, at the Database resource level, an operation that allows for executing ad-hoc sql.  The return value comes back as a badly formatted html string.

           

          First of all, this is a dangerous thing to do unless the query is properly constrained (Limit the number of rows returned) for potentially large table fetches.  Second, the return format is terrible.

           

          In general I don't think the plugin really is targeted as a replacement for a typical DB query tool, but rather a way to set up alerting for sitautions where the database performance/storage is degrading.  Once alerted an admin could use RHQ to perform inspection and some of the admin, but may want to complement that with PGAdminIII, for example.

          • 2. Re: How to get the data from the  postgres
            Arun Raj Expert

            Hi Jay Shaughnessy,

             

               Sorry to intrude in this disscussion. I am also working on retrieving data from POSTGRESQL.

            jay shaughnessy wrote:

             

            Today the plugin is targeted more at DB inspection and administration, not as a query tool.  There is, at the Database resource level, an operation that allows for executing ad-hoc sql.  The return value comes back as a badly formatted html string.

             

               Before your saying, I thought We can retrieve data from Postgresql Database. Because, In the following link, someone have implemented it. http://management-platform.blogspot.in/2012/03/monitoring-custom-data-from-db-queries.html

             

               Right Now, I am confused. Please clarify me whether we can retrieve data from postgresql or not. If yes, then HOW ? Please reply to me.

             

             

            Regards,

            ArunRaj

            • 3. Re: How to get the data from the  postgres
              Thomas Segismont Expert

              Arun,

               

              The page you're referring to explains how to create a resource of type Database Query. The underlying goal is to be able to create a custom metric, not to show database data.

               

              There are plenty of tools out there to view database data.

               

              Regards,

              Thomas

              • 4. Re: How to get the data from the  postgres
                Arun Raj Expert

                Hi Thomas,

                 

                    Oh My God, I thought those Database Query is for retrieving data from Postgres Database. Thanks for your clarification.

                 

                    Above discussion pushed me to raise some questions.  

                         No 1) What I have to do to retrieve data from Databases

                 

                         No 2) Can you tell me, What is that Custom Metric, and Why we need it for ? ( As I know metric is a element in pom.xml to retrieve value from Managed Devices - http://pilhuhn.blogspot.in/2008/05/writing-rhq-plugin-part-2.html ).

                 

                         No 3) By that Custom Metric, What we can retrieve?

                 

                    Can you suggest me, database retrieval tools which supports RHQ.

                 

                Regards,

                ArunRaj