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

    #211
    Originally posted by fritz
    Question about the 2 queries ?
    Why do you divided the both queries by 10 ? I believe there s little mistake, no ?


    Code:
    dbsize.Query=SELECT to_char(sum(  NVL(a.bytes/1024/1024/10 - NVL(f.bytes/1024/1024/10, 0), 0)), 'FM99999999999999990') retvalue \
    
    dbfilesize.Query=select to_char(sum(bytes/1024/1024/10), 'FM99999999999999990') retvalue from dba_data_files
    Thanks for your feedback ..
    It's a sorta of mistake for normal DB but not really for me I have another version of orabbix and probably I've introduced this "error" while merging queries. My release has some mods and improvement for many reason.You can remove it, it was necessary on my scenario because i didn't want change some custom triggers.
    thankyou for all your feedback!
    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

      #212
      indeed, that was the standard in orabbix, i just noticed that yesterday

      and that part was not my doing, but a copy from the website.

      Comment

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

        #213
        Originally posted by fflux
        don't'know if this is the right place, but it looks like there is something wrong on the orabbix installation page:

        archive.Query=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
        archive.RaceConditionQuery=select value
        from
        v$parameter where name=’log_archive_start’
        archive.RaceConditionValue=FALSE
        TIP: In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)

        shouldn't that be archive.RaceConditionValue=TRUE

        (could be wrong, as in oracle 10 and higher this parameter can't be used.
        i changed it to
        archive.RaceConditionQuery=select log_mode from v$database
        archive.RaceConditionValue=ARCHIVELOG

        Felix

        and i love orabbix more and more
        keep on the good work.

        i only wish zabbix was a little better so i could store 2 values with a query.
        e.g. now i query tablespace free as 85% and one with 95%

        realy wish i could just get the ones with > 85% as a value and the other field with the tablespace name.
        then i could make one item with 2 triggers.

        or do i do it wrong?
        You are right, you need to build a custom query file for each database that need different checks, fortunately Orabbix support a custom query file for each database.
        The logic that I applied for the control of the datafiles is following:
        returns "none" if no lines select
        otherwise returns all the tuples selected
        doing do the "where condition" contain directly the trigger condition.
        If you look how I've built the trigger i send an error don't return "none"
        Really thank you for all your feedback and tips and for fix on documentation
        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

          #214
          Originally posted by fritz
          Question about the 2 queries ?
          Why do you divided the both queries by 10 ? I believe there s little mistake, no ?


          Code:
          dbsize.Query=SELECT to_char(sum(  NVL(a.bytes/1024/1024/10 - NVL(f.bytes/1024/1024/10, 0), 0)), 'FM99999999999999990') retvalue \
          
          dbfilesize.Query=select to_char(sum(bytes/1024/1024/10), 'FM99999999999999990') retvalue from dba_data_files
          Thanks for your feedback ..
          btw you are right I'm removing from Orabbix release
          thank you I'll fix on next release
          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

            #215
            orabbix weird stuff

            hiya all,

            i have query defined as:

            archive.Query=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
            archive.RaceConditionQuery=select LOG_MODE from V$DATABASE
            archive.RaceConditionValue=ARCHIVELOG

            and if i looked at the log i see INFO: that the RaceCondition was changed

            suddenly i don't see that anymore, and the query won't run at all, leaving me with old data


            i have tried to debug it, but thats when the weird part starts.

            in de debug log i see:

            sending <req><host>ZHNwMDAx</host><key>YWxpdmU=</key><data>MQ==</data></req>

            why is this giving garbage?

            Comment

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

              #216
              Originally posted by fflux
              hiya all,

              i have query defined as:

              archive.Query=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
              archive.RaceConditionQuery=select LOG_MODE from V$DATABASE
              archive.RaceConditionValue=ARCHIVELOG

              and if i looked at the log i see INFO: that the RaceCondition was changed

              suddenly i don't see that anymore, and the query won't run at all, leaving me with old data


              i have tried to debug it, but thats when the weird part starts.

              in de debug log i see:

              sending <req><host>ZHNwMDAx</host><key>YWxpdmU=</key><data>MQ==</data></req>

              why is this giving garbage?
              It's base64 garbage on zabbix protocol you should encode values on base64 you need unencode if you would you would see the real value.
              I'm looking at archive query if there is an error or it or in queryfile.
              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

                #217
                Originally posted by dalle
                It's base64 garbage on zabbix protocol you should encode values on base64 you need unencode if you would you would see the real value.
                I'm looking at archive query if there is an error or it or in queryfile.

                aha right

                weird part is, it was working :S
                suddenly sunday night or even monday morning between 0:00 nd 4:00 it stopped giving those info messages of the changed condition

                btw, is there anyway to dump the info orabbix is getting from the query.props file?

                like an option on the executable?
                would give a lot more info in case of a mistake.

                i wonder what orabbix thinks of the query options i give.

                Comment

                • fflux
                  Member
                  Zabbix Certified Specialist
                  • Mar 2011
                  • 34

                  #218
                  right i have removed both query RaceConditions in my config, and it works again.

                  there must be something wrong with my query.props file or some other hickup as the both won't give a check in the INFO log anymore.

                  Comment

                  • fflux
                    Member
                    Zabbix Certified Specialist
                    • Mar 2011
                    • 34

                    #219
                    i have a problem with the lock query, on Oracle 9i it takes way to long on our database.

                    the result was that that query was running 18 times and took all the server power.

                    Felix

                    Comment

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

                      #220
                      Originally posted by fflux
                      i have a problem with the lock query, on Oracle 9i it takes way to long on our database.

                      the result was that that query was running 18 times and took all the server power.

                      Felix
                      Query that can be heavy are "locks" and "audit" I don't know why. I've already received a note about but I can't reproduce this issue because on all my database there isn't at all and all is working like a charm. So a possilbe solution is to remove those Query from QueryList.
                      Anyway if you can I kindly ask if you can do an execution plan of this query on your database and sent it to me so I can try to fix it
                      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

                        #221
                        i have mailed you the info

                        anyway, still happy with orabbix and soon the mysql version

                        btw, the lock.Query works without a problem on Oracle 11 databases.
                        Last edited by fflux; 07-04-2011, 23:24. Reason: added line about oracle version

                        Comment

                        • fflux
                          Member
                          Zabbix Certified Specialist
                          • Mar 2011
                          • 34

                          #222
                          after long debugging

                          i have found the problem with RaceCondition.

                          if i have the 2 lines in my config:

                          check1.RaceConditionValue=FALSE
                          check2.RaceConditionQuery=some query that returns TRUE or FALSE

                          and restart orabbix the action will never run.

                          if i restart orabbix without the 2 line commented

                          #check1.RaceConditionValue=FALSE
                          #check2.RaceConditionQuery=some query that returns TRUE or FALSE

                          and when orabbix is running and then remove the 2 # it will work:

                          2011-04-09 01:16:55,740 [main] INFO Orabbix - RaceValue of query check1 has changed ->TRUE


                          so there must be something wrong in the init routine of orabbix.

                          pff, and i realy wanted to go to bed early today

                          Comment

                          • fflux
                            Member
                            Zabbix Certified Specialist
                            • Mar 2011
                            • 34

                            #223
                            bah

                            i think i will give on this RaceConditionQuery thing

                            it doesn't seem to do anything

                            i wonder if i do something wrong, as i see a .ACTIVE in the doc but i don't know what that means?

                            my current query is this:

                            yos_endpoints.RaceConditionValue=TRUE
                            yos_endpoints.RaceConditionQuery=select case when count(*)=0 then 'FALSE' else 'TRUE' end from dba_users where username='YOS'
                            yos_endpoints.Query=select '- ',description, '- URL->',url, '- Status->',available from yos.yos_url_checks where available=0
                            yos_endpoints.NoDataFound=none


                            and to what ever i change the RaceConditionValue too FALSE or TRUE the query is always executed.

                            i know this as that user does not exists in some of my databases and it gives an error:
                            2011-04-09 02:19:45,354 [pool-1-thread-10] DEBUG Orabbix - Actual query is yos_endpointsNextrun 2011/04/09 02:20:44 on database=dslxadb01-dsa001 Period=1
                            2011-04-09 02:19:45,354 [pool-1-thread-10] DEBUG Orabbix - INFO:yos_endpoints RaceCondiftionQuery ->select case when count(*)=0 then 'FALSE' else 'TRUE' end from dba_users where username='YOS'
                            2011-04-09 02:19:45,359 [pool-1-thread-10] WARN Orabbix - Error while executing ->yos_endpoints- on database ->dslxadb01-dsa001- Exception received ORA-00942: table or view does not exist

                            2011-04-09 02:19:45,359 [pool-1-thread-10] DEBUG Orabbix - I'm going to return none for query yos_endpoints on database=dslxadb01-dsa001

                            Comment

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

                              #224
                              Originally posted by fflux
                              i think i will give on this RaceConditionQuery thing

                              it doesn't seem to do anything

                              i wonder if i do something wrong, as i see a .ACTIVE in the doc but i don't know what that means?

                              my current query is this:

                              yos_endpoints.RaceConditionValue=TRUE
                              yos_endpoints.RaceConditionQuery=select case when count(*)=0 then 'FALSE' else 'TRUE' end from dba_users where username='YOS'
                              yos_endpoints.Query=select '- ',description, '- URL->',url, '- Status->',available from yos.yos_url_checks where available=0
                              yos_endpoints.NoDataFound=none


                              and to what ever i change the RaceConditionValue too FALSE or TRUE the query is always executed.

                              i know this as that user does not exists in some of my databases and it gives an error:
                              2011-04-09 02:19:45,354 [pool-1-thread-10] DEBUG Orabbix - Actual query is yos_endpointsNextrun 2011/04/09 02:20:44 on database=dslxadb01-dsa001 Period=1
                              2011-04-09 02:19:45,354 [pool-1-thread-10] DEBUG Orabbix - INFO:yos_endpoints RaceCondiftionQuery ->select case when count(*)=0 then 'FALSE' else 'TRUE' end from dba_users where username='YOS'
                              2011-04-09 02:19:45,359 [pool-1-thread-10] WARN Orabbix - Error while executing ->yos_endpoints- on database ->dslxadb01-dsa001- Exception received ORA-00942: table or view does not exist

                              2011-04-09 02:19:45,359 [pool-1-thread-10] DEBUG Orabbix - I'm going to return none for query yos_endpoints on database=dslxadb01-dsa001
                              I've probably found your bug or rather I hope to have found it
                              thank you for all your feedback are precious to me!
                              anyway I've release the version RC2 that should solve
                              let me know
                              the Orabbix 1.2.0 RC2 is available for download here
                              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

                                #225
                                oi

                                Dalle,

                                first things first, grats on your certification way to go .....

                                I hope i can get a chance to it soon.

                                now back on topic.

                                it seems to work now

                                thanks for all your work.

                                i'm very happy (until i find the next

                                Felix

                                Comment

                                Working...