Score:0

I want to use zabbix6 to monitor the log files

sa flag
  1. The log files to be monitored are as follows, and I want to monitor the string "ERROR".

    /var/log/waagent.log
    
  2. ITEM

    log[/var/log/waagent.log,,,,skip]
    

enter image description here

  1. Trigger : If more than 0, trigger will occur.

    count(/Linux Azure Waagent/log[/var/log/waagent.log,,,,skip],#1,"regexp","ERROR")>0
    

enter image description here

  1. Result

    It seems to be searching for "ERROR" throughout the log file. I want to find "ERROR" in the last line of the log file.

If possible, I also want to create a trigger that solves the problem when "INFO" is printed. Please help me.

Score:0
cu flag

For monitoring "ERROR" in the last line of the log file: Change the log file path to:

/var/log/waagent.log|tail -n 1
Modify the trigger condition to: count(/Linux Azure Waagent/log[/var/log/waagent.log|tail -n 1,,,,skip],#1,"regexp","ERROR") > 0

For creating a trigger for "INFO": Add a new trigger condition:javascriptcount(/Linux Azure Waagent/log[/var/log/waagent.log|tail -n 1,,,,skip],#1,"regexp","INFO") > 0

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.