Ad Widget

Collapse

lld for log items fails (value is not numeric) - 3.0.14

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ik_zelf
    Member
    • Feb 2015
    • 60

    #1

    lld for log items fails (value is not numeric) - 3.0.14

    lld array:

    { "data":[
    {"{#INSTANCE_NAME}":"+ASM1","{#ALERTLOG}":"/u01/app/grid/diag/asm/+asm/+ASM1/alert/log.xml"}
    ,{"{#INSTANCE_NAME}":"+APX1","{#ALERTLOG}":"/u01/app/grid/diag/apx/+apx/+APX1/alert/log.xml"}
    ,{"{#INSTANCE_NAME}":"-MGMTDB","{#ALERTLOG}":"/u01/app/grid/diag/rdbms/_mgmtdb/-MGMTDB/alert/log.xml"}
    ]}

    in the GUI I now get:
    Cannot create item: macro "{#ALERTLOG}" value is not numeric.
    Cannot create item: macro "{#ALERTLOG}" value is not numeric.
    Cannot create item: macro "{#ALERTLOG}" value is not numeric.

    The log item in generated using the prototype:
    name: {#INSTANCE_NAME}[alertlog]
    type: active agent
    key: log[{#ALERTLOG},(ORA-|time=|ERROR|Dead)]

    The error seems to be caused by the following prototype:
    name:lines[{#ALERTLOG}]
    type: calculated
    key: lines[{#ALERTLOG}]
    formula: {"template zbx_alertlog:log[{#ALERTLOG},(ORA-|time=|ERROR|Dead)]".count(60)}

    in the formula the "log[{#ALERTLOG},(ORA-|time=|ERROR|Dead)]" is the key of the log item that is generated.

    Is it possible at all to generate a calculated item that counts the # of lines received in the last 60 seconds?
    If so, can you give a hint?
    Last edited by ik_zelf; 28-02-2018, 10:34. Reason: more details
  • ik_zelf
    Member
    • Feb 2015
    • 60

    #2
    I finally got this to work. In the template I added:

    name: lines[{#INSTANCE_NAME},alertlog]
    type: calculated item
    key: lines[{#INSTANCE_NAME},alertlog]

    formula: count("log[{#ALERTLOG},(ORA-|time=|ERROR|Dead)]",60)

    this counts the lines that the logitem "log[{#ALERTLOG},(ORA-|time=|ERROR|Dead)]" received in the last minute.

    Comment

    Working...