-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6602eaa
commit a5696cc
Showing
13 changed files
with
223 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,31 @@ | ||
[line] | ||
testRegexp($line, "^[0-9][0-9]") | ||
testRegexp($line, "^([0][1-9]|[1][0-2])-([0][1-9]|[1][0-9]|[2][0-9]|[3][0-1])-([1][9][0-9]{2}|[2][0-9]{3})( ([0-1][0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9])") | ||
|
||
[tokens] | ||
t1 = $line.match("\[(\w*\.)+\w*\]") | ||
t2 = $t1.match("(.\w*])$") | ||
classe = $t2.replace(".","").replace("]","") | ||
pacote = $t1.replace("[","").replace($t2,"") | ||
io = "io" | ||
commIn = "commIn" | ||
commOut = "commOut" | ||
cpu = "cpu" | ||
usuario = "usuario" | ||
gravacao = "gravacao" | ||
impressao = "impressao" | ||
t3 = $line.match("\[ERRO\]: .*$") | ||
erro = $line.contains("[ERRO]: ") ? $t3.replace("[ERRO]: ", "") | ||
expiracao = $line.contains("Sessão expirada!") ? $line.match("Sessão expirada!") | ||
preAgent = testRegexp($line, "\[AGENT\]:\s*\w*[!\.]") ? $line.match("\[AGENT\]:\s*\w*[!\.]") | ||
ag = testRegexp($line, "\[AGENT\]:\s*\w*[!\.]") ? $preAgent.replace("[AGENT]: ", "").replace("!", "").replace(".", "") | ||
|
||
preEntity = testRegexp($line, "\[ENTITY\]:\s*\w*[!\.]") ? $line.match("\[ENTITY\]:\s*\w*[!\.]") | ||
et = testRegexp($line, "\[ENTITY\]:\s*\w*[!\.]") ? $preEntity.replace("[ENTITY]: ", "").replace("!", "").replace(".", "") | ||
|
||
preActivity = testRegexp($line, "\[ACTIVITY\]:\s*\w*[!\.;]") ? $line.match("\[ACTIVITY\]:\s*\w*[!\.;]") | ||
ac = testRegexp($line, "\[ACTIVITY\]:\s*\w*[!\.;]") ? $preActivity.replace("[ACTIVITY]: ", "").replace("!", "").replace(".", "").replace(";", "") | ||
|
||
preInformer = testRegexp($line, "\[ACTIVITY\]:\s*\w*[!\.;]$") ? $line.match("\[ACTIVITY\]:\s*\w*[!\.;]$") | ||
informer = testRegexp($line, "\[ACTIVITY\]:\s*\w*[!\.;]$") ? $preInformer.replace("[ACTIVITY]: ", "").replace("!", "").replace(".", "").replace(";", "") | ||
|
||
[agents] | ||
$usuario, $classe, $pacote | ||
$ag | ||
|
||
[activities] | ||
$gravacao, $impressao, $commIn, $commOut, $cpu, $io | ||
$ac, $informer | ||
|
||
[entities] | ||
$erro, $expiracao | ||
$et | ||
|
||
[statements] | ||
testRegexp($line,"gravado")? wasAssociatedWith($io, $classe, -) | ||
testRegexp($line, "InspecaoAction(.*)\[Aberta e não iniciada")? wasAssociatedWith($io, $classe, -) | ||
|
||
$line.contains("/rs/")? wasAssociatedWith($commIn, $classe, -) | ||
$line.contains("/servicos/")? wasAssociatedWith($commOut, $classe, -) | ||
|
||
$line.contains("ReportHandlerAction")? wasAssociatedWith($cpu, $classe, -) | ||
$line.contains("[CONEXAO-ID]")? actedOnBehalfOf($classe, $usuario) | ||
$line.contains("[ERRO]: ")? wasAttributedTo($erro, $classe) | ||
$line.contains("Sessão expirada!")? wasAttributedTo($expiracao, $classe) | ||
testRegexp($line, "\[AGENT\].*\[ACTIVITY\]") ? wasAssociatedWith($ac, $ag, -) | ||
testRegexp($line, "\[AGENT\].*\[ENTITY\]") ? wasAttributedTo($et, $ag) | ||
testRegexp($line, "\[ACTIVITY\].*\[ACTIVITY\]") ? wasInformedBy($ac, $informer) | ||
testRegexp($line, "\[ENTITY\].*\[ACTIVITY\]") ? wasGeneratedBy($et, $ac, -) | ||
testRegexp($line, "\[ACTIVITY\].*\[ENTITY\]") ? used($ac, $et, -) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
This is a sample log file... | ||
Only lines starting with MM-dd-yyyy HH:mm:ss will be considered according | ||
to the definitions (sample.conf) used for this sample... | ||
|
||
01-01-2019 00:00:01 I am [AGENT]: Agent1! doing some [ACTIVITY]: Stuff1; to some [ENTITY]: Entity1! | ||
01-01-2019 00:00:02 That's [AGENT]: Agent2! doing some [ACTIVITY]: Stuff2; because of [ACTIVITY]: Stuff1! | ||
01-01-2019 00:00:03 Look that! [ENTITY]: Entity2! was generated by [ACTIVITY]: Stuff2. | ||
01-01-2019 00:00:04 Attention! [ACTIVITY]: Stuff3! used [ENTITY]: Entity2! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.