Ad Widget

Collapse

monitore multiple logs in directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #16
    Use EXACTLY the same expression to select strings (second parameter).
    Code:
    "(bpstart|bpend)"
    No extra spaces and characters.

    Comment

    • lib95
      Junior Member
      • Feb 2013
      • 21

      #17
      Hello

      Thank you item is always empty and on zabbix log below messages :

      In process_logrt() flags:0x0b filename:'/backup/backup-*.log-*' lastlogsize:487 mtime:1679020202
      2023/03/17 14:43:11.001011 In split_filename() filename:':'/backup/backup*.log-*'
      2023/03/17 14:43:11.001037 In split_string() str:':'/backup/backup*.log-*' del:':'/backup/backup*.log-*'
      2023/03/17 14:43:11.001061 End of split_string():SUCCEED part1:'/backup/' part2:'backup-*.log-*'
      2023/03/17 14:43:11.001099 End of split_filename():SUCCEED directory:'/backup/' filename_regexp:'backup-*.log-*'
      2023/03/17 14:43:11.001192 End of process_logrt():FAIL
      2023/03/17 14:43:11.001214 suppressing log(rt)(.count) processing error #1: Cannot open directory "/backup/" for reading: [24] Too many open files​

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #18
        This is *nix limit


        and from zabbix docs
        Note that logrt is designed to work with one currently active log file, with several other matching inactive files rotated. If, for example, a directory has many active log files, a separate logrt item should be created for each one. Otherwise if one logrt item picks up too many files it may lead to exhausted memory and a crash of monitoring.​

        Comment

        • lib95
          Junior Member
          • Feb 2013
          • 21

          #19
          Hello,

          /backup/backup_Sat.log-20230312
          /backup/backup_Sat.log-20230312.gz
          Thank you, I see another point in the directory old logs are compressed so how can I exclude gz files ?

          Best regards

          Comment


          • Hamardaban
            Hamardaban commented
            Editing a comment
            backup_Sat.log-20230312.gz. does not match the regular expression and will not be affected.
        • lib95
          Junior Member
          • Feb 2013
          • 21

          #20
          Hello,

          Ok thank you item is always empty.

          Best regards

          Comment

          • lib95
            Junior Member
            • Feb 2013
            • 21

            #21
            Hello,

            Issue is resolved, I have removed \ before .log

            Thank you

            regards

            Comment

            Working...