I found a few threads that may be related but doesn't exactly address my question.
I have setup monitoring of a log file with the following key:
hostname:log[/path/to/logfile/filename.log,BASIC\sREGULAR\sEXPRESSION]
This works fine, whenever the string 'BASIC REGULAR EXPRESSION' is found I see that line show up in the history of the item. Now I want a trigger for whenever such a line is detected.
But it seems like even the trigger needs a regexp like this:
{hostname:log[/path/to/logfile/filename.log,BASIC\sREGULAR\sEXPRESSION].str(BASIC\sREGULAR\sEXPRESSION)}=1
Is there a syntax so that I don't have to match the regexp even in the trigger? I suppose I could remove the regexp from the item's key and just have it in the trigger's key, but that would mean all the lines in the log being stored in the DB, and I don't want to waste so much space.
Charith.
I have setup monitoring of a log file with the following key:
hostname:log[/path/to/logfile/filename.log,BASIC\sREGULAR\sEXPRESSION]
This works fine, whenever the string 'BASIC REGULAR EXPRESSION' is found I see that line show up in the history of the item. Now I want a trigger for whenever such a line is detected.
But it seems like even the trigger needs a regexp like this:
{hostname:log[/path/to/logfile/filename.log,BASIC\sREGULAR\sEXPRESSION].str(BASIC\sREGULAR\sEXPRESSION)}=1
Is there a syntax so that I don't have to match the regexp even in the trigger? I suppose I could remove the regexp from the item's key and just have it in the trigger's key, but that would mean all the lines in the log being stored in the DB, and I don't want to waste so much space.
Charith.
Comment