Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-4802

Parameter to search only the last value found in a log

    XMLWordPrintable

    Details

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

      Description

      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]

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: