Ad Widget

Collapse

DBforBIX

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

    #1

    DBforBIX

    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
  • tof233
    Member
    • Nov 2010
    • 94

    #2
    Thank you Dalle

    It tested it in parallel with MySQLBIX

    I have changed these parameters in the config.props provided by DBforBIX :
    DBforBIXDaemon.PidFile=./logs/orabbix.pid -> DBforBIX.PidFile=./logs/dbforbix.pid
    DBforBIXDaemon.MaxThreadNumber -> DBforBIX.MaxThreadNumber
    DBforBIXDaemon.Sleep -> DBforBIX.Sleep
    But I still have a problem:
    Code:
     2011-05-04 17:15:22,337 [main] INFO  DBforBIX - Starting DBforBIX Version 1.0-BETA
     2011-05-04 17:15:22,350 [main] INFO  DBforBIX - DBforBIX started with pid:20674
     2011-05-04 17:15:22,350 [main] INFO  DBforBIX - PidFile -> ./logs/dbforbix.pid
     2011-05-04 17:15:22,370 [main] ERROR DBforBIX - Error on Configurator for database SVIMGCAPL002 -->com.mysql.jdbc.Driver
     2011-05-04 17:15:22,370 [main] INFO  DBforBIX - This Database SVIMGCAPL002 removed
     2011-05-04 17:15:22,370 [main] ERROR DBforBIX - ERROR on main - Connections is empty or null
     2011-05-04 17:15:22,391 [main] INFO  DBforBIX - New database founded! SVIMGCAPL002
     2011-05-04 17:15:22,391 [main] ERROR DBforBIX - Error on Configurator for database SVIMGCAPL002 -->com.mysql.jdbc.Drive
    Here is my configuration file (quite the same than the working one for mysqlbix):
    Code:
    ZabbixServerList=ZabbixServer1
    
    ZabbixServer1.Address=192.168.10.32
    
    ZabbixServer1.Port=10051
    
    
    
    #pidFile
    
    DBforBIX.PidFile=./logs/orabbix.pid
    
    
    #frequency of item's refresh
    
    DBforBIX.Sleep=30
    
    #MaxThreadNumber should be >= than the number of your databases
    
    DBforBIX.MaxThreadNumber=100
    
    
    #put here your databases in a comma separated list
    
    DatabaseList=SVIMGCAPL002
    
    
    
    #Configuration of Connection pool
    
    #if not specified Orabbis is going to use default values (hardcoded)
    
    #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
    
    
    
    ###MySQL Server
    
    #define here your connection string for each database
    
    #on the following example we are treating MySQL
    
    SVIMGCAPL002.Url=jdbc:mysql://127.0.0.1:3306/zabbix
    
    SVIMGCAPL002.User=zabbix
    
    SVIMGCAPL002.Password=********
    
    SVIMGCAPL002.DatabaseType=mysql
    
    SVIMGCAPL002.QueryListFile=./conf/mysqlquery.props
    
    #Those values are optionals if not specified DBforBIX is going to use his own default values
    
    SVIMGCAPL002.MaxActive=10
    
    SVIMGCAPL002.MaxWait=100
    
    SVIMGCAPL002.MaxIdle=1
    Do you have an idea of the origin of this problem?
    Last edited by tof233; 04-05-2011, 17:18.

    Comment

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

      #3
      Please be patience, I'm just askin you have opened the port 3306 and you can connect to MySQL server with network and not only with socket? I'm asking because your seem a trouble on connection.
      p.s. THANK YOUU FOR THE FIRST FEEDBACK!!!!
      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

        #4
        You're welcome
        Yes, it's connected. Zabbix is running normally and MySQLBIX too.

        Comment

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

          #5
          Originally posted by tof233
          You're welcome
          Yes, it's connected. Zabbix is running normally and MySQLBIX too.
          It's a trouble made by classpath please try to modify run.sh and place inside this line instead the existing one

          java -Duser.language=en -Duser.country=US -Dlog4j.configuration=./conf/log4j.properties -cp $(for i in lib/*.jar ; do echo -n $i: ; done).:./dbforbix-0.1.jar com.smartmarmot.dbforbix.bootstrap start ./conf/config.props &
          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

            #6
            Originally posted by dalle
            It's a trouble made by classpath please try to modify run.sh and place inside this line instead the existing one

            java -Duser.language=en -Duser.country=US -Dlog4j.configuration=./conf/log4j.properties -cp $(for i in lib/*.jar ; do echo -n $i: ; done).:./dbforbix-0.1.jar com.smartmarmot.dbforbix.bootstrap start ./conf/config.props &
            Thank you Dalle, it totally solved the problem :
            2011-05-05 11:54:08,430 [pool-1-thread-1] INFO DBforBIX - Done with dbJob on database SVIMGCAPL002 QueryList elapsed time 613 ms

            Comment

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

              #7

              I've published DBforBIX 0.2.
              DBforBIX now run on Windows as a service!
              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

              • zaicnupagadi
                Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2010
                • 73

                #8
                Little Java problem

                Hi!

                I'm trying to implement dbforbix, it seems to be agreat tool, especially we would like to monitor the TSM database with it. After trying to start the dbfoxbix deamon (/etc/init.d/dbforbix start) I got such a error:

                java.lang.IllegalArgumentException
                at java.util.concurrent.ThreadPoolExecutor.<init>(Thr eadPoolExecutor.java:1275)
                at java.util.concurrent.ThreadPoolExecutor.<init>(Thr eadPoolExecutor.java:1163)
                at java.util.concurrent.Executors.newFixedThreadPool( Executors.java:89)
                at com.smartmarmot.dbforbix.DBforBIX.run(DBforBIX.jav a:116)
                at com.smartmarmot.dbforbix.bootstrap.main(bootstrap. java:63)

                My OS is
                (/proc/version:)
                Linux version 2.6.18-238.9.1.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Mar 18 12:42:39 EDT 2011

                My java version seems to be all right:
                (java --version)
                java version "1.6.0_17"
                OpenJDK Runtime Environment (IcedTea6 1.7.10) (rhel-1.21.b17.el5-x86_64)
                OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

                Have you got any sugestions? At the moment we use only orabbix and it's working fine, I would be appreciate for any help.
                Cheers,

                Comment

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

                  #9
                  to run it on DB2 you need to download and add on lib directory
                  • db2jcc.jar
                  • db2jcc_licence_cu.jar

                  and for Oracle you should download
                  • ojdbc6.jar

                  I've removed all the proprietary libs because I've received a notification that I can't redistribute them without an explicit permission.
                  Btw you can find them on your own installation (DB2 server and Oracle Server) or download them with IBM ID or Oracle account.
                  Let me know if you still have this issue.
                  p.s. DB2 It's a work in progress (I'm not a DB2 admin) and it's not really well tested, If you have some queries that you want to run I can add them just let me know I'll give all my support!
                  Andrea Dalle Vacche
                  website:http://www.smartmarmot.com/
                  e-mail:
                  Author of:Mastering Zabbix Book - second edition
                  Zabbix Network Monitoring Essentials

                  Comment

                  • zaicnupagadi
                    Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Dec 2010
                    • 73

                    #10
                    I will test it tomorrow, I tried to download that odbc but it apared I have to register on oracle , will do it tomorrow. If you already have those libraries -> <email hidden> it will be helpfull.

                    Have a nice day!
                    Last edited by zaicnupagadi; 18-07-2018, 19:23.

                    Comment

                    • zaicnupagadi
                      Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Dec 2010
                      • 73

                      #11
                      Thank you for your email - as I saw it I simply couldn't wait till tomorrow

                      I have added those libraries into /opb/dbforbix/lib directory and now I have such an output:

                      java.lang.NullPointerException
                      at com.smartmarmot.dbforbix.Configurator.refresh(Conf igurator.java:281)
                      at com.smartmarmot.dbforbix.Querybox.refresh(Querybox .java:61)
                      at com.smartmarmot.dbforbix.DBforBIX.run(DBforBIX.jav a:177)
                      at com.smartmarmot.dbforbix.bootstrap.main(bootstrap. java:63)

                      I line less but still some problems, hove u got any clue?
                      Have a nice evening!

                      Comment

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

                        #12
                        Originally posted by zaicnupagadi
                        Thank you for your email - as I saw it I simply couldn't wait till tomorrow

                        I have added those libraries into /opb/dbforbix/lib directory and now I have such an output:

                        java.lang.NullPointerException
                        at com.smartmarmot.dbforbix.Configurator.refresh(Conf igurator.java:281)
                        at com.smartmarmot.dbforbix.Querybox.refresh(Querybox .java:61)
                        at com.smartmarmot.dbforbix.DBforBIX.run(DBforBIX.jav a:177)
                        at com.smartmarmot.dbforbix.bootstrap.main(bootstrap. java:63)

                        I line less but still some problems, hove u got any clue?
                        Have a nice evening!
                        did you have renamed query<database>.props.sample in query<database>.props
                        e.g.
                        mssqlquery.props.sample should be renamed in mssqlquery.props
                        every file included is .sample so it's collision free and you don't overwrite your own files
                        and let me know
                        Andrea Dalle Vacche
                        website:http://www.smartmarmot.com/
                        e-mail:
                        Author of:Mastering Zabbix Book - second edition
                        Zabbix Network Monitoring Essentials

                        Comment

                        • zaicnupagadi
                          Member
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Dec 2010
                          • 73

                          #13
                          Hi Andrea!
                          Yuuupiii!!
                          It worked! I haven't known that - in orabbix there was no oraclequery.props so I have just renamed the conf.props file - probably you have written some instructions what to do with those files and I haven't read them - if yes, I'm very sorry for taking your time for explaining me the basics

                          I didn't even think about renaming the other files!

                          Many, many thanks for your help

                          Comment

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

                            #14
                            Originally posted by zaicnupagadi
                            Hi Andrea!
                            Yuuupiii!!
                            It worked! I haven't known that - in orabbix there was no oraclequery.props so I have just renamed the conf.props file - probably you have written some instructions what to do with those files and I haven't read them - if yes, I'm very sorry for taking your time for explaining me the basics

                            I didn't even think about renaming the other files!

                            Many, many thanks for your help
                            You are welcome btw it's quite clear that I NEED to write more verbose logfile
                            Andrea Dalle Vacche
                            website:http://www.smartmarmot.com/
                            e-mail:
                            Author of:Mastering Zabbix Book - second edition
                            Zabbix Network Monitoring Essentials

                            Comment

                            • ufocek
                              Senior Member
                              • Aug 2006
                              • 161

                              #15
                              Hi Dalle,

                              Today I try run dbforbix 0.2 and I have in log some errror:

                              Code:
                              2011-05-10 14:34:08,374 [pool-1-thread-3] INFO  DBforBIX - Done with dbJob on database PGSQLDB2 QueryList elapsed time 4 ms
                               2011-05-10 14:35:07,933 [main] INFO  DBforBIX - Starting DBforBIX Version 0.2
                               2011-05-10 14:35:07,941 [main] INFO  DBforBIX - DBforBIX started with pid:31841
                               2011-05-10 14:35:07,942 [main] ERROR DBforBIX - Error on Configurator getPidFile java.lang.NullPointerException
                               2011-05-10 14:35:07,942 [main] ERROR DBforBIX - Error while trying to write pidfile java.lang.NullPointerException
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - DB Pool created: org.apache.commons.dbcp.datasources.SharedPoolDataSource@1787038
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - URL=jdbc:postgresql://127.0.0.1:5433/zabbix
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - maxPoolSize=10
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - maxIdleSize=1
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - maxIdleTime=1800000ms
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - poolTimeout=100
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - timeBetweenEvictionRunsMillis=-1
                               2011-05-10 14:35:07,978 [main] INFO  DBforBIX - numTestsPerEvictionRun=3
                               2011-05-10 14:35:08,119 [main] INFO  DBforBIX - Connected as zabbix
                               2011-05-10 14:35:08,120 [main] INFO  DBforBIX - --------- on Database -> zabbix
                               2011-05-10 14:35:08,121 [main] ERROR DBforBIX - Error on Configurator while retriving the DBforBIX.MaxThreadNumber java.lang.NumberFormatException: null
                               2011-05-10 14:35:08,206 [pool-1-thread-1] INFO  DBforBIX - Done with dbJob on database PGSQLDB2 QueryList elapsed time 58 ms
                              config

                              Code:
                              ZabbixServerList=ZabbixServer1
                              
                              ZabbixServer1.Address=192.168.1.96
                              ZabbixServer1.Port=10051
                              
                              
                              #pidFile
                              DBforBIXDaemon.PidFile=/tmp/orabbix.pid
                              #frequency of item's refresh
                              DBforBIXDaemon.Sleep=30
                              #MaxThreadNumber should be >= than the number of your databases
                              DBforBIXDaemon.MaxThreadNumber=200
                              
                              #put here your databases in a comma separated list
                              DatabaseList=PGSQLDB2
                              
                              #Configuration of Connection pool
                              #if not specified Orabbis is going to use default values (hardcoded)
                              #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
                              
                              ###PostgreSQL
                              #define here your connection string for each database
                              #on the following example we are treating PostgreSQL
                              PGSQLDB2.Url=jdbc:postgresql://127.0.0.1:5433/zabbix
                              PGSQLDB2.User=zabbix
                              PGSQLDB2.Password=xxxxxxxxxxxxxxxxx
                              PGSQLDB2.DatabaseType=pgsql
                              PGSQLDB2.QueryListFile=./conf/pgsqlquery.props
                              #Those values are optionals if not specified DBforBIX is going to use his own default values
                              PGSQLDB2.MaxActive=10
                              PGSQLDB2.MaxWait=100
                              PGSQLDB2.MaxIdle=1

                              Comment

                              Working...