Skip to content

Commit 7f64cc2

Browse files
Upgrade to version 2.0.0 (#5)
Current versions of Splunk do not require this action and it the scripted input included in this version of the Splunk Forwarder Repair Kit would replace the datetime.xml which would cause integrity issues with the Splunk installations. The scripts to perform this action have been retired and removed from the app.
1 parent 71da736 commit 7f64cc2

File tree

9 files changed

+16
-294
lines changed

9 files changed

+16
-294
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,19 @@ This app contains scripts for Windows and Linux forwarders that will move the ex
138138
Windows - `regenGUID.ps1`\
139139
\*Nix - `regenGUID.sh`
140140

141-
###### Install updated datetime.xml file
142-
A notice was sent out in November of 2019 that stated there was an issue with the datetime.xml that would affect data ingested due to a misconfigured datetime.xml. The bug and fix can be read about here: https://docs.splunk.com/Documentation/Splunk/latest/ReleaseNotes/FixDatetimexml2020
141+
###### Install updated datetime.xml file (REMOVED)
142+
The scripts that performed this action have been retired. This method is also not the safest method to update this file and should not be used. It is preferable to simply upgrade Splunk version (Splunk Enterprise or Splunk Universal Forwarder) that already has this fix in place.
143143

144-
This app contains scripts for Windows and Linux forwarders that will back up the existing "datetime.xml" to replace with the corrected version contained within the app.
144+
https://docs.splunk.com/Documentation/Splunk/latest/ReleaseNotes/FixDatetimexml2020#Upgrade_Splunk_platform_instances_to_a_version_with_an_updated_version_of_datetime.xml
145145

146-
**NOTE: This should only be used on Universal Forwarders. Please see the above documentation link for instructions for other Splunk instances.**
146+
~~A notice was sent out in November of 2019 that stated there was an issue with the datetime.xml that would affect data ingested due to a misconfigured datetime.xml. The bug and fix can be read about here: https://docs.splunk.com/Documentation/Splunk/latest/ReleaseNotes/FixDatetimexml2020~~
147147

148-
Windows - `dateTimeCorrect.ps1`\
149-
\*Nix - `dateTimeCorrect.sh`
148+
~~This app contains scripts for Windows and Linux forwarders that will back up the existing "datetime.xml" to replace with the corrected version contained within the app.~~
149+
150+
~~**NOTE: This should only be used on Universal Forwarders. Please see the above documentation link for instructions for other Splunk instances.**~~
151+
152+
~~Windows - `dateTimeCorrect.ps1`\
153+
\*Nix - `dateTimeCorrect.sh`~~
150154

151155
###### Update default 'changeme' password on Splunk Forwarders (primary installations before 7.1.0)
152156
Forwarders deployed before version 7.1.0 didn't require the admin password be changed upon installation. Starting at 7.1.0, the forwarders required either a user-seed file or manual input of the password during first-time run. While the REST API of the forwarder is not configured to allow POST requests until the password is changed on versions prior to 7.1.0, changing the password is still recommended.

bin/dateTimeCorrect.ps1

Lines changed: 0 additions & 17 deletions
This file was deleted.

bin/dateTimeCorrect.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

bin/restart.ps1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ $inputPath = "$SPLUNKHOME\etc\restartinput.txt"
33
$serverPath = "$SPLUNKHOME\etc\restartserver.txt"
44
$dsPath = "$SPLUNKHOME\etc\restartds.txt"
55
$guidPath = "$SPLUNKHOME\etc\restartguid.txt"
6-
$dateTimePath = "$SPLUNKHOME\etc\restartdatetime.txt"
76
$restartInput = $(Test-Path "$SPLUNKHOME\etc\restartinput.txt" -PathType Leaf)
87
$restartServer = $(Test-Path "$SPLUNKHOME\etc\restartserver.txt" -PathType Leaf)
98
$restartDS = $(Test-Path "$SPLUNKHOME\etc\restartds.txt" -PathType Leaf)
109
$restartGUID = $(Test-Path "$SPLUNKHOME\etc\restartguid.txt" -PathType Leaf)
11-
$restartDateTime = $(Test-Path "$SPLUNKHOME\etc\restartdatetime.txt" -PathType Leaf)
1210

1311
### Filter to attach timestamps where necessary
1412
filter timestamp {"$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss.fff zzz') ${env:COMPUTERNAME}: $_"}
1513

16-
if ($restartInput -eq "True" -OR $restartServer -eq "True" -OR $restartDS -eq "True" -OR $restartGUID -eq "True" -OR $restartDateTime -eq "True") {
14+
if ($restartInput -eq "True" -OR $restartServer -eq "True" -OR $restartDS -eq "True" -OR $restartGUID -eq "True") {
1715
Write-output "One or more settings has been changed." | timestamp
1816
Write-output "Restarting forwarder." | timestamp
1917
if ($restartInput -eq "True") {
@@ -28,9 +26,6 @@ if ($restartInput -eq "True" -OR $restartServer -eq "True" -OR $restartDS -eq "T
2826
if ($restartGUID -eq "True") {
2927
Remove-Item -path "$guidPath"
3028
}
31-
if ($restartDateTime -eq "True") {
32-
Remove-Item -path "$dateTimePath"
33-
}
3429
Remove-Item -path "$PSScriptRoot\DeleteMeToRestart"
3530
} else {
3631
Write-output "No settings have been changed." | timestamp

bin/restart.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ RESTARTINPUT="$SPLUNK_HOME/etc/restartinput.txt"
77
RESTARTSERVER="$SPLUNK_HOME/etc/restartserver.txt"
88
RESTARTDS="$SPLUNK_HOME/etc/restartds.txt"
99
RESTARTGUID="$SPLUNK_HOME/etc/restartguid.txt"
10-
RESTARTDATETIME="$SPLUNK_HOME/etc/restartdatetime.txt"
1110

1211
### If any files exist, restart forwarder
13-
if [ -f "$RESTARTINPUT" ] || [ -f "$RESTARTSERVER" ] || [ -f "$RESTARTDS" ] || [ -f "$RESTARTGUID" ] || [ -f "$RESTARTDATETIME" ]; then
12+
if [ -f "$RESTARTINPUT" ] || [ -f "$RESTARTSERVER" ] || [ -f "$RESTARTDS" ] || [ -f "$RESTARTGUID" ]; then
1413
echo "$(date -R) ${HOSTNAME}: One or more settings has been changed."
1514
echo "$(date -R) ${HOSTNAME}: Restarting forwarder."
1615
if [ -f "$RESTARTINPUT" ]; then
@@ -25,9 +24,6 @@ if [ -f "$RESTARTINPUT" ] || [ -f "$RESTARTSERVER" ] || [ -f "$RESTARTDS" ] || [
2524
if [ -f "$RESTARTGUID" ]; then
2625
rm -f "$RESTARTGUID"
2726
fi
28-
if [ -f "$RESTARTDATETIME" ]; then
29-
rm -f "$RESTARTDATETIME"
30-
fi
3127
rm -f "${APP_PATH}/bin/DeleteMeToRestart"
3228
else
3329
echo "$(date -R) ${HOSTNAME}: No settings have been changed."

datetime.xml

Lines changed: 0 additions & 225 deletions
This file was deleted.

default/app.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ check_for_updates = false
77
[ui]
88
is_visible = false
99
is_manageable = false
10+
11+
[launcher]
12+
version = 2.0.0

default/inputs.conf

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,7 @@ sourcetype = ds_remove:output
6161
source = ds_remove_output
6262
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\dsRemove.ps1"
6363
deploymentServerUri =
64-
deploymentClientApp =
65-
66-
### Scripts used to correct issues with datetime.xml
67-
### https://docs.splunk.com/Documentation/Splunk/latest/ReleaseNotes/FixDatetimexml2020
68-
[script://./bin/dateTimeCorrect.sh]
69-
disabled = 1
70-
index = _internal
71-
sourcetype = datetime_correct:output
72-
interval = -1
73-
source = datetime_correct_output
74-
75-
[powershell://dateTimeCorrect]
76-
disabled = 1
77-
index = _internal
78-
sourcetype = datetime_correct:output
79-
source = datetime_correct_output
80-
script = . "$SplunkHome\etc\apps\SplunkForwarderRepairKit\bin\dateTimeCorrect.ps1"
64+
deploymentClientApp =
8165

8266
### Admin password change scripts
8367
[script://./bin/pwchange.sh]

default/limits.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)