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

    • Icon: Change Request Change Request
    • Resolution: Commercial support required
    • Icon: Minor Minor
    • None
    • 3.0.21
    • 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]

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

              Created:
              Updated:
              Resolved: