[16325] 2021-01-16_使用elk搭建密码top统计库

文档创建者:s7ckTeam
浏览次数:3
最后更新:2025-01-18
2021-01-16_使用elk搭建密码top统计库 使 e l k t o p k 3 v i   F r e e B u f   2 0 2 1 - 0 1 - 1 6 e l k e l a s t i c s e a r c h l o g s t a s h k i b a n a t o p N u b u n t u   2 0 . 4   6 4 1 6 G 2 T 1 2 8 G   s s d E l a s t i c S e a r c h 7 . 1 0 . 1 K i b a n a 7 . 1 0 . 1 L o g s t a s h 7 . 1 0 . 1 1 e l a s t i c s e a r c h t a r   - z x v f   e l a s t i c s e a r c h * . t a r . g z e l a s t i c s e a r c h e l a s t i c s e a r c h c o n f / e l a s t i c s e a r c h . y m l   # # p a t h . d a t a :   / p a t h / t o / d a t a # # p a t h . l o g s :   / p a t h / t o / l o g s # : b o o t s t r a p . m e m o r y _ l o c k :   t r u e     - # I P 1 2 7 . 0 . 0 . 1 n e t w o r k . h o s t 1 2 7 . 0 . 0 . 1 h t t p . p o r t : 9 2 0 0 e l a s t i c s e a r c h . / b i n / e l a s t i c s e a r c h   c u r l   1 2 7 . 0 . 0 . 1 : 9 2 0 0 E S _ H E A P _ S I Z E
使 j v m 1 6 G 8 g . / c o n f i g / j v m . o p t i o n s - X m s 8 g - X m x 8 g 使 n o h u p   . / b i n / e l a s t i c s e a r c h   & E S 2 K i b a n a k i b a n a t a r   - z x v f   k i b a n a * . t a r . g z k i b a n a k i b a n a k i b a n a . / c o n f i g / k i b a n a . y m l s e r v e r . p o r t :   5 6 0 1   # # I P s e r v e r . h o s t :   0 . 0 . 0 . 0   # # e l a s t i c s e a r c h   e l a s t i c s e a r c h . h o s t s : [ h t t p : / / l o c a l h o s t : 9 2 0 0 ]   # l o c a l h o s t 1 2 7 . 0 . 0 . 1 n o h u p   . / b i n / k i b a n a   & k a b a n a h o s t : 5 6 0 1 访 k i b a n a
3 l o g s t a s h 使 l o g s t a s h l o g s t a s h l o g s t a s h E S   3 . 1   l o g s t a s h t a r   - z x v f   l o g s t a s h * . t a r . g z l o g s t a s h l o g s t a s h   西 l o g s t a s h i n p u t f i l t e r o u t p u t i n p u t b e a t e l k b e a t s y s l o g h t t p s : / / w w w . e l a s t i c . c o / g u i d e / e n / l o g s t a s h / c u r r e n t / i n p u t - p l u g i n s . h t m l 使 f i l e f i l t e r 使 g r o k j s o n x m l h t t p s : / / w w w . e l a s t i c . c o / g u i d e / e n / l o g s t a s h / c u r r e n t / f i l t e r - p l u g i n s . h t m l 使 g r o k o u t p u t s y s l o g c s v f i l e h t t p s : / / w w w . e l a s t i c . c o / g u i d e / e n / l o g s t a s h / c u r r e n t / o u t p u t - p l u g i n s . h t m l   使 e l a s t i c s e a r c h e s 3 . 2   w e a k p a s s . t x t a d m i n 1 2 3 4 5 6 a d m i n a d m i n a d m i n 1 a d m i n 1 2 3 4 5 t e s t 1 2 3 t e s t t e s t t e s t 1 2 3 4 c o n f i g   l o s t a s h - s a m p l e . c o n f #   S a m p l e   L o g s t a s h   c o n f i g u r a t i o n   f o r   c r e a t i n g   a   s i m p l e #   B e a t s   - >   L o g s t a s h   - >   E l a s t i c s e a r c h   p i p e l i n e . # i n p u t   { # 使 b e a t s     b e a t s   {         p o r t   = >   5 0 4 4     } } # 使 e l a s t i c s e a r c h
w e a k p a s s . c o n f 使   . / b i n / l o g s t a s h   - f   c o n f i g / w e a k p a s s . c o n f 使 # 使 e l a s t i c s e a r c h o u t p u t   {     e l a s t i c s e a r c h   {         h o s t s   = >   [ " h t t p : / / l o c a l h o s t : 9 2 0 0 " ]         i n d e x   = >   " % { [ @ m e t a d a t a ] [ b e a t ] } - % { [ @ m e t a d a t a ] [ v e r s i o n ] } - % { + Y Y Y Y . M M . d d } "         # u s e r   = >   " e l a s t i c "         # p a s s w o r d   = >   " c h a n g e m e "     } } i n p u t {         f i l e   {               #         p a t h   = >   " p a t h / w e a k p a s s . t x t "         #         s t a r t _ p o s i t i o n   = >   " b e g i n n i n g "         } } f i l t e r {         g r o k {                 m a t c h   = >   {                 #                 " m e s s a g e " = > " ( ? < n a m e > . * ? ) - - - - ( ? < p w d > . * ) "                 }         } } o u t p u t {         # 使 d e b u g         s t d o u t   {                         c o d e c   = >   r u b y d e b u g         } }
. / d a t a 3 . 3   p a t h m e s s a g e h o s t g o r k r e m o v e _ f i e l d = > [ p a t h , m e s s a g e , h o s t ]
  3 . 4   E S 使 w e a k p a s s . t x t l o g s t a s h d a t a i n p u t {                 f i l e   {                         #                                 p a t h   = >   " / m e d i a / k 2 / 5 f c d a 6 c 4 - e 0 0 9 - 4 1 d d - a 3 1 4 - c 5 4 c 3 c 5 5 1 2 6 b / e l k / w e a k p a s s 1 . t x t "                                 s t a r t _ p o s i t i o n   = >   " b e g i n n i n g "                 } } f i l t e r {                 g r o k {                                       m a t c h   = >   {                                                 #                                                 " m e s s a g e " = > " ( ? < n a m e > . * ? ) - - - - ( ? < p w d > . * ) "                                 }
3 . 5   使 使 k i n a b a k i b a n a                                 }                                 r e m o v e _ f i e l d = > [ " p a t h " , " m e s s a g e " , " h o s t " , " @ t i m e s t a m p " ]                                 #                                 a d d _ t a g   = >   " w e a k p a s s "                 } } o u t p u t {                 # 使 d e b u g                 # s t d o u t {   c o d e c   = >   r u b y d e b u g }                 e l a s t i c s e a r c h {                                 a c t i o n   = >   " i n d e x "                                 i n d e x   = >   " w e a k p a s s " #                                 h o s t s   = >   [ " 1 2 7 . 0 . 0 . 1 : 9 2 0 0 " ]   # E S                 }                               }
d i s c o v e r 1 1
a d m i n a d m i n 使 k i b a n a d a s h b o a r d D a t a   T a b l e ,
l o g s t a s h p a t h   m e s s a g e   h o s t   @ t i m e s t a m p   i n p u t { } f i l t e r {                 g r o k {                                 m a t c h   = >   {                                                 #                                                 " m e s s a g e " = > " . * "                                 }                                 r e m o v e _ f i e l d = > [ " p a t h " , " m e s s a g e " , " h o s t " , " @ t i m e s t a m p " ]                                 #
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则