Ad Widget

Collapse

Born Today: PostBIX to monitor PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dalle
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 402

    #16
    thankyou for all the feedback, I've followed this

    and the zabbix wiki
    http://www.zabbix.com/wiki/howto/monitor/db/postgresql
    and on mine databases all is working fine...
    I'm using portgresql 8.4 and 8.2 on Linux
    seems that you don't have this table pg_stat_bgwriter i'm looking how this is possible
    Last edited by dalle; 02-12-2010, 15:32.
    Andrea Dalle Vacche
    website:http://www.smartmarmot.com/
    e-mail:
    Author of:Mastering Zabbix Book - second edition
    Zabbix Network Monitoring Essentials

    Comment

    • dalle
      Senior Member
      Zabbix Certified Specialist
      • Mar 2009
      • 402

      #17
      Nope I have only Postgres 8.4!!! and pg_stat_bgwriter.
      the pg_stat_bgwriter structure was introduced in 8.3
      Andrea Dalle Vacche
      website:http://www.smartmarmot.com/
      e-mail:
      Author of:Mastering Zabbix Book - second edition
      Zabbix Network Monitoring Essentials

      Comment

      • tof233
        Member
        • Nov 2010
        • 94

        #18
        Mine is PostgreSQL version 8.1.22
        So I will try to upgrade.
        But it will probably not be possible to upgrade the servers in prod.

        Edit: There is a postgresql84 on Red Hat repos. So I try it.
        Last edited by tof233; 02-12-2010, 15:40.

        Comment

        • tof233
          Member
          • Nov 2010
          • 94

          #19
          It's now perfectly working:
          Code:
          accessexclusivelock	 02 Dec 2010 14:58:50	0	- 	Graph
          accesssharelock		 02 Dec 2010 14:58:50	1	- 	Graph
          Activeconnection	 02 Dec 2010 14:58:50	1	+1	Graph
          Alive			 02 Dec 2010 14:58:50	1	+1	Graph
          buffers_alloc		 02 Dec 2010 14:58:50	648	- 	Graph
          buffers_backend		 02 Dec 2010 14:58:50	162	- 	Graph
          buffers_checkpoint	 02 Dec 2010 14:58:50	7	- 	Graph
          buffers_clean		 02 Dec 2010 14:58:50	0	- 	Graph
          checkpoints_req		 02 Dec 2010 14:58:50	2	- 	Graph
          checkpoints_timed	 02 Dec 2010 14:58:50	0	- 	Graph
          exclusivelock		 02 Dec 2010 14:58:50	1	- 	Graph
          maxwritten_clean	 02 Dec 2010 14:58:50	0	- 	Graph
          rowexclusivelock	 02 Dec 2010 14:58:50	0	- 	Graph
          rowsharelock		 02 Dec 2010 14:58:50	0	- 	Graph
          sharerowexclusivelock	 02 Dec 2010 14:58:50	0	- 	Graph
          shareupdateexclusivelock 02 Dec 2010 14:58:50	0	- 	Graph
          tupdeleted		 02 Dec 2010 14:58:50	1	- 	Graph
          tupfetched		 02 Dec 2010 14:58:50	37108	- 	Graph
          tupinserted		 02 Dec 2010 14:58:50	3889	- 	Graph
          tupreturned				- 	-	- 	Graph
          tupupdated		 02 Dec 2010 14:58:50	375	- 	Graph
          xactcommit		 02 Dec 2010 14:58:50	535	+535	Graph
          xactrollback		 02 Dec 2010 14:58:50	146	+146	Graph
          But upgrading postgresql is not as easy as you need to dump the databases with the old postgresql server and then insert them into postgresql 8.x . I'm not sure my database administrator will appreciate.

          Anyway, thank you for your great job. It's really useful and easy to set up. The only problem is from postgresql version.
          Last edited by tof233; 02-12-2010, 16:25.

          Comment

          • dalle
            Senior Member
            Zabbix Certified Specialist
            • Mar 2009
            • 402

            #20
            PostBIX 1.1.0

            PostBIX 1.1.0 has been relased more info are available here:

            Andrea Dalle Vacche
            website:http://www.smartmarmot.com/
            e-mail:
            Author of:Mastering Zabbix Book - second edition
            Zabbix Network Monitoring Essentials

            Comment

            • acalvo
              Member
              • Oct 2010
              • 30

              #21
              I'm getting this error with version 1.1.0:
              Code:
              Exception in thread "main" java.lang.NoClassDefFoundError: com/Ostermiller/util/Base64
              	at com.smartmarmot.postbix.Sender.<init>(Sender.java:83)
              	at main.main(main.java:190)
              Caused by: java.lang.ClassNotFoundException: com.Ostermiller.util.Base64
              	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              	at java.security.AccessController.doPrivileged(Native Method)
              	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
              	... 2 more
              This is my config.props:
              Code:
              #Comma separed list of zabbix servers and ports
              ZabbixServerList=ZabbixServer
              ZabbixServer.Address=zabbix_IP
              ZabbixServer.Port=10051
              
              
              PostbixDaemon.PidFile=./logs/postbix.pid
              #frequency of item's refresh
              PostbixDaemon.Sleep=300
              #MaxThreadNumber should be >= than the number of your databases
              PostbixDaemon.MaxThreadNumber=100
              
              #put here your databases in a comma separated list
              DatabaseList=DB1
              
              #Configuration of Connection pool
              #Maximum number of active connection inside pool
              DatabaseList.MaxActive=10
              #The maximum number of milliseconds that the pool will wait
              #(when there are no available connections) for a connection to be returned
              #before throwing an exception, or <= 0 to wait indefinitely.
              DatabaseList.MaxWait=100
              DatabaseList.MaxIdle=1
              
              #define here your connection string for each database
              DB1.Url=jdbc:postgresql://127.0.0.1:5432/mydb
              DB1.User=myuser
              DB1.Password=mypassword
              
              
              #Query Parameter Files
              QueryListFile=/opt/postbix/conf/query.props
              Any hint?

              Edit: I've just figured out that some libs were missing, used the lib directory from RC2.
              Last edited by acalvo; 23-12-2010, 14:17.

              Comment

              • dalle
                Senior Member
                Zabbix Certified Specialist
                • Mar 2009
                • 402

                #22
                I'm sorry.
                It's more or less a my fault (sourceforge it's not right updated) please try with this jar and let me know
                Attached Files
                Andrea Dalle Vacche
                website:http://www.smartmarmot.com/
                e-mail:
                Author of:Mastering Zabbix Book - second edition
                Zabbix Network Monitoring Essentials

                Comment

                • dalle
                  Senior Member
                  Zabbix Certified Specialist
                  • Mar 2009
                  • 402

                  #23
                  Originally posted by acalvo
                  I'm getting this error with version 1.1.0:
                  Code:
                  Exception in thread "main" java.lang.NoClassDefFoundError: com/Ostermiller/util/Base64
                  	at com.smartmarmot.postbix.Sender.<init>(Sender.java:83)
                  	at main.main(main.java:190)
                  Caused by: java.lang.ClassNotFoundException: com.Ostermiller.util.Base64
                  	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
                  	at java.security.AccessController.doPrivileged(Native Method)
                  	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
                  	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                  	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                  	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
                  	... 2 more
                  This is my config.props:
                  Code:
                  #Comma separed list of zabbix servers and ports
                  ZabbixServerList=ZabbixServer
                  ZabbixServer.Address=zabbix_IP
                  ZabbixServer.Port=10051
                  
                  
                  PostbixDaemon.PidFile=./logs/postbix.pid
                  #frequency of item's refresh
                  PostbixDaemon.Sleep=300
                  #MaxThreadNumber should be >= than the number of your databases
                  PostbixDaemon.MaxThreadNumber=100
                  
                  #put here your databases in a comma separated list
                  DatabaseList=DB1
                  
                  #Configuration of Connection pool
                  #Maximum number of active connection inside pool
                  DatabaseList.MaxActive=10
                  #The maximum number of milliseconds that the pool will wait
                  #(when there are no available connections) for a connection to be returned
                  #before throwing an exception, or <= 0 to wait indefinitely.
                  DatabaseList.MaxWait=100
                  DatabaseList.MaxIdle=1
                  
                  #define here your connection string for each database
                  DB1.Url=jdbc:postgresql://127.0.0.1:5432/mydb
                  DB1.User=myuser
                  DB1.Password=mypassword
                  
                  
                  #Query Parameter Files
                  QueryListFile=/opt/postbix/conf/query.props
                  Any hint?

                  Edit: I've just figured out that some libs were missing, used the lib directory from RC2.
                  I've changed the method that I use to send items because I didn't found which kind of royalty have Ostermiller library and so in this release there isn't more Ostermiller but i use apache codec library
                  Andrea Dalle Vacche
                  website:http://www.smartmarmot.com/
                  e-mail:
                  Author of:Mastering Zabbix Book - second edition
                  Zabbix Network Monitoring Essentials

                  Comment

                  • dalle
                    Senior Member
                    Zabbix Certified Specialist
                    • Mar 2009
                    • 402

                    #24
                    Postbix 1.2.0-RC1 has been released

                    Postbix 1.2.0-RC1 has been released.



                    Improved scalability and multithreading now Postbix can scale very easily
                    Now controls executed on databases are independent of each other
                    I removed almost completely sequential procedure on software so bottlenecks are higly reduced
                    Added parameter
                    <QueryName>.Trim=[true|false] if true the resultset is trimmed (default is true)
                    <QueryName>.AddSpaces=[true|false] if true the add a space between columns of resultset(default is true)
                    <QueryName>.ExcludeColumnsList=[1,2,3,..n]= exclude from result set the 1st, the 2nd etc.. columns from resultset

                    Now PostBIX use jdbc4 for PostgeSQL 9.0
                    NOTE: This is a Candidare Release
                    Andrea Dalle Vacche
                    website:http://www.smartmarmot.com/
                    e-mail:
                    Author of:Mastering Zabbix Book - second edition
                    Zabbix Network Monitoring Essentials

                    Comment

                    • dalle
                      Senior Member
                      Zabbix Certified Specialist
                      • Mar 2009
                      • 402

                      #25
                      I've released today DBforBIX.
                      DBforBIX arises from the need to integrate all born of Orabbix’s fork.
                      DBforBIX can enquiry and monitor vital parameter of:
                      • Oracle
                      • MySQL
                      • PostgreSQL
                      • MS SQL Server
                      • DB2

                      Till now DB2 and MS SQL Server are not tested and they can be unstable

                      DBforBIX still remain superscalar and multi thread.
                      NOTE: now Items are collisionless because they have a prefix how adviced from Aaron Kulik (thank you Aaron)

                      THIS IS A PREVIEW IT’S ONLY 0.1 RELEASE AND IS NOT FULLY TESTED PRODUCTION RELEASE
                      You can download DBforBIX from my website, sources are available on sourceforge as usual
                      NOTE: there are not included ojdbc6.jar needed for oracle and db2jcc.jar db2jcc_license_cu.jar needed by DB2
                      Andrea Dalle Vacche
                      website:http://www.smartmarmot.com/
                      e-mail:
                      Author of:Mastering Zabbix Book - second edition
                      Zabbix Network Monitoring Essentials

                      Comment

                      • concrete
                        Junior Member
                        • Dec 2011
                        • 1

                        #26
                        a tiny patch so postbix template will show up in the right group

                        --- postbix-original/template/postbix_template.xml 2010-12-06 15:11:32.000000000 -0500
                        +++ postbix/template/postbix_template.xml 2011-12-09 18:54:52.000000000 -0500
                        @@ -16,7 +16,7 @@
                        <ipmi_username></ipmi_username>
                        <ipmi_password></ipmi_password>
                        <groups>
                        - <group>TEMPLATES</group>
                        + <group>Templates</group>
                        </groups>
                        <triggers>
                        <trigger>

                        Comment

                        • dalle
                          Senior Member
                          Zabbix Certified Specialist
                          • Mar 2009
                          • 402

                          #27
                          Originally posted by concrete
                          --- postbix-original/template/postbix_template.xml 2010-12-06 15:11:32.000000000 -0500
                          +++ postbix/template/postbix_template.xml 2011-12-09 18:54:52.000000000 -0500
                          @@ -16,7 +16,7 @@
                          <ipmi_username></ipmi_username>
                          <ipmi_password></ipmi_password>
                          <groups>
                          - <group>TEMPLATES</group>
                          + <group>Templates</group>
                          </groups>
                          <triggers>
                          <trigger>
                          Right thank you!
                          Andrea Dalle Vacche
                          website:http://www.smartmarmot.com/
                          e-mail:
                          Author of:Mastering Zabbix Book - second edition
                          Zabbix Network Monitoring Essentials

                          Comment

                          • bindir
                            Junior Member
                            • Jan 2012
                            • 2

                            #28
                            Think I figured out this issue, now to figure out why my data isn't propagating
                            Last edited by bindir; 10-01-2012, 03:06.

                            Comment

                            • bindir
                              Junior Member
                              • Jan 2012
                              • 2

                              #29
                              Originally posted by bindir
                              Think I figured out this issue, now to figure out why my data isn't propagating
                              I'm still having an issue where data isn't showing up on my zabbix machine
                              (postgresql 9.0 on redhat is my config)
                              logs look like this:

                              Code:
                              2012-01-09 19:55:32,559 [main] INFO  Postbix - Connected as zabbix
                               2012-01-09 19:55:32,560 [main] INFO  Postbix - --------- on Database -> pacsdb
                               2012-01-09 19:55:32,570 [main] INFO  Postbix - Connected as zabbix
                               2012-01-09 19:55:32,570 [main] INFO  Postbix - --------- on Database -> arrdb
                               2012-01-09 19:55:32,679 [pool-1-thread-1] INFO  Postbix - Done with dbJob on database pacsdb QueryList elapsed time 80 m
                              s
                               2012-01-09 19:55:32,681 [pool-1-thread-2] INFO  Postbix - Done with dbJob on database arrdb QueryList elapsed time 81 ms
                               2012-01-09 19:56:32,626 [pool-1-thread-3] INFO  Postbix - Done with dbJob on database pacsdb QueryList elapsed time 7 ms
                               2012-01-09 19:56:32,627 [pool-1-thread-4] INFO  Postbix - Done with dbJob on database arrdb QueryList elapsed time 5 ms
                               2012-01-09 19:57:32,650 [pool-1-thread-6] INFO  Postbix - Done with dbJob on database arrdb QueryList elapsed time 6 ms
                               2012-01-09 19:57:32,650 [pool-1-thread-5] INFO  Postbix - Done with dbJob on database pacsdb QueryList elapsed time 7 ms
                               2012-01-09 19:58:32,672 [pool-1-thread-8] INFO  Postbix - Done with dbJob on database arrdb QueryList elapsed time 7 ms
                               2012-01-09 19:58:32,677 [pool-1-thread-7] INFO  Postbix - Done with dbJob on database pacsdb QueryList elapsed time 12 m
                              s
                              don't see any errors connecting to the zabbix server or vice versa
                              Last edited by bindir; 10-01-2012, 21:46.

                              Comment

                              • mcortinas
                                Junior Member
                                • Oct 2011
                                • 8

                                #30
                                Testing postbix 1.2.0-RC1 to watch postgres 9.2

                                Hello,

                                I'm trying to test postbix to watch postgresql 9.2 in centOs6.2 and i've seen this output logfile.

                                I see this WARN message for all query definitions defined in query.props

                                Code:
                                 2012-10-25 11:45:04,658 [main] INFO  Postbix - Postbix started with pid:29161
                                 2012-10-25 11:45:04,658 [main] INFO  Postbix - PidFile -> ./logs/postbix.pid
                                 2012-10-25 11:45:04,752 [main] INFO  Postbix - Connected as zabbix
                                 2012-10-25 11:45:04,753 [main] INFO  Postbix - --------- on Database -> postgres
                                 2012-10-25 11:45:04,781 [pool-1-thread-1] WARN  Postbix - received unexpected response '' for key 'alive'
                                 2012-10-25 11:45:04,782 [pool-1-thread-1] WARN  Postbix - received unexpected response '' for key 'PostbixVersion'
                                 2012-10-25 11:45:04,813 [pool-1-thread-1] WARN  Postbix - received unexpected response '' for key 'activeconn'

                                Comment

                                Working...