Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Parser file name

Parser file name

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 23.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    N
    Nikk
    wrote on last edited by
    #1

    Hi,

    We have a case where we need to monitor a log file on one server, but the problem is the logfile name is created like "log yyyy-mm-dd.txt'' and are changing each day, is it possible to configure this timestamp in parsers file name?

    Best regards,
    Nikk

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      yes, in log file name you can use format specifiers from strftime. Parser will switch to new file when resulting name changes. For complicated cases you can also use `command` in file name - parser will execute external command and insert it's output.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • D
        D
        dersonik
        wrote on last edited by
        #3

        Can I add something like C:\*.txt to monitoring few files with txt extension?

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          no, you can specify multiple <file> tags in parser, but wildcards are not allowed.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • D
            D
            dersonik
            wrote on last edited by
            #5

            Ok so if for example backup program like robocopy creating log file like dd-mm-yy.txt how to monitoring this file then? some backups program generating files with hours in name. Is very hard to predict when backups will finish so i don't know how looks like the log file name? any help?

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              You can use strftime patterns in file name. For example, to match dd-mm-yy.txt you can use %d-%m-%y.txt as file name. If hour is included, for example yymmddhh.txt - %y%m%d%H.txt. As time changes system will check different file names. If you need something even more complicated you can call external script to determine part of file name, like this: log-`script.cmd`.txt - it will call script.cmd and use it's output as part of file name.

              Best regards,
              Victor

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups