Parameter to search only the last value found in a log

XMLWordPrintable

    • Type: Change Request
    • Resolution: Commercial support required
    • Priority: Minor
    • None
    • Affects Version/s: 3.0.21
    • Component/s: Templates (T)
    • None

      I need to search the value of "EXIT_CODE=" in a log file and the result can vary between 0 and 4. The problem is that in this file the word "EXIT_CODE=" can be found several times and I would only like remember the last value found in the file.

      Here is the command I did, but for now she can return me 20 different answers and I would only like the last one:
      log["/var/log/puppet_agent.log", "EXIT_CODE=([0-9] +)",,, skip,\1]

            Assignee:
            Unassigned
            Reporter:
            Leo Madgin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: