>
> I create a rule which uses %arrayid_to_lnn to translate Array ID into LNN
>
>
>
> # Handle Isilon node down messages
>
> type=SingleWithSuppress
>
> ptype=regexp
>
> pattern=T(\d\d:\d\d:\d\d)\-\d\d:\d\d (.*?) .*gmp.info.c.* group change:.*
> (node \d+ drive \d+ changed to up)
>
> desc=Drive Recover:  $3
>
> action=lcall %node $3 -> ( sub { $arrayid_to_lnn{$_[0]} } );\
>
>   if %node (write /home/tocops/.tocpipe ops $1 $2 Drive Recover: %node)
> else ( write /home/tocops/.tocpipe ops $1 $2 Drive Recover: $3)
>
> window=5
>
>
>
> Recall that the syslog line of interest might look as follows:
>
>
>
> 2017-08-03T06:07:31-07:00 isilon-cluster-10 /boot/kernel.amd64/kernel:
> [gmp_info.c:1863](pid 38910="kt: gmp-config")(tid=103609) new group:
> <3,2302>: { 3-6:0-34, 8:0
>
> -20,22-31,33-34,36-37, 9:1-21,24, 10-11:0-21, 12-13:0-34, 18:0-21,
> 21:0-34, 22:0-21, 24:0-34, down: 23, smb: 3-6,8-13,18,21-22,24, nfs:
> 3-6,8-13,18,21-22,24, all_enabled_protocols: 3-6,8-13,18,21-22,24 }
>
>
>
> The 3rd match in the pattern grabs the Array ID, i.e. ‘23’ in the log line
> above.
>

I am quite afraid it is not possible, since the regular expression of the
above rule reads as follows:

T(\d\d:\d\d:\d\d)\-\d\d:\d\d (.*?) .*gmp.info.c.* group change:.* (node \d+
drive \d+ changed to up)

There are 3 capture groups in this expression, and the third one which sets
$3 reads as follows:
(node \d+ drive \d+ changed to up)

Unfortunately, this capture group does not set $3 to a numeral, but rather
to a string "node X drive Y changed to up".
Since you don't have any value in %attayid_to_lnn with such a key, the
%node variable gets set to an empty string.

kind regards,
risto
------------------------------------------------------------------------------
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