File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
contentctl/actions/detection_testing/infrastructures Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -172,13 +172,11 @@ def configure_hec(self):
172
172
# Retrieve all available indexes on the splunk instance
173
173
all_indexes = self .get_all_indexes ()
174
174
175
- indexes = f"{ self .sync_obj .replay_index } ," + "," .join (all_indexes )
176
-
177
175
res = self .get_conn ().inputs .create (
178
176
name = "DETECTION_TESTING_HEC" ,
179
177
kind = "http" ,
180
178
index = self .sync_obj .replay_index ,
181
- indexes = indexes , # This allows the HEC to write to all indexes
179
+ indexes = "," . join ( all_indexes ) , # This allows the HEC to write to all indexes
182
180
useACK = True ,
183
181
)
184
182
self .hec_token = str (res .token )
@@ -187,12 +185,13 @@ def configure_hec(self):
187
185
except Exception as e :
188
186
raise (Exception (f"Failure creating HEC Endpoint: { str (e )} " ))
189
187
190
- def get_all_indexes (self ):
188
+ def get_all_indexes (self ) -> list [ str ] :
191
189
"""
192
190
Retrieve a list of all indexes in the Splunk instance
193
191
"""
194
192
try :
195
- indexes = []
193
+ # Always include the special, default replay index here
194
+ indexes = [self .sync_obj .replay_index ]
196
195
res = self .get_conn ().indexes
197
196
for index in res .list ():
198
197
indexes .append (index .name )
You can’t perform that action at this time.
0 commit comments