Ad Widget

Collapse

Log File monitoring issue with changing date

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • itskol@procentris.com
    Junior Member
    • Mar 2024
    • 4

    #1

    Log File monitoring issue with changing date

    Hi ,
    I am trying to setup a monitoring of xml log file that change daily basis with current date. like todays file name is 20240307.xml. While I am defining 20240307.xml name in item then its, working. Now how can I set a universal format that will read log without exact file .

    item using : logrt[C:\ProgramData\Key Metric Software\SQL Backup Master\logs\20240307.xml,succeeded] This is working fine.

    Thanks in advance.
  • Answer selected by cyber at 08-03-2024, 13:23.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    logrt docs say that logfile name can be regex, so "C:\ProgramData\Key Metric Software\SQL Backup Master\logs\.*.xml" In case of Windows, I would escape those \-s also, so they would be taken literally...

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      logrt docs say that logfile name can be regex, so "C:\ProgramData\Key Metric Software\SQL Backup Master\logs\.*.xml" In case of Windows, I would escape those \-s also, so they would be taken literally...

      Comment

      • itskol@procentris.com
        Junior Member
        • Mar 2024
        • 4

        #3
        Originally posted by cyber
        logrt docs say that logfile name can be regex, so "C:\ProgramData\Key Metric Software\SQL Backup Master\logs\.*.xml" In case of Windows, I would escape those \-s also, so they would be taken literally...
        thanks. it,s working. I was missing quotes.

        Comment

        • irontmp
          Member
          • Sep 2023
          • 36

          #4
          Originally posted by [email protected]
          Hi ,
          I am trying to setup a monitoring of xml log file that change daily basis with a current date for the Painting Company in Renton. like todays file name is 20240307.xml. While I am defining 20240307.xml name in item then its, working. Now how can I set a universal format that will read log without exact file .

          item using : logrt[C:\ProgramData\Key Metric Software\SQL Backup Master\logs\20240307.xml,succeeded] This is working fine.

          Thanks in advance.
          Hi there, You can set up a monitoring system for XML log files that change daily by using a wildcard (*) to represent the changing date in the file name. For example, you can use the following item format: logrt[C:\ProgramData\Key Metric Software\SQL Backup Master\logs*.xml,succeeded] This will monitor all XML files in the specified directory that end with the ".xml" extension, regardless of the specific date in the file name. This way, your monitoring system will automatically pick up the log file with the current date without needing to specify the exact file name each time.

          Comment

          Working...