Skip to content

Commit 49fc24f

Browse files
Updates to inputs.conf and regenGUID.ps1
-Inputs file modified to account for change in how powershell stanza intervals are configured. -regenGUID.ps1 script altered to include proper path to instance.cfg.
1 parent 78f0461 commit 49fc24f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

bin/regenGUID.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Configure file paths for the system
2-
$INSTANCE = "$SPLUNKHOME\etc\instance.cfg"
3-
$INSTANCE_CHECK = {$(Test-Path "$SPLUNKHOME\etc\instance.cfg.*")}
2+
$INSTANCE_FILE = "$SPLUNKHOME\etc\instance.cfg"
3+
$INSTANCE_CHECK = {$(Test-Path "$INSTANCE_FILE.*")}
44
$RESTART_CHECK = "$SPLUNKHOME\etc\restartguid.txt"
55

66
### Filter to attach timestamps where necessary
@@ -12,7 +12,7 @@ if ($INSTANCE_CHECK -eq "True") {
1212
} else {
1313
### Rename "instance.cfg" and set the restart flag in the checkpoint file
1414
Write-output "Backing up instance.cfg." | timestamp
15-
Copy-Item -Path "$INSTANCE" -Destination "$INSTANCE\instance_$(Get-Date -Format 'MMddyyyy').bak"
16-
Remove-Item -Path "$INSTANCE"
15+
Copy-Item -Path "$INSTANCE_FILE" -Destination "$INSTANCE_FILE.$(Get-Date -Format 'MMddyyyy').bak"
16+
Remove-Item -Path "$INSTANCE_FILE"
1717
Out-File -FilePath "$RESTART_CHECK"
1818
}

default/inputs.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source = restart_output
1010
disabled = 1
1111
index = _internal
1212
sourcetype = restart:output
13-
interval = */2 * * * *
13+
schedule = */2 * * * *
1414
source = restart_output
1515
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\restart.ps1"
1616

@@ -26,7 +26,7 @@ source = regen_guid_output
2626
disabled = 1
2727
index = _internal
2828
sourcetype = regen_guid:output
29-
interval = -1
29+
schedule = -1
3030
source = regen_guid_output
3131
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\regenGUID.ps1"
3232

@@ -42,7 +42,7 @@ source = host_rename_output
4242
disabled = 1
4343
index = _internal
4444
sourcetype = host_rename:output
45-
interval = -1
45+
schedule = -1
4646
source = host_rename_output
4747
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\hostCorrect.ps1"
4848

@@ -58,7 +58,7 @@ source = ds_remove_output
5858
disabled = 1
5959
index = _internal
6060
sourcetype = ds_remove:output
61-
interval = -1
61+
schedule = -1
6262
source = ds_remove_output
6363
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\dsRemove.ps1"
6464

@@ -75,7 +75,7 @@ source = datetime_correct_output
7575
disabled = 1
7676
index = _internal
7777
sourcetype = datetime_correct:output
78-
interval = -1
78+
schedule = -1
7979
source = datetime_correct_output
8080
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\dateTimeCorrect.ps1"
8181

@@ -91,5 +91,5 @@ source = pw_change_output
9191
disabled = 1
9292
index = _internal
9393
sourcetype = pw_change:output
94-
interval = -1
94+
schedule = -1
9595
source = pw_change_output

0 commit comments

Comments
 (0)