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

    #241
    Originally posted by sa22
    Dalle, thanks a lot for your plugin!
    I have a small bug-report:
    1. "locks" query hangs oracle9.2i instance, could you check it?
    2. "DB Version" query doesn't return anything at oracle9.2i
    3. "Archivelog" query doesn't work at oracle9.2i

    Thanks!
    Thanks for all the compliments!
    I didn't reply because here it's holiday the day after Easter
    let me know if you still have some issue
    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

      #242
      Originally posted by fflux
      best guess is, are you running in archivelog mode?

      if no, then it won't show up because of the RaceCondition.
      if yes, put the query in sqlplus, first as sysdba if that works, try it on the orabbix user.

      if it's still working, try the RaceConditionQuery in sqlplus.

      if everything seems ok to you, then be sure to run orabbix 1.2rc2.

      otherwise i'm lost

      Felix
      Your support is great thank you
      Andrea Dalle Vacche
      website:http://www.smartmarmot.com/
      e-mail:
      Author of:Mastering Zabbix Book - second edition
      Zabbix Network Monitoring Essentials

      Comment

      • sa22
        Member
        • Apr 2009
        • 30

        #243
        Code:
        sqlplus "zabbix/pass"
        
        SQL*Plus: Release 9.2.0.7.0 - Production on Tue Apr 26 16:39:29 2011
        
        Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
        
        
        Connected to:
        Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
        With the Partitioning, OLAP and Oracle Data Mining options
        JServer Release 9.2.0.7.0 - Production
        
        SQL> select log_mode from v$database;
        
        LOG_MODE
        ------------
        ARCHIVELOG
        
        SQL> select round(A.LOGS*B.AVG/1024/1024/10) from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE FIRST_TIME >= (sysdate -10/60/24)) A, ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes, Min(BYTES) Min_Bytes FROM v$log) B;
        
        ROUND(A.LOGS*B.AVG/1024/1024/10)
        --------------------------------
                                       0
        
        SQL> select value from v$parameter where name='log_archive_start';
        
        VALUE
        --------------------------------------------------------------------------------
        TRUE
        
        SQL>

        Comment

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

          #244
          If all your database are in archivelogmode you can remove the racecondition simply removing from query.props
          • archive.RaceConditionQuery
          • archive.RaceConditionValue


          Or you can have one query file for each of your database or better to have a cutom queryfile for some particular database
          adding in config.props
          <DBNAME>.QueryListFile=<path to your custom queryfile>
          e.g.
          DBTEST.QueryListFile=./conf/queryfortest.props

          Or if you want one queryfile for all database that are in archivelogmode or aren't in archivelogmode you can add a race condition
          e.g.
          archive.RaceConditionQuery=select value from v$parameter where name='log_archive_start'
          archive.RaceConditionValue=TRUE

          let me know if you still have issue
          Andrea Dalle Vacche
          website:http://www.smartmarmot.com/
          e-mail:
          Author of:Mastering Zabbix Book - second edition
          Zabbix Network Monitoring Essentials

          Comment

          • fflux
            Member
            Zabbix Certified Specialist
            • Mar 2011
            • 34

            #245
            right, seems ok to me

            you can try to disable the RaceConditionValue and RaceConditionQuery

            like

            #archive.RaceConditionValue={somevalue}
            #archive.RaceConditionQuery={somequery}

            and check if that gives you a value (need to wait a few minutes after changing it)

            and check the item in zabbix, it could be disabled.

            Comment

            • sa22
              Member
              • Apr 2009
              • 30

              #246
              I've stopped orabbix, changed
              archive.RaceConditionValue=FALSE
              to
              archive.RaceConditionValue=TRUE
              started orabbix
              and Archivelog counter appeared in zabbix

              then I stopped orabbix, changed
              archive.RaceConditionValue=TRUE
              to
              archive.RaceConditionValue=FALSE
              started orabbix
              and Archivelog counter stayed in zabbix

              I will watch after this counter if it receive any updates.

              dalle, fflux thanks for excellent support!

              Comment

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

                #247
                Originally posted by sa22
                I've stopped orabbix, changed
                archive.RaceConditionValue=FALSE
                to
                archive.RaceConditionValue=TRUE
                started orabbix
                and Archivelog counter appeared in zabbix

                then I stopped orabbix, changed
                archive.RaceConditionValue=TRUE
                to
                archive.RaceConditionValue=FALSE
                started orabbix
                and Archivelog counter stayed in zabbix

                I will watch after this counter if it receive any updates.

                dalle, fflux thanks for excellent support!
                if you change a parameter in query file you don't need restart Orabbix, query are refreshed dynamically every 5 minute.
                Please try to check the timestamp of the last received item,because it is possible that in Graphics do not see the "hole" and maybe that the last received item it's quite old.
                Zabbix need a little to show the "hole" in graphs.
                Andrea Dalle Vacche
                website:http://www.smartmarmot.com/
                e-mail:
                Author of:Mastering Zabbix Book - second edition
                Zabbix Network Monitoring Essentials

                Comment

                • sa22
                  Member
                  • Apr 2009
                  • 30

                  #248
                  Archivelog counter doesn't receive any updates

                  Comment

                  • sa22
                    Member
                    • Apr 2009
                    • 30

                    #249
                    Originally posted by dalle
                    if you change a parameter in query file you don't need restart Orabbix, query are refreshed dynamically every 5 minute.
                    I've changed back FALSE to TRUE, but Archivelog counter began to receive updates only after I restarted orabbix.

                    Comment

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

                      #250
                      Originally posted by sa22
                      I've changed back FALSE to TRUE, but Archivelog counter began to receive updates only after I restarted orabbix.
                      mmm so there is a bug
                      it's an issue for me thanks for feedback
                      Andrea Dalle Vacche
                      website:http://www.smartmarmot.com/
                      e-mail:
                      Author of:Mastering Zabbix Book - second edition
                      Zabbix Network Monitoring Essentials

                      Comment

                      • eppie
                        Junior Member
                        • Jun 2009
                        • 15

                        #251
                        First I want to thank you for developing this great tool!

                        I want to monitor the folowing items and was wondering if this is already in the default trigger/item template:

                        1. Instance is up. (alive item?)
                        2. Listener is up. (alive item?)
                        3. Backup errors. (?)
                        4. Tablespaces. (tbl_space item)
                        5. Dead locks. (locks item?)
                        6. Archiver errors (?)
                        7. Alert log errors (There is an ALERT_LOG item but what does it do?)

                        Also I was wondering if there is some more documentation about the default items/triggers and there meanings?

                        Thanks in advance!

                        Comment

                        • fflux
                          Member
                          Zabbix Certified Specialist
                          • Mar 2011
                          • 34

                          #252
                          Originally posted by eppie
                          First I want to thank you for developing this great tool!

                          I want to monitor the folowing items and was wondering if this is already in the default trigger/item template:

                          1. Instance is up. (alive item?)
                          2. Listener is up. (alive item?)
                          3. Backup errors. (?)
                          4. Tablespaces. (tbl_space item)
                          5. Dead locks. (locks item?)
                          6. Archiver errors (?)
                          7. Alert log errors (There is an ALERT_LOG item but what does it do?)

                          Also I was wondering if there is some more documentation about the default items/triggers and there meanings?

                          Thanks in advance!
                          oi thats a lot of questions

                          1: yes
                          2: no but thats not needed, as orabbix uses the listener, so no listeren is an error
                          3: no, see below
                          4: yes
                          5: yes oracle 10+
                          6: no see below
                          7: no see below

                          3a: we changed our backup scripts to use zabbix_send to update the status of the backup
                          and i made a orabbix (oracle) query to check if there was a backup in the last 25 hours

                          6/7 Archive error is just an oracle error, oracle 11 has a table that lists the oracle errors, so i made a query to count the errors in the last hour and put a trigger on > 0


                          my last comment,

                          just use it and play with it, you can do a lot, the possibility is only hindered by your imagination

                          Comment

                          • eppie
                            Junior Member
                            • Jun 2009
                            • 15

                            #253
                            Thanks for you quick reply!

                            I will check the error and backup tables!

                            Edit:

                            This is what I'm going to use.

                            1. Monitoring the status of the last backup
                            select status from V$RMAN_BACKUP_JOB_DETAILS
                            where end_time = (select max( end_time) from V$RMAN_BACKUP_JOB_DETAILS)

                            2. Monitoring the age in days of the last backup
                            select round(sysdate - end_time) from V$RMAN_BACKUP_JOB_DETAILS
                            where end_time = (select max( end_time) from V$RMAN_BACKUP_JOB_DETAILS)

                            3. Checking the overall status of the database
                            status, archiver, logins, shutdown_pending, database_status, active_state, blocked fields in V$INSTANCE

                            This and the default triggers will hopely cover the most important part of oracle
                            Last edited by eppie; 29-04-2011, 10:47.

                            Comment

                            • fflux
                              Member
                              Zabbix Certified Specialist
                              • Mar 2011
                              • 34

                              #254
                              this is what i use, mind you i use oracle 11 for this

                              1:

                              rman_backupdone.Period=60
                              rman_backupdone.Query=select to_char(end_time,'DD/MM hh24:mi ') from sys.v_$rman_status where start_time > (sysdate -1 - 1/24) and object_type='DB FULL' and operation='BACKUP' order by end_time DESC
                              rman_backupdone.NoDataFound=none


                              for the next check you need to create a view with the username you use for orabbix:
                              CREATE VIEW v_x$dbgalertext AS SELECT * FROM x$dbgalertext;
                              GRANT select ON SYS.v_x$dbgalertext TO "{orabbixdbuser}";


                              ora_error.Period=60
                              ora_error.Query=select count (*) from sys.v_x$dbgalertext where originating_timestamp > (sysdate - 60/1440) and message_text like '%ORA-%'

                              Comment

                              • eppie
                                Junior Member
                                • Jun 2009
                                • 15

                                #255
                                Originally posted by fflux
                                for the next check you need to create a view with the username you use for orabbix:
                                CREATE VIEW v_x$dbgalertext AS SELECT * FROM x$dbgalertext;
                                GRANT select ON SYS.v_x$dbgalertext TO "{orabbixdbuser}";


                                ora_error.Period=60
                                ora_error.Query=select count (*) from sys.v_x$dbgalertext where originating_timestamp > (sysdate - 60/1440) and message_text like '%ORA-%'
                                Thanks for that query I will use this by our Oracle 11G instances. (Only works with 10 and up).

                                Also another question. The trigger 'hitratio' triggers every few minutes with the status 'Unknown'. I'v checked the four items related to this trigger but they all have values.
                                Anyone any idea what is going wrong?

                                Comment

                                Working...