-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
1693 lines (1509 loc) · 130 KB
/
index.html
File metadata and controls
1693 lines (1509 loc) · 130 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en-US">
<head>
<style type="text/css">.ttfm1{font-family: 'dual300';font-size:em;line-height:em;color:;} .ttfm2{font-family: 'Roboto';font-size:em;line-height:3em;color:;}</style> <!--[if lt IE 9]>
<script src="../../../../wp/wp-content/themes/rise/js/html5/dist/html5shiv.js"></script>
<script src="//css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="../../../../wp/wp-content/themes/rise/css/ie8.css"/>
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="../../../../wp/wp-content/themes/rise/css/ie7.css"/>
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<meta name="google-site-verification" content="ovwnX0ej2kps4UuJ9NOzNjJcLOQD8JPDLNhe-hMYTMk">
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1">
<!-- This site is optimized with the Yoast SEO plugin v16.4 - https://yoast.com/wordpress/plugins/seo/ -->
<title>Auto-Remediation with StackStorm & Splunk - StackStorm</title>
<link rel="canonical" href="./index.html">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="Auto-Remediation with StackStorm & Splunk - StackStorm">
<meta property="og:description" content="Oct 21, 2016 by Siddharth Krishna Splunk is a great tool for collecting and analyzing log data. StackStorm is a great tool for automated event-driven remediation. So what happens when we stick them together? Here’s how to use Splunk to collect syslog data and trigger event-based network remediation workflows using StackStorm! Syslog as an event…">
<meta property="og:url" content="/2016/10/21/auto-remediation-stackstorm-splunk/">
<meta property="og:site_name" content="StackStorm">
<meta property="article:published_time" content="2016-10-21T20:13:26+00:00">
<meta property="article:modified_time" content="2018-03-26T23:07:18+00:00">
<meta property="og:image" content="../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-1024x433.png">
<meta name="twitter:label1" content="Written by">
<meta name="twitter:data1" content="st2admin">
<meta name="twitter:label2" content="Est. reading time">
<meta name="twitter:data2" content="6 minutes">
<script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"/#organization","name":"StackStorm","url":"/","sameAs":[],"logo":{"@type":"ImageObject","@id":"/#logo","inLanguage":"en-US","url":"../../../../wp/wp-content/uploads/2014/10/stackstorm-logo-header.png","contentUrl":"../../../../wp/wp-content/uploads/2014/10/stackstorm-logo-header.png","width":228,"height":59,"caption":"StackStorm"},"image":{"@id":"/#logo"}},{"@type":"WebSite","@id":"/#website","url":"/","name":"StackStorm","description":"Event-driven automation","publisher":{"@id":"/#organization"},"potentialAction":[{"@type":"SearchAction","target":"/?s={search_term_string}","query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#primaryimage","inLanguage":"en-US","url":"../../../../wp/wp-content/uploads/2016/10/splunksearchingapp.png","contentUrl":"../../../../wp/wp-content/uploads/2016/10/splunksearchingapp.png","width":1136,"height":480},{"@type":"WebPage","@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#webpage","url":"/2016/10/21/auto-remediation-stackstorm-splunk/","name":"Auto-Remediation with StackStorm & Splunk - StackStorm","isPartOf":{"@id":"/#website"},"primaryImageOfPage":{"@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#primaryimage"},"datePublished":"2016-10-21T20:13:26+00:00","dateModified":"2018-03-26T23:07:18+00:00","breadcrumb":{"@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["/2016/10/21/auto-remediation-stackstorm-splunk/"]}]},{"@type":"BreadcrumbList","@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"item":{"@type":"WebPage","@id":"/","url":"/","name":"Home"}},{"@type":"ListItem","position":2,"item":{"@type":"WebPage","@id":"/blog/","url":"/blog/","name":"Blog"}},{"@type":"ListItem","position":3,"item":{"@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#webpage"}}]},{"@type":"Article","@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#article","isPartOf":{"@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#webpage"},"author":{"@id":"/#/schema/person/d2242d1dc5b3b5652be4c9175eb18000"},"headline":"Auto-Remediation with StackStorm & Splunk","datePublished":"2016-10-21T20:13:26+00:00","dateModified":"2018-03-26T23:07:18+00:00","mainEntityOfPage":{"@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#webpage"},"wordCount":1064,"commentCount":0,"publisher":{"@id":"/#organization"},"image":{"@id":"/2016/10/21/auto-remediation-stackstorm-splunk/#primaryimage"},"thumbnailUrl":"../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-1024x433.png","keywords":["Auto-remediation","chatops","networking","Splunk","syslog","tutorials","workflows"],"articleSection":["Blog","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["/2016/10/21/auto-remediation-stackstorm-splunk/#respond"]}]},{"@type":"Person","@id":"/#/schema/person/d2242d1dc5b3b5652be4c9175eb18000","name":"st2admin","image":{"@type":"ImageObject","@id":"/#personlogo","inLanguage":"en-US","url":"https://secure.gravatar.com/avatar/67f6d678610d4b8a7b9a7e95a065695f?s=96&d=mm&r=g","contentUrl":"https://secure.gravatar.com/avatar/67f6d678610d4b8a7b9a7e95a065695f?s=96&d=mm&r=g","caption":"st2admin"},"url":"/author/support/"}]}</script>
<!-- / Yoast SEO plugin. -->
<link rel="dns-prefetch" href="//s.w.org">
<link rel="alternate" type="application/rss+xml" title="StackStorm » Auto-Remediation with StackStorm & Splunk Comments Feed" href="/2016/10/21/auto-remediation-stackstorm-splunk/feed/">
<script type="text/javascript">
window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.1\/svg\/","svgExt":".svg","source":{"concatemoji":"\/wp\/wp-includes\/js\/wp-emoji-release.min.js?ver=09e48cfb58fec140b4ee0c6d1d4da1b2"}};
!function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){var a=String.fromCharCode;p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,e),0,0);e=i.toDataURL();return p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,t),0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r<o.length;r++)t.supports[o[r]]=function(e){if(!p||!p.fillText)return!1;switch(p.textBaseline="top",p.font="600 32px Arial",e){case"flag":return s([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])?!1:!s([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!s([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]);case"emoji":return!s([55357,56424,8205,55356,57212],[55357,56424,8203,55356,57212])}return!1}(o[r]),t.supports.everything=t.supports.everything&&t.supports[o[r]],"flag"!==o[r]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[o[r]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(n=t.source||{}).concatemoji?c(n.concatemoji):n.wpemoji&&n.twemoji&&(c(n.twemoji),c(n.wpemoji)))}(window,document,window._wpemojiSettings);
</script>
<style type="text/css">img.wp-smiley,
img.emoji {
display: inline !important;
border: none !important;
box-shadow: none !important;
height: 1em !important;
width: 1em !important;
margin: 0 .07em !important;
vertical-align: -0.1em !important;
background: none !important;
padding: 0 !important;
}</style>
<link rel="stylesheet" id="dashicons-css" href="../../../../wp/wp-includes/css/dashicons.min.css?ver=09e48cfb58fec140b4ee0c6d1d4da1b2" type="text/css" media="all">
<link rel="stylesheet" id="menu-icons-extra-css" href="../../../../wp/wp-content/plugins/menu-icons/css/extra.min.css?ver=0.12.8" type="text/css" media="all">
<link rel="stylesheet" id="wp-block-library-css" href="../../../../wp/wp-includes/css/dist/block-library/style.min.css?ver=09e48cfb58fec140b4ee0c6d1d4da1b2" type="text/css" media="all">
<link rel="stylesheet" id="cookie-law-info-css" href="../../../../wp/wp-content/plugins/cookie-law-info/public/css/cookie-law-info-public.css?ver=2.0.3" type="text/css" media="all">
<link rel="stylesheet" id="cookie-law-info-gdpr-css" href="../../../../wp/wp-content/plugins/cookie-law-info/public/css/cookie-law-info-gdpr.css?ver=2.0.3" type="text/css" media="all">
<link rel="stylesheet" id="testimonial-rotator-style-css" href="../../../../wp/wp-content/plugins/testimonial-rotator/testimonial-rotator-style.css?ver=09e48cfb58fec140b4ee0c6d1d4da1b2" type="text/css" media="all">
<link rel="stylesheet" id="font-awesome-css" href="../../../../wp/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/css/types/font-awesome.min.css?ver=4.7.0" type="text/css" media="all">
<link rel="stylesheet" id="rise-style-css" href="../../../../wp/wp-content/themes/stackstorm/style.css?ver=09e48cfb58fec140b4ee0c6d1d4da1b2" type="text/css" media="all">
<link rel="stylesheet" id="thrive-reset-css" href="../../../../wp/wp-content/themes/rise/css/reset.css?v=1.101.1" type="text/css" media="all">
<link rel="stylesheet" id="thrive-main-style-css" href="../../../../wp/wp-content/themes/rise/css/main_blue.css?v=1.101.1" type="text/css" media="all">
<link rel="stylesheet" id="enlighterjs-css" href="../../../../wp/wp-content/plugins/enlighter/cache/enlighterjs.min.css?ver=c8vUwCl5jS8Iu00" type="text/css" media="all">
<script type="text/javascript" src="../../../../wp/wp-includes/js/jquery/jquery.min.js?v=1.101.1" id="jquery-core-js"></script>
<script type="text/javascript" src="../../../../wp/wp-includes/js/jquery/jquery-migrate.min.js?v=1.101.1" id="jquery-migrate-js"></script>
<script type="text/javascript" id="cookie-law-info-js-extra">
/* <![CDATA[ */
var Cli_Data = {"nn_cookie_ids":[],"cookielist":[],"non_necessary_cookies":[],"ccpaEnabled":"","ccpaRegionBased":"","ccpaBarEnabled":"","strictlyEnabled":["necessary","obligatoire"],"ccpaType":"gdpr","js_blocking":"","custom_integration":"","triggerDomRefresh":"","secure_cookies":""};
var cli_cookiebar_settings = {"animate_speed_hide":"500","animate_speed_show":"500","background":"#384353","border":"#b1a6a6c2","border_on":"","button_1_button_colour":"#384353","button_1_button_hover":"#2d3642","button_1_link_colour":"#fff","button_1_as_button":"","button_1_new_win":"","button_2_button_colour":"#333","button_2_button_hover":"#292929","button_2_link_colour":"#00a5bf","button_2_as_button":"","button_2_hidebar":"1","button_3_button_colour":"#000","button_3_button_hover":"#000000","button_3_link_colour":"#fff","button_3_as_button":"1","button_3_new_win":"","button_4_button_colour":"#000","button_4_button_hover":"#000000","button_4_link_colour":"#fff","button_4_as_button":"1","button_7_button_colour":"#61a229","button_7_button_hover":"#4e8221","button_7_link_colour":"#fff","button_7_as_button":"1","button_7_new_win":"","font_family":"inherit","header_fix":"","notify_animate_hide":"1","notify_animate_show":"","notify_div_id":"#cookie-law-info-bar","notify_position_horizontal":"right","notify_position_vertical":"bottom","scroll_close":"","scroll_close_reload":"","accept_close_reload":"","reject_close_reload":"","showagain_tab":"1","showagain_background":"#fff","showagain_border":"#000","showagain_div_id":"#cookie-law-info-again","showagain_x_position":"100px","text":"#b7b7b7","show_once_yn":"","show_once":"10000","logging_on":"","as_popup":"","popup_overlay":"1","bar_heading_text":"","cookie_bar_as":"banner","popup_showagain_position":"bottom-right","widget_position":"left"};
var log_object = {"ajax_url":"\/wp\/wp-admin\/admin-ajax.php"};
/* ]]> */
</script>
<script type="text/javascript" src="../../../../wp/wp-content/plugins/cookie-law-info/public/js/cookie-law-info-public.js?ver=2.0.3" id="cookie-law-info-js"></script>
<script type="text/javascript" src="../../../../wp/wp-content/plugins/testimonial-rotator/js/jquery.cycletwo.js?v=1.101.1" id="cycletwo-js"></script>
<script type="text/javascript" src="../../../../wp/wp-content/plugins/testimonial-rotator/js/jquery.cycletwo.addons.js?v=1.101.1" id="cycletwo-addons-js"></script>
<script type="text/javascript" src="../../../../wp/wp-content/plugins/easy-logo-slider/js/jquery.jcarousel.min.js?v=1.101.1" id="jquery_jcarousel_min-js"></script>
<script type="text/javascript" src="../../../../wp/wp-content/plugins/easy-logo-slider/js/jcarousel.responsive.js?ver=09e48cfb58fec140b4ee0c6d1d4da1b2" id="jcarousel_responsive-js"></script>
<link rel="https://api.w.org/" href="/wp-json/">
<link rel="alternate" type="application/json" href="/wp-json../../../../wp/v2/posts/6143">
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="../../../../wp/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="../../../../wp/wp-includes/wlwmanifest.xml">
<link rel="shortlink" href="/?p=6143">
<link rel="alternate" type="application/json+oembed" href="/wp-json/oembed/1.0/embed?url=https%3A%2F%2F%2F2016%2F10%2F21%2Fauto-remediation-stackstorm-splunk%2F">
<link rel="alternate" type="text/xml+oembed" href="/wp-json/oembed/1.0/embed?url=https%3A%2F%2F%2F2016%2F10%2F21%2Fauto-remediation-stackstorm-splunk%2F&format=xml">
<style type="text/css">:not(#tve) .ttfm1{font-family: 'dual300' !important;font-weight: 400 !important;}.ttfm1 input, .ttfm1 select, .ttfm1 textarea, .ttfm1 button {font-family: 'dual300' !important;font-weight: 400 !important;}:not(#tve) .ttfm2{font-family: 'Roboto' !important;font-weight: 400 !important;}.ttfm2 input, .ttfm2 select, .ttfm2 textarea, .ttfm2 button {font-family: 'Roboto' !important;font-weight: 400 !important;}:not(#tve) .ttfm2.bold_text,.ttfm2 .bold_text,.ttfm2 b,.ttfm2 strong{font-weight: 500 !important;}.ttfm2.bold_text,.ttfm2 .bold_text,.ttfm2 b,.ttfm2 strong input, .ttfm2.bold_text,.ttfm2 .bold_text,.ttfm2 b,.ttfm2 strong select, .ttfm2.bold_text,.ttfm2 .bold_text,.ttfm2 b,.ttfm2 strong textarea, .ttfm2.bold_text,.ttfm2 .bold_text,.ttfm2 b,.ttfm2 strong button {font-weight: 500 !important;}</style>
<style type="text/css" id="tve_global_variables">:root{--tcb-gradient-0:linear-gradient(180deg, #ff712c 0%, #000000 100%);}</style> <style type="text/css">.wp-video-shortcode {
max-width: 100% !important;
}
.bSe a {
clear: right;
}
.bSe blockquote {
clear: both;
}
body { background:#FFF; }.cnt article h1.entry-title a { color:#333; }.cnt article h2.entry-title a { color:#333; }.bSe h1, h1.entry-title, h1.entry-title a { color:#333; }.bSe h2 { color:#464545; }.bSe h3 { color:#333; }.bSe h4 { color:#333; }.bSe h5 { color:#333; }.bSe h6 { color:#333; }.bSe p, .mry .awr-e p { color:#666; }.cnt .bSe { color:#666; }.cnt h1 a, .tve-woocommerce .bSe .awr .entry-title, .tve-woocommerce .bSe .awr .page-title{font-family:Roboto,sans-serif;}.bSe h1{font-family:Roboto,sans-serif;}.bSe h2,.tve-woocommerce .bSe h2{font-family:Roboto,sans-serif;}.bSe h3,.tve-woocommerce .bSe h3{font-family:Roboto,sans-serif;}.bSe h4{font-family:Roboto,sans-serif;}.bSe h5{font-family:Roboto,sans-serif;}.bSe h6{font-family:Roboto,sans-serif;}#text_logo{font-family:Roboto,sans-serif;}.cnt h1 a { font-weight:500; }.bSe h1 { font-weight:500; }.bSe h2 { font-weight:500; }.bSe h3 { font-weight:500; }.bSe h4 { font-weight:500; }.bSe h5 { font-weight:500; }.bSe h6 { font-weight:500; }.cnt{font-family:Roboto,sans-serif;font-weight:300;}article strong {font-weight: bold;}.cnt p, .tve-woocommerce .product p, .tve-woocommerce .products p, .brd ul li, header nav ul li a, header nav ul li > ul li a, .has-extended.has-heading .colch, footer, footer .fmm p, .aut-f{font-family:Roboto,sans-serif;font-weight:300;}article strong {font-weight: bold;}.bSe h1, .bSe .entry-title { font-size:46px; }.cnt { font-size:18px; }.thrivecb { font-size:18px; }.out { font-size:18px; }.aut p { font-size:18px; }.cnt p { line-height:1.5em; }.thrivecb { line-height:1.5em; }.bSe a, .cnt a { color:#24447b; }.bSe .faq h4{font-family:Roboto,sans-serif;font-weight:300;}article strong {font-weight: bold;}header nav > ul.menu > li > a { color:#fff; }header nav > ul.menu > li > a:hover { color:#fff; }header nav > ul > li.current_page_item > a:hover { color:#fff; }header nav > ul > li.current_menu_item > a:hover { color:#fff; }header nav > ul > li.current_menu_item > a:hover { color:#fff; }header nav > ul > li > a:active { color:#fff; }header #logo > a > img { max-width:200px; }header ul.menu > li.h-cta > a { color:#FFFFFF!important; }header ul.menu > li.h-cta > a { background:#4b7cc7; }header ul.menu > li.h-cta > a { border-color:#4b7cc7; }header ul.menu > li.h-cta > a:hover { color:#4b7cc7!important; }header ul.menu > li.h-cta > a:hover { background:#transparent; }</style>
<style type="text/css">span.oe_textdirection { unicode-bidi: bidi-override; direction: rtl; }
span.oe_displaynone { display: none; }</style>
<style type="text/css" id="thrive-default-styles">@media (min-width: 300px) { .tcb-style-wrap blockquote {color:rgb(102, 102, 102);background-color:rgba(0, 0, 0, 0);font-family:Roboto, sans-serif;font-size:18px;font-weight:300;font-style:normal;margin:;padding-top:0px;padding-bottom:0px;text-decoration:rgb(102, 102, 102);text-transform:none;border-left:;--tcb-applied-color:;} }</style>
<link rel="icon" href="../../../../wp/wp-content/uploads/2015/09/st2.png" sizes="32x32">
<link rel="icon" href="../../../../wp/wp-content/uploads/2015/09/st2.png" sizes="192x192">
<link rel="apple-touch-icon" href="../../../../wp/wp-content/uploads/2015/09/st2.png">
<meta name="msapplication-TileImage" content="../../../../wp/wp-content/uploads/2015/09/st2.png">
<style type="text/css" id="wp-custom-css">/*
You can add your own CSS here.
Click the help icon above to learn more.
*/
.bSe ul:not([class]) {
margin-left: 20px;
margin-bottom: 15px;
}
.bSe ul:not([class]) li {
padding-left: 0;
margin-bottom: 5px;
position: relative;
}
/* StackStorm "Donate" button */
li#menu-item-9062 a {
display: inline-flex;
justify-content: center;
align-items: center;
background-color: #418cc5;
border: 3px solid #418cc5;
color: #fff !important;
text-decoration: none;
height: 30px;
border-radius: 20px;
padding: 0 12px;
font-weight: 400;
transition: all .25s ease-in-out;
}
li#menu-item-9062 a:hover {
color: #333 !important;
}
li#menu-item-9062 a:before {
top: 0;
}</style>
<style type="text/css">/* ***blog*** */
pre code {
overflow: scroll !important;
white-space: pre !important;
font-size: 11px
}
header.side nav>ul>li {
padding: 15px !important;
}
.cnt {
margin-top: 50px !important;
}
.cnt a.customHref{
color: #f82 !important;
}
.bSe ul li:before {
content: '' !important;
position: absolute;
left: 0;
top: -2px;
}
.bSe ul {
list-style-type: disc !important;
}
.bSe table tbody tr{
border-top-width:0px !important;
}
code {
font-size: 0.9em !important;
}
pre{
font-family: Monaco, MonacoRegular, monospace !important;
font-size: 14px !important;
background-color: rgb(250,253,255) !important;
padding: 0px 3px 0px 3px !important;
white-space: pre !important;
}
.bSe h1, .bSe .entry-title {
line-height: 1.2;
font-size: 40px;
}
.bSe h2 {
font-weight: 300;
}
.bSe h2, .tve-woocommerce .bSe h2 {
font-family: "Roboto",sans-serif;
}
.cnt p, .tve-woocommerce .product p, .tve-woocommerce .products p {
font-family: Roboto,sans-serif;
font-weight: 300;
}
p {
margin-bottom: 15px;
}
header.fbh {
height: 49px;
}
header #logo>a>img {
max-width: 150px;
}
.gist .blob-code .blob-code-inner .js-file-line {
white-space: pre !important;
}</style>
</head>
<body class="post-template-default single single-post postid-6143 single-format-standard">
<!-- BEGIN LF Header --> <div id="lf-header" style="padding-bottom: 3px; padding-top: 3px;background: #252525;"> <div class="container wrp"> <a href="https://linuxfoundation.org/projects" target="_blank" rel="noopener noreferrer"> <img src="../../../../wp/wp-content/themes/stackstorm/images/logo_lf_projects_horizontal.png" style="max-width: 270px;"> </a> </div> </div> <!-- END LF Header -->
<div class="theme-wrapper">
<div class="fln">
<div class="wrp clearfix">
<a class="fl-l" href="../../../../index.html">
<img src="../../../../wp/wp-content/uploads/2016/10/StackStorm-logo228.png" alt="StackStorm">
</a>
<div class="fl-s clearfix">
<ul>
</ul>
</div>
</div>
</div>
<div class="header-wrapper h-bi">
<div id="floating_menu" data-float="float" data-social="0">
<header class="side" style="">
<div class="h-i">
<div class="wrp">
<div id="logo">
<a href="../../../../index.html">
<img src="../../../../wp/wp-content/uploads/2016/10/StackStorm-logo228.png" alt="StackStorm"></a>
</div>
<div class="m-s">
<div class="hsm"></div>
<div class="m-si">
<nav class="menu-stackstorm-refresh-container"><ul id="menu-stackstorm-refresh" class="menu">
<li id="menu-item-5952" class="menu-item menu-item-type-custom menu-item-object-custom toplvl"><a href="../../../../features/index.html">Features</a></li>
<li id="menu-item-6100" class="menu-item menu-item-type-custom menu-item-object-custom toplvl"><a href="../../../../index.html#community">Community</a></li>
<li id="menu-item-4207" class="menu-item menu-item-type-custom menu-item-object-custom toplvl"><a target="_blank" href="http://docs.stackstorm.com/">Docs</a></li>
<li id="menu-item-8701" class="menu-item menu-item-type-custom menu-item-object-custom toplvl"><a href="https://exchange.stackstorm.org/">Exchange</a></li>
<li id="menu-item-2277" class="menu-item menu-item-type-custom menu-item-object-custom toplvl"><a href="../../../../blog/index.html">Blog</a></li>
<li id="menu-item-9062" class="menu-item menu-item-type-post_type menu-item-object-page toplvl"><a href="../../../../donate/index.html">Donate</a></li>
</ul></nav> <!-- Cart Dropdown -->
</div>
</div>
</div>
</div>
</header>
</div>
</div>
<div class="wrp cnt">
<section class="bSe bpd">
<div class="awr">
<h1 class="entry-title">Auto-Remediation with StackStorm & Splunk</h1>
<div class="awr-i">
<p><strong>Oct 21, 2016</strong><br>
<em>by Siddharth Krishna</em></p>
<p><a href="https://www.splunk.com/"><strong>Splunk</strong></a> is a great tool for collecting and analyzing log data. StackStorm is a great tool for automated event-driven remediation. So what happens when we stick them together? Here’s how to use Splunk to collect syslog data and trigger event-based network remediation workflows using <strong>StackStorm</strong>!</p>
<p><span id="more-6143"></span></p>
<h2>Syslog as an event source</h2>
<p><strong>Syslog</strong> for events and errors from the network devices can be tapped to trigger troubleshooting and auto-remediation actions on those devices. For example, if a ‘link down’ event occurs, the syslog message can be used to auto-trigger an action that would log into the device and try to bring the interface back up. In parallel, an IT ticket can also be auto-created with the relevant interface details. Notification of the event and the automated workflow can optionally be sent to a Slack channel (ChatOps).</p>
<p>One option is to have StackStorm itself act as the syslog server and run a sensor that polls the log file to match specific log strings. This method, although workable, has its performance limitations, and it doesn’t give us a nice tool for searching historical logs. Instead we can use something like Splunk, which is a log aggregation and analysis system. Splunk includes alert functionality – we can filter syslog messages, extract relevant fields, and trigger actions such as making a webhook request to StackStorm.</p>
<p>Here’s how to configure an auto-remediation workflow using Brocade VDX switches, Splunk and StackStorm:</p>
<blockquote><p>
NB this guide assumes that you have a working StackStorm/BWC system, and a Splunk server.
</p></blockquote>
<h2>VDX Configuration</h2>
<p>Configure all VDX switches to send syslog messages to the Splunk server:</p>
<p><code>logging syslog-server <splunk-ip-address> use-vrf mgmt-vrf</code></p>
<h2>Setting up Splunk</h2>
<p>We’re using the default Splunk <a href="http://docs.splunk.com/Documentation/Splunk/6.1.7/Overview/Searchingandreporting">Search & Reporting</a> App here. You could also use the <a href="https://splunkbase.splunk.com/app/1909/">Brocade Splunk App</a>.</p>
<p><img loading="lazy" src="../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-1024x433.png" alt="splunksearchingapp" width="1024" height="433" class="aligncenter size-large wp-image-6157" srcset="../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-1024x433.png 1024w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-150x63.png 150w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-300x127.png 300w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-768x325.png 768w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-80x34.png 80w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-220x93.png 220w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-237x100.png 237w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-280x118.png 280w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-510x215.png 510w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-750x317.png 750w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-975x412.png 975w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp-710x300.png 710w, ../../../../wp/wp-content/uploads/2016/10/splunksearchingapp.png 1136w" sizes="(max-width: 1024px) 100vw, 1024px"></p>
<p>If your server does not currently accept syslog input, add it by going to:</p>
<p><em>Settings -> Data -> Data Inputs -> UDP -> New</em></p>
<p>Input UDP port 514 (default syslog port) and Source Type as ‘syslog’</p>
<p>Refer <a href="http://docs.splunk.com/Documentation/Splunk/6.5.0/Data/Configureyourinputs">here</a> for more on configuring data inputs on Splunk.</p>
<p>Splunk should now start displaying live syslog events from the switches in its search result.</p>
<p><em>Search -> Data Summary -> Search Type: syslog</em></p>
<p><img loading="lazy" src="../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-1024x395.png" alt="splunksearchsyslog" width="1024" height="395" class="aligncenter size-large wp-image-6158" srcset="../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-1024x395.png 1024w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-150x58.png 150w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-300x116.png 300w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-768x296.png 768w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-80x31.png 80w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-220x85.png 220w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-250x97.png 250w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-280x108.png 280w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-510x197.png 510w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-750x290.png 750w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-975x376.png 975w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-1190x459.png 1190w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog-777x300.png 777w, ../../../../wp/wp-content/uploads/2016/10/splunksearchsyslog.png 1303w" sizes="(max-width: 1024px) 100vw, 1024px"></p>
<p>Use the output of <code>show logging raslog</code> on a switch to identify an event or error of interest from its log string. In this case, we want to dynamically detect and act upon a link flap for which we need to tap syslog</p>
<p><code>[NSM-1003], 48201, SW/0 | Active | DCE, INFO, LEAF2, Interface TenGigabitEthernet 102/0/48 is link down.</code></p>
<div id="gist41100987" class="gist">
<div class="gist-file" translate="no">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-vdx_raslog_output" class="file my-2">
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-text ">
<div class="js-check-bidi js-blob-code-container blob-code-content">
<template class="js-file-alert-template">
<div data-view-component="true" class="flash flash-warn flash-full d-flex flex-items-center">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<span>
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.
<a href="https://github.co/hiddenchars" target="_blank">Learn more about bidirectional Unicode characters</a>
</span>
<div data-view-component="true" class="flash-action"> <a href="/2016/10/21/auto-remediation-stackstorm-splunk/{{ revealButtonHref }}" data-view-component="true" class="btn-sm btn"> Show hidden characters
</a>
</div>
</div></template>
<template class="js-line-alert-template">
<span aria-label="This line has hidden Unicode characters" data-view-component="true" class="line-alert tooltipped tooltipped-e">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
</span></template>
<table data-hpc class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container" data-tab-size="8" data-paste-markdown-skip data-tagsearch-lang="" data-tagsearch-path="vdx_raslog_output">
<tr>
<td id="file-vdx_raslog_output-L1" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="1"></td>
<td id="file-vdx_raslog_output-LC1" class="blob-code blob-code-inner js-file-line">LEAF2# show logging raslog reverse count 10</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L2" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="2"></td>
<td id="file-vdx_raslog_output-LC2" class="blob-code blob-code-inner js-file-line">NOS: 7.0.1</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L3" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="3"></td>
<td id="file-vdx_raslog_output-LC3" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:31, [NSM-1019], 48207, SW/0 | Active | DCE, INFO, LEAF2, Interface TenGigabitEthernet 102/0/48 is administratively up.</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L4" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="4"></td>
<td id="file-vdx_raslog_output-LC4" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:27, [SEC-1203], 48206, SW/0 | Active, INFO, LEAF2, Login information: Login successful via TELNET/SSH/RSH. IP Addr: 10.254.2.86.</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L5" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="5"></td>
<td id="file-vdx_raslog_output-LC5" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:27, [SEC-1206], 48205, SW/0 | Active, INFO, LEAF2, Login information: User [admin] Last Successful Login Time : Tue Oct 11 12:13:20 2016.</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L6" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="6"></td>
<td id="file-vdx_raslog_output-LC6" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:23, [SEC-3022], 48204, SW/0 | Active, INFO, LEAF2, Event: logout, Status: success, Info: Successful logout by user [admin].</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L7" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="7"></td>
<td id="file-vdx_raslog_output-LC7" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:20, [SEC-1203], 48203, SW/0 | Active, INFO, LEAF2, Login information: Login successful via TELNET/SSH/RSH. IP Addr: 10.254.2.86.</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L8" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="8"></td>
<td id="file-vdx_raslog_output-LC8" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:20, [SEC-1206], 48202, SW/0 | Active, INFO, LEAF2, Login information: User [admin] Last Successful Login Time : Tue Oct 11 12:12:23 2016.</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L9" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="9"></td>
<td id="file-vdx_raslog_output-LC9" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:16, [NSM-1003], 48201, SW/0 | Active | DCE, INFO, LEAF2, Interface TenGigabitEthernet 102/0/48 is link down.</td>
</tr>
<tr>
<td id="file-vdx_raslog_output-L10" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="10"></td>
<td id="file-vdx_raslog_output-LC10" class="blob-code blob-code-inner js-file-line">2016/10/11-12:13:16, [NSM-1020], 48200, SW/0 | Active | DCE, INFO, LEAF2, Interface TenGigabitEthernet 102/0/48 is administratively down.</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="gist-meta">
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc/raw/c019b5950d5be8e249830123a462bae0a8b1ae07/vdx_raslog_output" style="float:right">view raw</a>
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc#file-vdx_raslog_output">
vdx_raslog_output
</a>
hosted with ❤ by <a href="https://github.com/">GitHub</a>
</div>
</div>
</div>
<p>On splunk, create a search criteria to filter out the event. Here, we use the following:</p>
<p><code>sourcetype=syslog NSM-1003 process=raslogd | fields + host, interface, syslog_text</code></p>
<p><img loading="lazy" src="../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-1024x271.png" alt="splunksearchcriteria" width="1024" height="271" class="aligncenter size-large wp-image-6156" srcset="../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-1024x271.png 1024w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-150x40.png 150w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-300x80.png 300w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-768x204.png 768w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-80x21.png 80w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-220x58.png 220w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-250x66.png 250w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-280x74.png 280w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-510x135.png 510w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-750x199.png 750w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-975x258.png 975w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-1190x315.png 1190w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria-960x254.png 960w, ../../../../wp/wp-content/uploads/2016/10/splunksearchcriteria.png 1332w" sizes="(max-width: 1024px) 100vw, 1024px"></p>
<p>Stricter search criteria are recommended for greater filter accuracy. Once your search pattern is set up correctly, save it as a Splunk <em>Alert</em> with alert type as “Real-time” in order to capture the event live.</p>
<p><em>Save As -> Alert | Alert-type: Real-time, Trigger alert when: Per-Result</em></p>
<p><img loading="lazy" src="../../../../wp/wp-content/uploads/2016/10/splunkalerts-1024x364.png" alt="splunkalerts" width="1024" height="364" class="aligncenter size-large wp-image-6154" srcset="../../../../wp/wp-content/uploads/2016/10/splunkalerts-1024x364.png 1024w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-150x53.png 150w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-300x107.png 300w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-768x273.png 768w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-80x28.png 80w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-220x78.png 220w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-250x89.png 250w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-280x100.png 280w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-510x181.png 510w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-750x267.png 750w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-975x347.png 975w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-1190x423.png 1190w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts-844x300.png 844w, ../../../../wp/wp-content/uploads/2016/10/splunkalerts.png 1240w" sizes="(max-width: 1024px) 100vw, 1024px"></p>
<p>Splunk provides multiple options for Trigger Actions – Run a script, Send an Email, <em>Webhook</em>. You can run a script that makes a cURL call to StackStorm webhook URL or, for simplicity, use Splunk’s webhook option. StackStorm’s custom webhook URL is:</p>
<p><code>https://{STACK_STORM_HOSTNAME}/api/v1/webhooks/splunk_link_flap?st2-api-key=XXXXXXXXXXXXXXXXXXXXXXXX</code></p>
<p>For successful action execution, relevant fields or parameters need to be correctly extracted from the event log message and passed via the webhook call to StackStorm. For example, to be able to auto-remediate a ‘link down’ event i.e. do a “shut; not shut” on the switch, the switch’s IP address and an interface name are must. Splunk’s field extraction capability is useful in auto-generating regexp to pull out the field values from the log string. These “field:value” pairs are then passed in the webhook JSON payload. More on field extractions can be found <a href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Knowledge/ExtractfieldsinteractivelywithIFX">here</a>.</p>
<p><img loading="lazy" src="../../../../wp/wp-content/uploads/2016/10/splunkfieldext-1024x379.png" alt="splunkfieldext" width="1024" height="379" class="aligncenter size-large wp-image-6155" srcset="../../../../wp/wp-content/uploads/2016/10/splunkfieldext-1024x379.png 1024w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-150x55.png 150w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-300x111.png 300w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-768x284.png 768w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-80x30.png 80w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-220x81.png 220w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-250x92.png 250w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-280x104.png 280w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-510x189.png 510w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-750x277.png 750w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-975x361.png 975w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-1190x440.png 1190w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext-811x300.png 811w, ../../../../wp/wp-content/uploads/2016/10/splunkfieldext.png 1284w" sizes="(max-width: 1024px) 100vw, 1024px"></p>
<h2>StackStorm/BWC Configuration</h2>
<p>A <a href="https://bwc-docs.brocade.com/webhooks.html#registering-a-custom-webhook">custom webhook</a> rule mapping the webhook trigger to the action workflow is created within StackStorm/BWC.</p>
<p>The custom webhook rule for ‘link flap’ defines the following:</p>
<ul>
<li>Webhook trigger URL: “splunk_link_flap”, complete webhook URL to be configured on Splunk is “https://bwc/api/v1/webhooks/splunk_link_flap”</li>
<li>Action Reference: Name of the workflow to be executed when the webhook is triggered</li>
<li>Action Parameters (originally extracted by Splunk and passed via webhook):</li>
<li>Host: IP Address of the switch/device</li>
<li>Interface: Interface that went down</li>
</ul>
<div id="gist41100987" class="gist">
<div class="gist-file" translate="no">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-rule_list" class="file my-2">
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-text ">
<div class="js-check-bidi js-blob-code-container blob-code-content">
<template class="js-file-alert-template">
<div data-view-component="true" class="flash flash-warn flash-full d-flex flex-items-center">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<span>
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.
<a href="https://github.co/hiddenchars" target="_blank">Learn more about bidirectional Unicode characters</a>
</span>
<div data-view-component="true" class="flash-action"> <a href="/2016/10/21/auto-remediation-stackstorm-splunk/{{ revealButtonHref }}" data-view-component="true" class="btn-sm btn"> Show hidden characters
</a>
</div>
</div></template>
<template class="js-line-alert-template">
<span aria-label="This line has hidden Unicode characters" data-view-component="true" class="line-alert tooltipped tooltipped-e">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
</span></template>
<table data-hpc class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container" data-tab-size="8" data-paste-markdown-skip data-tagsearch-lang="" data-tagsearch-path="rule_list">
<tr>
<td id="file-rule_list-L1" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="1"></td>
<td id="file-rule_list-LC1" class="blob-code blob-code-inner js-file-line">
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a7c5d5c8c4c6c3c2e7c5d0c48a95">[email protected]</a>:~$ st2 rule list --pack=st2-demos</td>
</tr>
<tr>
<td id="file-rule_list-L2" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="2"></td>
<td id="file-rule_list-LC2" class="blob-code blob-code-inner js-file-line">+-----------------------------------------+-----------+--------------------------------+---------+</td>
</tr>
<tr>
<td id="file-rule_list-L3" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="3"></td>
<td id="file-rule_list-LC3" class="blob-code blob-code-inner js-file-line">| ref | pack | description | enabled |</td>
</tr>
<tr>
<td id="file-rule_list-L4" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="4"></td>
<td id="file-rule_list-LC4" class="blob-code blob-code-inner js-file-line">+-----------------------------------------+-----------+--------------------------------+---------+</td>
</tr>
<tr>
<td id="file-rule_list-L5" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="5"></td>
<td id="file-rule_list-LC5" class="blob-code blob-code-inner js-file-line">| st2-demos.splunk_bgp_down_webhook_rule | st2-demos | Splunk bgp down webhook rule | True |</td>
</tr>
<tr>
<td id="file-rule_list-L6" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="6"></td>
<td id="file-rule_list-LC6" class="blob-code blob-code-inner js-file-line">| st2-demos.splunk_link_flap_webhook_rule | st2-demos | Splunk link flap webhook rule | True |</td>
</tr>
<tr>
<td id="file-rule_list-L7" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="7"></td>
<td id="file-rule_list-LC7" class="blob-code blob-code-inner js-file-line">| st2-demos.splunk_webhook_rule | st2-demos | splunk to chatops webhook Rule | True |</td>
</tr>
<tr>
<td id="file-rule_list-L8" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="8"></td>
<td id="file-rule_list-LC8" class="blob-code blob-code-inner js-file-line">+-----------------------------------------+-----------+--------------------------------+---------+</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="gist-meta">
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc/raw/c019b5950d5be8e249830123a462bae0a8b1ae07/rule_list" style="float:right">view raw</a>
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc#file-rule_list">
rule_list
</a>
hosted with ❤ by <a href="https://github.com/">GitHub</a>
</div>
</div>
</div>
<h3>Rule Definition:</h3>
<p>splunk_link_flap.yaml<br>
</p>
<div id="gist41100987" class="gist">
<div class="gist-file" translate="no">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-splunk_link_flap-yaml" class="file my-2">
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-yaml ">
<div class="js-check-bidi js-blob-code-container blob-code-content">
<template class="js-file-alert-template">
<div data-view-component="true" class="flash flash-warn flash-full d-flex flex-items-center">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<span>
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.
<a href="https://github.co/hiddenchars" target="_blank">Learn more about bidirectional Unicode characters</a>
</span>
<div data-view-component="true" class="flash-action"> <a href="/2016/10/21/auto-remediation-stackstorm-splunk/{{ revealButtonHref }}" data-view-component="true" class="btn-sm btn"> Show hidden characters
</a>
</div>
</div></template>
<template class="js-line-alert-template">
<span aria-label="This line has hidden Unicode characters" data-view-component="true" class="line-alert tooltipped tooltipped-e">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
</span></template>
<table data-hpc class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container" data-tab-size="8" data-paste-markdown-skip data-tagsearch-lang="YAML" data-tagsearch-path="splunk_link_flap.yaml">
<tr>
<td id="file-splunk_link_flap-yaml-L1" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="1"></td>
<td id="file-splunk_link_flap-yaml-LC1" class="blob-code blob-code-inner js-file-line">---</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L2" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="2"></td>
<td id="file-splunk_link_flap-yaml-LC2" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>splunk_link_flap_webhook_rule<span class="pl-pds">"</span></span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L3" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="3"></td>
<td id="file-splunk_link_flap-yaml-LC3" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">enabled</span>: <span class="pl-c1">true</span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L4" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="4"></td>
<td id="file-splunk_link_flap-yaml-LC4" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">description</span>: <span class="pl-s"><span class="pl-pds">"</span>Splunk link flap webhook rule<span class="pl-pds">"</span></span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L5" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="5"></td>
<td id="file-splunk_link_flap-yaml-LC5" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L6" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="6"></td>
<td id="file-splunk_link_flap-yaml-LC6" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">trigger</span>:</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L7" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="7"></td>
<td id="file-splunk_link_flap-yaml-LC7" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">type</span>: <span class="pl-s"><span class="pl-pds">"</span>core.st2.webhook<span class="pl-pds">"</span></span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L8" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="8"></td>
<td id="file-splunk_link_flap-yaml-LC8" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">parameters</span>:</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L9" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="9"></td>
<td id="file-splunk_link_flap-yaml-LC9" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">url</span>: <span class="pl-s"><span class="pl-pds">"</span>splunk_link_flap<span class="pl-pds">"</span></span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L10" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="10"></td>
<td id="file-splunk_link_flap-yaml-LC10" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L11" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="11"></td>
<td id="file-splunk_link_flap-yaml-LC11" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">criteria</span>: <span class="pl-s">{}</span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L12" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="12"></td>
<td id="file-splunk_link_flap-yaml-LC12" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L13" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="13"></td>
<td id="file-splunk_link_flap-yaml-LC13" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">action</span>:</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L14" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="14"></td>
<td id="file-splunk_link_flap-yaml-LC14" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">ref</span>: <span class="pl-s">st2-demos.link_flap_remediation</span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L15" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="15"></td>
<td id="file-splunk_link_flap-yaml-LC15" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">parameters</span>:</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L16" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="16"></td>
<td id="file-splunk_link_flap-yaml-LC16" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">host</span>: <span class="pl-s"><span class="pl-pds">"</span>{{trigger.body.result.host}}<span class="pl-pds">"</span></span>
</td>
</tr>
<tr>
<td id="file-splunk_link_flap-yaml-L17" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="17"></td>
<td id="file-splunk_link_flap-yaml-LC17" class="blob-code blob-code-inner js-file-line"> <span class="pl-ent">interface</span>: <span class="pl-s"><span class="pl-pds">"</span>{{trigger.body.result.interface}}<span class="pl-pds">"</span></span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="gist-meta">
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc/raw/c019b5950d5be8e249830123a462bae0a8b1ae07/splunk_link_flap.yaml" style="float:right">view raw</a>
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc#file-splunk_link_flap-yaml">
splunk_link_flap.yaml
</a>
hosted with ❤ by <a href="https://github.com/">GitHub</a>
</div>
</div>
</div>
<h3>Rule Details:</h3>
<div id="gist41100987" class="gist">
<div class="gist-file" translate="no">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-rule_get" class="file my-2">
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-text ">
<div class="js-check-bidi js-blob-code-container blob-code-content">
<template class="js-file-alert-template">
<div data-view-component="true" class="flash flash-warn flash-full d-flex flex-items-center">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<span>
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.
<a href="https://github.co/hiddenchars" target="_blank">Learn more about bidirectional Unicode characters</a>
</span>
<div data-view-component="true" class="flash-action"> <a href="/2016/10/21/auto-remediation-stackstorm-splunk/{{ revealButtonHref }}" data-view-component="true" class="btn-sm btn"> Show hidden characters
</a>
</div>
</div></template>
<template class="js-line-alert-template">
<span aria-label="This line has hidden Unicode characters" data-view-component="true" class="line-alert tooltipped tooltipped-e">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
</span></template>
<table data-hpc class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container" data-tab-size="8" data-paste-markdown-skip data-tagsearch-lang="" data-tagsearch-path="rule_get">
<tr>
<td id="file-rule_get-L1" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="1"></td>
<td id="file-rule_get-LC1" class="blob-code blob-code-inner js-file-line">
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="89ebfbe6eae8edecc9ebfeeaa4bb">[email protected]</a>:~$ st2 rule get st2-demos.splunk_link_flap_webhook_rule</td>
</tr>
<tr>
<td id="file-rule_get-L2" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="2"></td>
<td id="file-rule_get-LC2" class="blob-code blob-code-inner js-file-line">+-------------+------------------------------------------------------------+</td>
</tr>
<tr>
<td id="file-rule_get-L3" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="3"></td>
<td id="file-rule_get-LC3" class="blob-code blob-code-inner js-file-line">| Property | Value |</td>
</tr>
<tr>
<td id="file-rule_get-L4" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="4"></td>
<td id="file-rule_get-LC4" class="blob-code blob-code-inner js-file-line">+-------------+------------------------------------------------------------+</td>
</tr>
<tr>
<td id="file-rule_get-L5" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="5"></td>
<td id="file-rule_get-LC5" class="blob-code blob-code-inner js-file-line">| id | 57f66fcb0048394cfa1d955a |</td>
</tr>
<tr>
<td id="file-rule_get-L6" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="6"></td>
<td id="file-rule_get-LC6" class="blob-code blob-code-inner js-file-line">| uid | rule:st2-demos:splunk_link_flap_webhook_rule |</td>
</tr>
<tr>
<td id="file-rule_get-L7" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="7"></td>
<td id="file-rule_get-LC7" class="blob-code blob-code-inner js-file-line">| ref | st2-demos.splunk_link_flap_webhook_rule |</td>
</tr>
<tr>
<td id="file-rule_get-L8" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="8"></td>
<td id="file-rule_get-LC8" class="blob-code blob-code-inner js-file-line">| pack | st2-demos |</td>
</tr>
<tr>
<td id="file-rule_get-L9" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="9"></td>
<td id="file-rule_get-LC9" class="blob-code blob-code-inner js-file-line">| name | splunk_link_flap_webhook_rule |</td>
</tr>
<tr>
<td id="file-rule_get-L10" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="10"></td>
<td id="file-rule_get-LC10" class="blob-code blob-code-inner js-file-line">| description | Splunk link flap webhook rule |</td>
</tr>
<tr>
<td id="file-rule_get-L11" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="11"></td>
<td id="file-rule_get-LC11" class="blob-code blob-code-inner js-file-line">| enabled | True |</td>
</tr>
<tr>
<td id="file-rule_get-L12" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="12"></td>
<td id="file-rule_get-LC12" class="blob-code blob-code-inner js-file-line">| action | { |</td>
</tr>
<tr>
<td id="file-rule_get-L13" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="13"></td>
<td id="file-rule_get-LC13" class="blob-code blob-code-inner js-file-line">| | "ref": "st2-demos.link_flap_remediation", |</td>
</tr>
<tr>
<td id="file-rule_get-L14" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="14"></td>
<td id="file-rule_get-LC14" class="blob-code blob-code-inner js-file-line">| | "parameters": { |</td>
</tr>
<tr>
<td id="file-rule_get-L15" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="15"></td>
<td id="file-rule_get-LC15" class="blob-code blob-code-inner js-file-line">| | "interface": "{{trigger.body.result.interface}}", |</td>
</tr>
<tr>
<td id="file-rule_get-L16" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="16"></td>
<td id="file-rule_get-LC16" class="blob-code blob-code-inner js-file-line">| | "host": "{{trigger.body.result.host}}" |</td>
</tr>
<tr>
<td id="file-rule_get-L17" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="17"></td>
<td id="file-rule_get-LC17" class="blob-code blob-code-inner js-file-line">| | } |</td>
</tr>
<tr>
<td id="file-rule_get-L18" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="18"></td>
<td id="file-rule_get-LC18" class="blob-code blob-code-inner js-file-line">| | } |</td>
</tr>
<tr>
<td id="file-rule_get-L19" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="19"></td>
<td id="file-rule_get-LC19" class="blob-code blob-code-inner js-file-line">| criteria | |</td>
</tr>
<tr>
<td id="file-rule_get-L20" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="20"></td>
<td id="file-rule_get-LC20" class="blob-code blob-code-inner js-file-line">| tags | |</td>
</tr>
<tr>
<td id="file-rule_get-L21" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="21"></td>
<td id="file-rule_get-LC21" class="blob-code blob-code-inner js-file-line">| trigger | { |</td>
</tr>
<tr>
<td id="file-rule_get-L22" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="22"></td>
<td id="file-rule_get-LC22" class="blob-code blob-code-inner js-file-line">| | "type": "core.st2.webhook", |</td>
</tr>
<tr>
<td id="file-rule_get-L23" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="23"></td>
<td id="file-rule_get-LC23" class="blob-code blob-code-inner js-file-line">| | "ref": "core.70b0b76b-5edf-47d8-bb03-19528c4fe1d2", |</td>
</tr>
<tr>
<td id="file-rule_get-L24" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="24"></td>
<td id="file-rule_get-LC24" class="blob-code blob-code-inner js-file-line">| | "parameters": { |</td>
</tr>
<tr>
<td id="file-rule_get-L25" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="25"></td>
<td id="file-rule_get-LC25" class="blob-code blob-code-inner js-file-line">| | "url": "splunk_link_flap" |</td>
</tr>
<tr>
<td id="file-rule_get-L26" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="26"></td>
<td id="file-rule_get-LC26" class="blob-code blob-code-inner js-file-line">| | } |</td>
</tr>
<tr>
<td id="file-rule_get-L27" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="27"></td>
<td id="file-rule_get-LC27" class="blob-code blob-code-inner js-file-line">| | } |</td>
</tr>
<tr>
<td id="file-rule_get-L28" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="28"></td>
<td id="file-rule_get-LC28" class="blob-code blob-code-inner js-file-line">| type | { |</td>
</tr>
<tr>
<td id="file-rule_get-L29" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="29"></td>
<td id="file-rule_get-LC29" class="blob-code blob-code-inner js-file-line">| | "ref": "standard", |</td>
</tr>
<tr>
<td id="file-rule_get-L30" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="30"></td>
<td id="file-rule_get-LC30" class="blob-code blob-code-inner js-file-line">| | "parameters": {} |</td>
</tr>
<tr>
<td id="file-rule_get-L31" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="31"></td>
<td id="file-rule_get-LC31" class="blob-code blob-code-inner js-file-line">| | } |</td>
</tr>
<tr>
<td id="file-rule_get-L32" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="32"></td>
<td id="file-rule_get-LC32" class="blob-code blob-code-inner js-file-line">+-------------+------------------------------------------------------------+</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="gist-meta">
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc/raw/c019b5950d5be8e249830123a462bae0a8b1ae07/rule_get" style="float:right">view raw</a>
<a href="https://gist.github.com/sidkrishna/05ad300b6454c9f920add05c93e6bfcc#file-rule_get">
rule_get
</a>
hosted with ❤ by <a href="https://github.com/">GitHub</a>
</div>
</div>
</div>
<p>When the ‘link down’ syslog is detected by Splunk, and the webhook to StackStorm called, the trigger instance payload contains the values for the various Splunk fields and parameters. These include the host IP address and the interface name (as per configured field extractions) along with other standard ones such as search link, search ID, raw log message etc. See this example below:</p>
<div id="gist41100987" class="gist">
<div class="gist-file" translate="no">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-trigger_instance_get" class="file my-2">
<div itemprop="text" class="Box-body p-0 blob-wrapper data type-text ">
<div class="js-check-bidi js-blob-code-container blob-code-content">
<template class="js-file-alert-template">
<div data-view-component="true" class="flash flash-warn flash-full d-flex flex-items-center">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
<span>
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.
<a href="https://github.co/hiddenchars" target="_blank">Learn more about bidirectional Unicode characters</a>
</span>
<div data-view-component="true" class="flash-action"> <a href="/2016/10/21/auto-remediation-stackstorm-splunk/{{ revealButtonHref }}" data-view-component="true" class="btn-sm btn"> Show hidden characters
</a>
</div>
</div></template>
<template class="js-line-alert-template">
<span aria-label="This line has hidden Unicode characters" data-view-component="true" class="line-alert tooltipped tooltipped-e">
<svg aria-hidden="true" height="16" viewbox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path>
</svg>
</span></template>
<table data-hpc class="highlight tab-size js-file-line-container js-code-nav-container js-tagsearch-file js-search-container" data-tab-size="8" data-paste-markdown-skip data-tagsearch-lang="" data-tagsearch-path="trigger_instance_get">
<tr>
<td id="file-trigger_instance_get-L1" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="1"></td>
<td id="file-trigger_instance_get-LC1" class="blob-code blob-code-inner js-file-line">
<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1b796974787a7f7e5b796c783629">[email protected]</a>:~$ st2 trigger-instance get 57fcd76500483912504332d3</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L2" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="2"></td>
<td id="file-trigger_instance_get-LC2" class="blob-code blob-code-inner js-file-line">+-----------------+--------------------------------------------------------------+</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L3" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="3"></td>
<td id="file-trigger_instance_get-LC3" class="blob-code blob-code-inner js-file-line">| Property | Value |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L4" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="4"></td>
<td id="file-trigger_instance_get-LC4" class="blob-code blob-code-inner js-file-line">+-----------------+--------------------------------------------------------------+</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L5" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="5"></td>
<td id="file-trigger_instance_get-LC5" class="blob-code blob-code-inner js-file-line">| id | 57fcd76500483912504332d3 |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L6" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="6"></td>
<td id="file-trigger_instance_get-LC6" class="blob-code blob-code-inner js-file-line">| trigger | core.70b0b76b-5edf-47d8-bb03-19528c4fe1d2 |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L7" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="7"></td>
<td id="file-trigger_instance_get-LC7" class="blob-code blob-code-inner js-file-line">| occurrence_time | 2016-10-11T12:13:25.078000Z |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L8" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="8"></td>
<td id="file-trigger_instance_get-LC8" class="blob-code blob-code-inner js-file-line">| payload | { |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L9" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="9"></td>
<td id="file-trigger_instance_get-LC9" class="blob-code blob-code-inner js-file-line">| | "body": { |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L10" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="10"></td>
<td id="file-trigger_instance_get-LC10" class="blob-code blob-code-inner js-file-line">| | "results_link": "http://Splunk:8000/app/search/searc |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L11" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="11"></td>
<td id="file-trigger_instance_get-LC11" class="blob-code blob-code-inner js-file-line">| | h?q=%7Cloadjob%20rt_scheduler__admin__search__testt_at_14757 |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L12" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="12"></td>
<td id="file-trigger_instance_get-LC12" class="blob-code blob-code-inner js-file-line">| | 23889_25.32%20%7C%20head%201%20%7C%20tail%201&earliest=0&lat |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L13" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="13"></td>
<td id="file-trigger_instance_get-LC13" class="blob-code blob-code-inner js-file-line">| | est=now", |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L14" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="14"></td>
<td id="file-trigger_instance_get-LC14" class="blob-code blob-code-inner js-file-line">| | "app": "search", |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L15" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="15"></td>
<td id="file-trigger_instance_get-LC15" class="blob-code blob-code-inner js-file-line">| | "search_name": "testt", |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L16" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="16"></td>
<td id="file-trigger_instance_get-LC16" class="blob-code blob-code-inner js-file-line">| | "result": { |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L17" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="17"></td>
<td id="file-trigger_instance_get-LC17" class="blob-code blob-code-inner js-file-line">| | "_si": "", |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L18" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="18"></td>
<td id="file-trigger_instance_get-LC18" class="blob-code blob-code-inner js-file-line">| | "_confstr": |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L19" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="19"></td>
<td id="file-trigger_instance_get-LC19" class="blob-code blob-code-inner js-file-line">| | "source::udp:514|host::10.254.4.118|syslog", |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L20" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="20"></td>
<td id="file-trigger_instance_get-LC20" class="blob-code blob-code-inner js-file-line">| | "_raw": "Oct 11 05:13:24 10.254.4.118 Oct 11 |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L21" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="21"></td>
<td id="file-trigger_instance_get-LC21" class="blob-code blob-code-inner js-file-line">| | 12:13:16 LEAF2 raslogd: [<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c3afaca483f2f6fbfb">[email protected]</a> |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L22" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="22"></td>
<td id="file-trigger_instance_get-LC22" class="blob-code blob-code-inner js-file-line">| | value="RASLOG"][<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4135282c243235202c310170747979">[email protected]</a> |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L23" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="23"></td>
<td id="file-trigger_instance_get-LC23" class="blob-code blob-code-inner js-file-line">| | value="2016-10-11T12:13:16.980022"][<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ea87998d838eaadbdfd2d2">[email protected]</a> |</td>
</tr>
<tr>
<td id="file-trigger_instance_get-L24" class="blob-num js-line-number js-code-nav-line-number js-blob-rnum" data-line-number="24"></td>
<td id="file-trigger_instance_get-LC24" class="blob-code blob-code-inner js-file-line">| | value="NSM-1003"][<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0774627669726a4736323f3f">[email protected]</a> value="48201"][<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="62031616102253575a5a">[email protected]</a> |</td>
</tr>
<tr>