Ad Widget

Collapse

Capture X number of lines during log monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ben maina
    Junior Member
    • Jun 2017
    • 17

    #1

    Capture X number of lines during log monitoring

    How can i capture X number of lines ones a certain regex is seen? Eg If i want to check the word "ERROR" in a log file i would do this:

    log[/var/log/celery/cbol_register_member.out.log,ERROR].

    All i wanted is that when "ERROR" is detected on that line, zabbix should output the next eg 5 lines after ERROR is seen. How can i achieve this.


    I am using zabbix 3.0. Should i use max lines or how does maxlines work?. Kindly assist
    Last edited by ben maina; 10-08-2017, 11:14.
Working...