Ad Widget

Collapse

How can find specific string in files that are rotating

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bab
    Senior Member
    • Aug 2020
    • 176

    #1

    How can find specific string in files that are rotating


    I was read about logrt to find specific string in the files but could not find out some parts.
    I want to find specific string in my files that are rotating by size :
    My path file is : /usr/local/card/log/card/
    My string that I am looking for that in the files : "Connection is not available"
    My files that are generating :
    card-2024-12-30_0.log
    card-2024-12-30_1.log
    card-2024-12-30_2.log
    card-2024-12-30_3.log
    card-2024-12-30_4.log
    card-2024-12-30_5.log
    card-2024-12-30_6.log
    .
    .
    I know have to use zabbix agent(Active)
    key = logrt

    Would you please help me how should fill follow key for that ?
    logrt[file_regexp,<regexp>,<encoding>,<maxlines>,<mode>, <output>,<maxdelay>,<options>,<persistent_dir>]

  • kyus
    Senior Member
    • Feb 2024
    • 172

    #2
    Hey!

    I think that you can use the following key:

    Code:
    logrt["/var/log/zabbix/card.*","Connection is not available"]

    Comment

    Working...