Ad Widget

Collapse

Orabbix:"Another way to monitor Oracle reloaded"

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

    #16
    Originally posted by blueunderground
    okay, i have import it.

    What must i do next?

    Send the Orabbix-Client the data to the zabbix-server? How can i check it ?
    You need create an host for each database specified on config.props in parameter DatabaseList with the same name of databases configured on.
    After this you apply the template on your host.
    Now you should apply this template to your host
    If you have configured orabbix daemon and is running the daemon is already sending data to your zabbix server , and you should see the collected data try on latest data if zabbix server is receiving data.
    Andrea Dalle Vacche
    website:http://www.smartmarmot.com/
    e-mail:
    Author of:Mastering Zabbix Book - second edition
    Zabbix Network Monitoring Essentials

    Comment

    • blueunderground
      Junior Member
      • Nov 2008
      • 6

      #17
      Okay, thanks for your help ;-)

      The script works fine with zabbix, now.

      My problem was in zabbix. The hostname of the oracle-client in zabbix was the real name from the operating system e.g. "uranus". The databasename is "wiki".

      conf/config.props
      Code:
      #put here your databases in a comma separated list
      DatabaseList=wiki
      In the next release can you add a seperate variable e.g.

      # put here your zabbix-client hostname
      zabbix_client_hostname=uranos

      I think that is better for use.

      Thanks!

      Comment

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

        #18
        Originally posted by blueunderground
        Okay, thanks for your help ;-)

        The script works fine with zabbix, now.

        My problem was in zabbix. The hostname of the oracle-client in zabbix was the real name from the operating system e.g. "uranus". The databasename is "wiki".

        conf/config.props
        Code:
        #put here your databases in a comma separated list
        DatabaseList=wiki
        In the next release can you add a seperate variable e.g.

        # put here your zabbix-client hostname
        zabbix_client_hostname=uranos

        I think that is better for use.

        Thanks!
        Thank's for your feedback i don't want add this kind of information because this plug-in is made to monitor database, and here in our production environmente we have more database for server, and i need something that don't need an host name.

        i'm happy that now work!
        nice evening!
        Andrea Dalle Vacche
        website:http://www.smartmarmot.com/
        e-mail:
        Author of:Mastering Zabbix Book - second edition
        Zabbix Network Monitoring Essentials

        Comment

        • untergeek
          Senior Member
          Zabbix Certified Specialist
          • Jun 2009
          • 512

          #19
          Thank you for the template!

          Working great now!

          Comment

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

            #20
            Originally posted by untergeek
            Thank you for the template!

            Working great now!
            i'm happy that work!!! thank you for the feedback!!!!
            Andrea Dalle Vacche
            website:http://www.smartmarmot.com/
            e-mail:
            Author of:Mastering Zabbix Book - second edition
            Zabbix Network Monitoring Essentials

            Comment

            • untergeek
              Senior Member
              Zabbix Certified Specialist
              • Jun 2009
              • 512

              #21
              This is a comment and/or a question.

              We have many Oracle instances we are monitoring in our development, certification and production environments. Some are older, running Oracle 9i while most are running 10g. Zabbix is our lone 11g instance.

              We would be using a different list of queries for 9i than we would use for 10g or 11g. At present, Orabbix is set up for a single list of queries for all instances in the config.props file. While this limitation is not particularly limiting, it does raise questions.

              Our plan is to have a separate instance of Orabbix for each version of Oracle (e.g. Orabbix9, Orabbix10, Orabbix11). Would it be possible to specify an extra config line for a separate query list?

              CZAB11DB.Url=jdbcracle:thin:@czab11db.incert.REDACTED.com:1560:CZAB 11DB
              CZAB11DB.User=REDACTED
              CZAB11DB.Password=REDACTED
              CZAB11DB.QueryList=CZAB11DB.props

              Comment

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

                #22
                Originally posted by untergeek
                This is a comment and/or a question.

                We have many Oracle instances we are monitoring in our development, certification and production environments. Some are older, running Oracle 9i while most are running 10g. Zabbix is our lone 11g instance.

                We would be using a different list of queries for 9i than we would use for 10g or 11g. At present, Orabbix is set up for a single list of queries for all instances in the config.props file. While this limitation is not particularly limiting, it does raise questions.

                Our plan is to have a separate instance of Orabbix for each version of Oracle (e.g. Orabbix9, Orabbix10, Orabbix11). Would it be possible to specify an extra config line for a separate query list?

                CZAB11DB.Url=jdbcracle:thin:@czab11db.incert.REDACTED.com:1560:CZAB 11DB
                CZAB11DB.User=REDACTED
                CZAB11DB.Password=REDACTED
                CZAB11DB.QueryList=CZAB11DB.props
                This it's a nice pros when i have time i'll write the code to do that.... it's not so simple...in this way you can have how much as you want querylist
                Thank you for the good idea.
                The second way (run a daemon for each version of oracle) is possible but stop script and restart should be modified, because i didn't consider to have more than one orabbix running and so the stop script it's a simple "kill orabbix".
                The easy way should be write pidfile inside a file and kill the pid contained on this file.

                Anyway thank you for this idea!
                Andrea Dalle Vacche
                website:http://www.smartmarmot.com/
                e-mail:
                Author of:Mastering Zabbix Book - second edition
                Zabbix Network Monitoring Essentials

                Comment

                • sybex
                  Junior Member
                  Zabbix Certified Specialist
                  • Aug 2008
                  • 29

                  #23
                  Hi, ...

                  i have a problem to connect to new database. The configuration looks normal. I didn't change anything on the querys. Java 1.6.9 is running:

                  2010-04-23 16:26:20,773 [main] INFO Orabbix - Starting Orabbix Version 0.6
                  2010-04-23 16:26:20,781 [main] DEBUG Orabbix - Starting configurator...
                  2010-04-23 16:26:20,781 [main] DEBUG Orabbix - getConnection for database host
                  2010-04-23 16:26:21,122 [main] ERROR Orabbix - Error on Configurator for database host -->Invalid column name
                  2010-04-23 16:26:21,122 [main] ERROR Orabbix - This Database host will be removed
                  2010-04-23 16:26:21,126 [main] ERROR Orabbix - Error on Configurator on getOracleQueries empty query
                  2010-04-23 16:26:21,126 [main] WARN Orabbix - New Database Founded: adding database host
                  2010-04-23 16:26:21,189 [main] ERROR Orabbix - Error on Configurator for database host-->Invalid column name
                  2010-04-23 16:26:21,189 [main] ERROR Orabbix - This Database host will be removed

                  Installed is Orabbix 0.6.1 and Zabbix 1.8.2. Orabbix is running directly on the Zabbix server. Do you have a idea?

                  Comment

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

                    #24
                    mmm.. it's strange,
                    try to connect on your database with the credentials configured inside orabbix and try to do this query on sqlplus:
                    SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER') FROM DUAL;
                    and this other query:
                    SELECT SYS_CONTEXT ('USERENV', 'INSTANCE_NAME') FROM DUAL;
                    and let me know the result, seems that the oracle user can't execute the two query above
                    Andrea Dalle Vacche
                    website:http://www.smartmarmot.com/
                    e-mail:
                    Author of:Mastering Zabbix Book - second edition
                    Zabbix Network Monitoring Essentials

                    Comment

                    • sybex
                      Junior Member
                      Zabbix Certified Specialist
                      • Aug 2008
                      • 29

                      #25
                      Hi, ...

                      hm it looks normal ... the database is productive one:

                      AREPDB-oracle@afcrep01P:~$ sqlplus zabbix/******

                      SQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 23 17:30:21 2010

                      Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


                      Connected to:
                      Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
                      With the Partitioning, OLAP, Data Mining Scoring Engine and Real Application Testing options

                      SQL> SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER') FROM DUAL;

                      SYS_CONTEXT('USERENV','SESSION
                      --------------------------------------------------------------------------------
                      ZABBIX

                      SQL> SELECT SYS_CONTEXT ('USERENV', 'INSTANCE_NAME') FROM DUAL;

                      SYS_CONTEXT('USERENV','INSTANC
                      --------------------------------------------------------------------------------
                      AREPDB

                      SQL>

                      In the Listener Logfile you can also find the entry from the Zabbix server ip with the jdbc connector.

                      In my test environment inhouse orabbix works perfectly.

                      Comment

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

                        #26

                        try to put in debug the logger, is really verbose but so probably i can undestand where is the trouble, please let you free to send me the logfile on email.
                        To put Orabbix in debug you need chang on log4j.properties this line
                        # Set root logger level to DEBUG and its only appender to Orabbix.
                        log4j.rootLogger=INFO , Orabbix
                        and change it so:
                        # Set root logger level to DEBUG and its only appender to Orabbix.
                        log4j.rootLogger=DEBUG , Orabbix
                        Andrea Dalle Vacche
                        website:http://www.smartmarmot.com/
                        e-mail:
                        Author of:Mastering Zabbix Book - second edition
                        Zabbix Network Monitoring Essentials

                        Comment

                        • sybex
                          Junior Member
                          Zabbix Certified Specialist
                          • Aug 2008
                          • 29

                          #27
                          Originally posted by sybex
                          Hi, ...

                          i have a problem to connect to new database. The configuration looks normal. I didn't change anything on the querys. Java 1.6.9 is running:

                          2010-04-23 16:26:20,773 [main] INFO Orabbix - Starting Orabbix Version 0.6
                          2010-04-23 16:26:20,781 [main] DEBUG Orabbix - Starting configurator...
                          2010-04-23 16:26:20,781 [main] DEBUG Orabbix - getConnection for database host
                          2010-04-23 16:26:21,122 [main] ERROR Orabbix - Error on Configurator for database host -->Invalid column name
                          2010-04-23 16:26:21,122 [main] ERROR Orabbix - This Database host will be removed
                          2010-04-23 16:26:21,126 [main] ERROR Orabbix - Error on Configurator on getOracleQueries empty query
                          2010-04-23 16:26:21,126 [main] WARN Orabbix - New Database Founded: adding database host
                          2010-04-23 16:26:21,189 [main] ERROR Orabbix - Error on Configurator for database host-->Invalid column name
                          2010-04-23 16:26:21,189 [main] ERROR Orabbix - This Database host will be removed

                          Installed is Orabbix 0.6.1 and Zabbix 1.8.2. Orabbix is running directly on the Zabbix server. Do you have a idea?
                          Hi, ...

                          as you can see it was already on DEBUG mode. I guess there is no more output.

                          Can you put more output on the programm? I would test it and give you output.

                          Comment

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

                            #28
                            Originally posted by sybex
                            Hi, ...

                            as you can see it was already on DEBUG mode. I guess there is no more output.

                            Can you put more output on the programm? I would test it and give you output.
                            for what i can see you have spcified a dbname that is called "host" so your config file should be something like this-one
                            DatabaseList=host

                            host.Url=jdbcracle:thin:@server.example.com:1521:instancename
                            host.User=zabbix
                            host.Password=zabbix_password

                            if your db is not named "host" there is something of wrong on config file because Orabbix is trying to connect on db called "host"

                            this is the only information that i can say... i'm sorry i need improve the error message ...
                            Andrea Dalle Vacche
                            website:http://www.smartmarmot.com/
                            e-mail:
                            Author of:Mastering Zabbix Book - second edition
                            Zabbix Network Monitoring Essentials

                            Comment

                            • sybex
                              Junior Member
                              Zabbix Certified Specialist
                              • Aug 2008
                              • 29

                              #29
                              Hi, ...

                              this was just an example. Here is the Config:

                              PHP Code:
                              ZabbixServer.Address=localhost
                              ZabbixServer
                              .Port=10051

                              #frequency of item's refresh
                              OrabbixDaemon.Sleep=300
                              #MaxThreadNumber should be >= than the number of your databases
                              OrabbixDaemon.MaxThreadNumber=100

                              #put here your databases in a comma separated list
                              DatabaseList=.afcrep01P

                              #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
                              .afcrep01P.Url=jdbc:oracle:thin:@10.202.100.115:25000:AREPDB
                              .afcrep01P.User=zabbix
                              .afcrep01P.Password=******

                              #Query Parameter Files
                              OracleQueryListFile=/opt/orabbix/conf/query.props 
                              Attached Files

                              Comment

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

                                #30
                                The only thing that is coming on my mind is that the "dot" in front of hostname as 1st character may be invalid on a properties file in java. Please try to remove the "." on the beginning of hostname from config file and let me know if work.



                                Last edited by dalle; 24-05-2010, 22:19.
                                Andrea Dalle Vacche
                                website:http://www.smartmarmot.com/
                                e-mail:
                                Author of:Mastering Zabbix Book - second edition
                                Zabbix Network Monitoring Essentials

                                Comment

                                Working...