Ad Widget

Collapse

add support for triggers for monitoring of multiple logs for different instances

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • a4221722
    Junior Member
    • Mar 2018
    • 2

    #1

    add support for triggers for monitoring of multiple logs for different instances

    hi there,
    We just encountered a problem today. We had added two oracle instances on the same machine for monitoring. And they have their own alert log respectively. Corresponding items of type 'log' and triggers were added for them. The key of the item is "log[{#ALERTLOG},"ORA-|Checkpoint not complete|Can not allocate log|fail|halt|abort|panic",,,skip,]".

    We finally found that only one of these two triggers remained valid as when there was an ORA error rise in the alert log of the second instance, the second trigger was not triggered. And the query
    "select lastlogsize from items where hostid=xxx and name='alert log'"
    returns zero.

    We doubted that the following code is relative with the problem:
    ./src/zabbix_server/operations.c lines: 41-90

    switch (event->object)
    ...
    result = DBselectN(sql, 1);

    We are newers here , and we appreciate any help and applies.

    Thanks!
  • ik_zelf
    Member
    • Feb 2015
    • 60

    #2
    you could take a look at https://github.com/ikzelf/zbxora There is a script bin bin/zbx_alertlog.sh that discovers all alertlog files for all running Oracle instances and gives them to the zabbix lld process. The zbxora_alertlog_template template has some examples of usage, complete with triggers.
    add "UserParameter = oracle.alertlog.lld,/opt/zabbix/linux/zbx_alertlog.sh" to the agent config file and place the zbx_alertlog.sh in a matching location.
    Make sure that the zabbix agent user is able to connect to all instances. For this script I used sysdba ....
    Do this for all db nodes for which you want to monitor the alert logs. Used are the xml log files because in there is a usable timestamp and the size of them is limited to 10MB.
    All lines containing the matched patterns are copied to zabbix, making the alertlog entries visible in the zabbix GUI.
    Attached Files

    Comment


    • a4221722
      a4221722 commented
      Editing a comment
      tks, I will try it.
  • Siva Jakkula
    Junior Member
    • Dec 2019
    • 1

    #3
    Hi All,

    Can anyone suggest here.
    i am facing issues while using logs monitoring item and adding trigger.

    below steps i have done. but it is not showing results.
    1. Added log path location in "Macro" EX: {$LOGS_PATH}=C:/xxxx/xxxx/data.log.
    2. created item using "{$LOGS_PATH}"
    3.Created trigger using item
    4. Please suggest here which conditions i need to use : Item, Function, Last of (T),Timeshift, Result
    5. Let me know whics Expression is suitable for logs moniotring.

    Thanks,
    Siva

    Comment

    Working...