Ad Widget

Collapse

oracle ODBC monitoring - type string is not suitable for value type Numeric (float)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ratajj
    Junior Member
    • Sep 2019
    • 6

    #1

    oracle ODBC monitoring - type string is not suitable for value type Numeric (float)

    Hi,
    I'm testing oracle database monitoring with ODBC connection. Right now I have couple databases from 12c and 10g scope. For 12c almost everting works fine but for 10g I have a lot of errors in zabbix_server logfile. All of them are related with the same body eg:

    db.odbc.select[ora_hitratio_body, {$DSN}]" changed: Value "99,6172852658925" of type "string" is not suitable for value type "Numeric (float)"

    The items are defined as "Numeric (float)" in Zabbix. The some queries (items) in 12c databases return value in Zabbix.

    Guys, any idea what's going on?

    Thanks,
    Michal
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    I think that a string containing a comma cannot be treated as a number. Does that mean that you can get a value of about 99? Check the format of the output numerical value.

    Comment

    • ratajj
      Junior Member
      • Sep 2019
      • 6

      #3
      select * from sys.nls_database_parameters where parameter = 'NLS_NUMERIC_CHARACTERS';

      NLS_NUMERIC_CHARACTERS - .,

      So imo Value "99,6172852658925" should be also type as "Numeric (float)"

      What can I check more?

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Is a period set as a decimal point and a comma set as a group separator?
        Since the string that can be obtained uses a comma, I think that the value that can be obtained is not a value that includes a decimal point. Check the SQL statement used to obtain the value.

        Comment

        • ratajj
          Junior Member
          • Sep 2019
          • 6

          #5
          Query select gethitratio*100 "get_pct" FROM v$librarycache where namespace ='BODY'; returned 98,42438773762630587429354341496831649255 value.

          Comment

          • ratajj
            Junior Member
            • Sep 2019
            • 6

            #6
            Originally posted by ratajj
            Query select gethitratio*100 "get_pct" FROM v$librarycache where namespace ='BODY'; returned 98,42438773762630587429354341496831649255 value.
            For 12c (where metrics have been collected) result for query was the same as for 10g - 99,87101156707794338656564147548875022185

            Comment

            • Atsushi
              Senior Member
              • Aug 2013
              • 2028

              #7
              Can you try the following SQL statement?
              Code:
              select to_char((gethitratio * 100), '990.99') "get_pct" FROM v$librarycache where namespace ='BODY';

              Comment

              • ratajj
                Junior Member
                • Sep 2019
                • 6

                #8
                Originally posted by Atsushi
                Can you try the following SQL statement?
                Code:
                select to_char((gethitratio * 100), '990.99') "get_pct" FROM v$librarycache where namespace ='BODY';
                98.90

                I'm not sure if Oracle Client version installed on zabbix server is important.
                Current my setup it 18.3 and maybe for 12c databases is ok but not for 10g...

                Comment

                • ratajj
                  Junior Member
                  • Sep 2019
                  • 6

                  #9
                  Problem resolved. Atsushi thanks for your help and support. After rewrite all affected queries - add to_char function - no errors.

                  Comment

                  Working...