either Zabbix does not use POSIX regex or it's implementation is very limited...
a simple POSIX expression like 'log[/var/adm/messages,"NOTICE:\s+[^c]"]' will generate nothing... find the string "NOTICE:", followed by 1 or more white space that is not followed immediately by the character "c"..... so since this fails I tried dropping all of the actual REGEXP and only searched for the string "NOTICE"... this gets all of the lines in the log including the lines that are not needed.... so I tried to create a trigger that would reduce the noise a bit...
{server:log[/var/adm/messages,"NOTICE"]. regexp( core_log ) }#1 & {server:log[/var/adm/messages,"NOTICE"]. nodata( 30 ) }#1
this works on servers that have generated "NOTICE" lines in their log file but for servers that have not generated "NOTICE" lines... it gives warnings every interval about not being able to evaluate the expression....
Expression [{19745}#1 & {19744}#1] for item [35883][server:log[/var/adm/messages,"NOTICE"]] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [19745][server:log[/var/adm/messages,"NOTICE"].regexp(core_log)]
look... if it's value is NULL then no data has been collected from the item... that by definition would mean that the trigger is off... and I don't need to fill my server log file with misdirected crap stating that the expression can't be evaluated
if anyone that knows Zabbix better has a solution on how I can accomplish this let me know
a simple POSIX expression like 'log[/var/adm/messages,"NOTICE:\s+[^c]"]' will generate nothing... find the string "NOTICE:", followed by 1 or more white space that is not followed immediately by the character "c"..... so since this fails I tried dropping all of the actual REGEXP and only searched for the string "NOTICE"... this gets all of the lines in the log including the lines that are not needed.... so I tried to create a trigger that would reduce the noise a bit...
{server:log[/var/adm/messages,"NOTICE"]. regexp( core_log ) }#1 & {server:log[/var/adm/messages,"NOTICE"]. nodata( 30 ) }#1
this works on servers that have generated "NOTICE" lines in their log file but for servers that have not generated "NOTICE" lines... it gives warnings every interval about not being able to evaluate the expression....
Expression [{19745}#1 & {19744}#1] for item [35883][server:log[/var/adm/messages,"NOTICE"]] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [19745][server:log[/var/adm/messages,"NOTICE"].regexp(core_log)]
look... if it's value is NULL then no data has been collected from the item... that by definition would mean that the trigger is off... and I don't need to fill my server log file with misdirected crap stating that the expression can't be evaluated
if anyone that knows Zabbix better has a solution on how I can accomplish this let me know

].
Comment