Ad Widget

Collapse

Getting issue for sending {ITEM.VALUE} through mail when using log monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Md. Kawsaruzzaman
    Junior Member
    • Jun 2018
    • 2

    #1

    Getting issue for sending {ITEM.VALUE} through mail when using log monitoring

    I was monitoring some log files where i am searching for some particular message like Log_mesg. Item key is
    <pre>
    log[{$LOG_PATH}/abc.log,"Log_mesg:",,,skip,]
    </pre>

    Trigger can be done in any ways like using strlen() or nodata() condition. That's actually not my concern. Whenever i am getting any data for this item all values seems to be appeared in new line as that targeted log file also write those new logs in new line. Let me provide the sample output of the above log item which i am getting from latest data using zabbix:

    <pre>
    2019-06-27[10:00:28(UTC+00:00)]:E:im270: Log_mesg: Reference does not exist: tcmcs910270.cbrn->tcmcs031270.cbrn [' 4300']
    2019-06-27[10:00:28(UTC+00:00)]:E:im270: Log_mesg: Reference does not exist: tcmcs910270.cbrn->tcmcs031270.cbrn [' 8200']
    2019-06-27[10:00:28(UTC+00:00)]:E:im270: Log_mesg: Reference does not exist: tcmcs910270.cbrn->tcmcs031270.cbrn [' 5600']
    2019-06-27[10:00:28(UTC+00:00)]:E:im270: Log_mesg: Reference does not exist: tcmcs910270.cbrn->tcmcs031270.cbrn [' 1162']
    2019-06-27[10:00:28(UTC+00:00)]:E:im270: Log_mesg: Reference does not exist: tcmcs910270.cbrn->tcmcs031270.cbrn [' 1162']
    </pre>

    Now the issue is when ever the event is being generated we are getting only one line from the above output. In Default message under action configuration i am using {ITEM.VALUE} for providing those error logs through mail. Now in mail we are just getting one line from the above data collection. If all those lines were in same line we would get all of those information.

    So, is there any way to send all those new lines through mail i mean action configuration using other macros rather than {ITEM.VALUE}?

    OR Is there any way to fetch all those new line data into one line in zabbix data collection so that those all lines can be sent over mail?

    Please do let me know if i need to provide any more information.

    Thanks in advance
Working...