daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Nov 22nd, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ($programname == "supervisord") then {
  2.     set $.programname = re_extract($msg, "^ ([^ ]+)", 0, 1, $programname);
  3.     set $.msg = re_extract($msg, "^ [^ ]+ (.+)", 0, 1, $msg);
  4. }
  5.    
  6. if ($programname startswith "real") then {...}
  7.    
  8. processBATCH: next msg 0: <14>Nov 22 10:51:55 supervisord: real-program-name 127.0.0.1 - - [22/Nov/2017:10:51:55 +0000] "GET /blabla
  9.     IF
  10.         var 'programname'
  11.       ==
  12.         string 'supervisord'
  13. eval expr 0x1a4e0b0, type 'CMP_EQ'
  14. eval expr 0x1a4dcd0, type 'V'
  15. rainerscript: (string) var 17: 'supervisord'
  16. eval expr 0x1a4dcd0, return datatype 'S':0
  17. eval expr 0x1a4e0b0, return datatype 'N':1
  18. if condition result is 1
  19.     SET .programname =
  20.       function 're_extract' (id:8, params:5)
  21.         var 'msg'
  22.         string '^ ([^ ]+)'
  23.         0
  24.         1
  25.         var 'programname'
  26.     END SET
  27. eval expr 0x1a4e270, type 'F'
  28. rainerscript: executing function id 8
  29. eval expr 0x1a4dd00, type 'V'
  30. rainerscript: (string) var 1: ' real-program-name 127.0.0.1 - - [22/Nov/2017:10:51:55 +0000] "GET /blabla" "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"'
  31. eval expr 0x1a4dd00, return datatype 'S':0
  32. eval expr 0x1a4e170, type 'N'
  33. eval expr 0x1a4e170, return datatype 'N':0
  34. eval expr 0x1a4e190, type 'N'
  35. eval expr 0x1a4e190, return datatype 'N':1
  36. re_extract: regexec return is 0
  37. re_extract: regex: end search, found 1
  38. eval expr 0x1a4e270, return datatype 'S':0
  39.     SET .msg =
  40.       function 're_extract' (id:8, params:5)
  41.         var 'msg'
  42.         string '^ [^ ]+ (.+)'
  43.         0
  44.         1
  45.         var 'msg'
  46.     END SET
  47. eval expr 0x1a53290, type 'F'
  48. rainerscript: executing function id 8
  49. eval expr 0x1a534e0, type 'V'
  50. rainerscript: (string) var 1: ' real-program-name 127.0.0.1 - - [22/Nov/2017:10:51:55 +0000] "GET /blabla HTTP/1.0" 200 - "https://recette-peopledoc.integration.people-doc.com/company/document/employee/142676/" "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"'
  51. eval expr 0x1a534e0, return datatype 'S':0
  52. eval expr 0x1a53160, type 'N'
  53. eval expr 0x1a53160, return datatype 'N':0
  54. eval expr 0x1a53180, type 'N'
  55. eval expr 0x1a53180, return datatype 'N':1
  56. re_extract: regexec return is 0
  57. re_extract: regex: end search, found 1
  58. eval expr 0x1a53290, return datatype 'S':0
  59.     IF
  60.         var 'programname'
  61.       STARTSWITH
  62.         string 'real'
  63. eval expr 0x1a545f0, type 'CMP_STARTSWITH'
  64. eval expr 0x1a546b0, type 'V'
  65. rainerscript: (string) var 17: 'supervisord'
  66. eval expr 0x1a546b0, return datatype 'S':0
  67. eval expr 0x1a545f0, return datatype 'N':0
  68. if condition result is 0
RAW Paste Data
Top