Thanks again Risto!

2018-01-12 16:56 GMT+01:00 Risto Vaarandi <risto.vaara...@gmail.com>:

> hi Kamil,
>
> for fetching the content of the context event store, you can take
> advantage of the 'copy' action which assigns the content to an action list
> variable. For example:
>
> action=copy CHANNEL_ON_$1 %content; write /var/log/errors error on stb $1
> at channel %content
>
> Please note the following caveat -- the 'add' action does not overwrite
> the context event store, but rather appends a line to it. Therefore, if the
> second rule matches several events for the same IP address, the event store
> of CHANNEL_ON_<ip> context will contain lines for all of them. As a result,
> the %content action list variable will be set to a multiline string. If you
> wish to overwrite the previous content of CHANNEL_ON_<ip> each time the
> second rule matches, replace 'add' with the 'fill' action. Also, if you use
> replace 'copy CHANNEL_ON_$1 %content' with 'empty CHANNEL_ON_$1 %content,
> the event store of the CHANNEL_ON_<ip> will be emptied after the %content
> variable has been set.
>
> You can read more about all context related actions in the following
> section of the official documentation: http://simple-evcorr.github.
> io/man.html#lbAI
>
> kind regards,
> risto
>
>
> 2018-01-12 17:17 GMT+02:00 Kamil B <kamil4...@gmail.com>:
>
>> Hi,
>>
>> I like to set variable with #2 rule and use them in action on #3 rule.
>> I try add context CHANNEL_ON_$1 where $1 is IP address of host
>> But I don't know how to read it from rule #3
>>
>> #1
>>
>> type=Suppress
>> ptype=RegExp
>> pattern=(\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b) .* DATA .*
>> desc=Suppress counting after channel change on STB $1
>> context=1SUPPRESS_ERRORS_ON_STB_$1
>>
>> #2
>>
>> type=Single
>> ptype=RegExp
>> pattern=(\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b) .* igmp:\/\/(.*):.* PLAYER .*
>> desc=create suppress after channel change for 12secs
>> action=create SUPPRESS_ERRORS_ON_STB_$1 2; \
>>   add CHANNEL_ON_$1 $2
>>
>> #3
>>
>> type=Single
>> ptype=RegExp
>> pattern=(\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b) .* DATA .*
>> desc=error count for $1
>> action=write /var/log/errors error on stb $1 at channel $THIS $2 FROM
>> RULE #2
>>
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Simple-evcorr-users mailing list
>> Simple-evcorr-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
>>
>>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to