Skip to content

Commit

Permalink
Try setting minFreeMb env var for the Splunk container.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnturton committed Aug 13, 2024
1 parent e6f34a8 commit 1c88c71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
- name: Remove swap space
run : |
sudo sh -c "
free -h
swapoff /tmp/swapfile
rm /tmp/swapfile
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public class SplunkTestSuite extends ClusterTest {
.withExposedPorts(8089, 8089)
.withEnv("SPLUNK_START_ARGS", "--accept-license")
.withEnv("SPLUNK_PASSWORD", SPLUNK_PASS)
.withEnv("SPLUNKD_SSL_ENABLE", "false");
.withEnv("SPLUNKD_SSL_ENABLE", "false")
.withEnv("SPLUNK_MINFREEMB", "1000");

@BeforeClass
public static void initSplunk() throws Exception {
Expand All @@ -88,17 +89,6 @@ public static void initSplunk() throws Exception {
startCluster(builder);

splunk.start();
splunk.execInContainer("if ! sudo grep -q 'minFileSize' /opt/splunk/etc/system/local/server.conf; then " +
"sudo chmod a+w /opt/splunk/etc/system/local/server.conf; " +
"sudo echo \"# disk usage processor settings\" >> /opt/splunk/etc/system/local/server.conf; " +
"sudo echo \"[diskUsage]\" >> /opt/splunk/etc/system/local/server.conf; " +
"sudo echo \"minFreeSpace = 2000\" >> /opt/splunk/etc/system/local/server.conf; " +
"sudo echo \"pollingFrequency = 100000\" >> /opt/splunk/etc/system/local/server.conf; " +
"sudo echo \"pollingTimerFrequency = 10\" >> /opt/splunk/etc/system/local/server.conf; " +
"sudo chmod 600 /opt/splunk/etc/system/local/server.conf; " +
"sudo /opt/splunk/bin/splunk restart; " +
"fi");

String hostname = splunk.getHost();
Integer port = splunk.getFirstMappedPort();
StoragePluginRegistry pluginRegistry = cluster.drillbit().getContext().getStorage();
Expand Down

0 comments on commit 1c88c71

Please sign in to comment.