You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-23Lines changed: 10 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,6 @@ You'll need `docker` and `docker-compose` to get up and running using this metho
60
60
```
61
61
make up SPLUNK_VERSION=8.0
62
62
make wait_up
63
-
make splunkrc_default
64
63
make test
65
64
make down
66
65
```
@@ -91,13 +90,13 @@ service = client.connect(host=<host_url>, token=<session_key>, autologin=True)
91
90
```
92
91
93
92
###
94
-
#### Create a .splunkrc convenience file
93
+
#### Update a .env file
95
94
96
-
To connect to Splunk Enterprise, many of the SDK examples and unit tests take command-line arguments that specify values for the host, port, and login credentials for Splunk Enterprise. For convenience during development, you can store these arguments as key-value pairs in a text file named **.splunkrc**. Then, the SDK examples and unit tests use the values from the **.splunkrc** file when you don't specify them.
95
+
To connect to Splunk Enterprise, many of the SDK examples and unit tests take command-line arguments that specify values for the host, port, and login credentials for Splunk Enterprise. For convenience during development, you can store these arguments as key-value pairs in a **.env** file. Then, the SDK examples and unit tests use the values from the **.env** file when you don't specify them.
97
96
98
-
>**Note**: Storing login credentials in the **.splunkrc** file is only for convenience during development. This file isn't part of the Splunk platform and shouldn't be used for storing user credentials for production. And, if you're at all concerned about the security of your credentials, enter them at the command line rather than saving them in this file.
97
+
>**Note**: Storing login credentials in the **.env** file is only for convenience during development. This file isn't part of the Splunk platform and shouldn't be used for storing user credentials for production. And, if you're at all concerned about the security of your credentials, enter them at the command line rather than saving them in this file.
99
98
100
-
To use this convenience file, create a text file with the following format:
99
+
here is an example of .env file:
101
100
102
101
# Splunk Enterprise host (default: localhost)
103
102
host=localhost
@@ -106,27 +105,15 @@ To use this convenience file, create a text file with the following format:
106
105
# Splunk Enterprise username
107
106
username=admin
108
107
# Splunk Enterprise password
109
-
password=changeme
108
+
password=changed!
110
109
# Access scheme (default: https)
111
110
scheme=https
112
111
# Your version of Splunk Enterprise
113
112
version=8.0
114
-
115
-
Save the file as **.splunkrc** in the current user's home directory.
116
-
117
-
* For example on OS X, save the file as:
118
-
119
-
~/.splunkrc
120
-
121
-
* On Windows, save the file as:
122
-
123
-
C:\Users\currentusername\.splunkrc
124
-
125
-
You might get errors in Windows when you try to name the file because ".splunkrc" appears to be a nameless file with an extension. You can use the command line to create this file by going to the **C:\Users\\<currentusername>** directory and entering the following command:
126
-
127
-
Notepad.exe .splunkrc
128
-
129
-
Click **Yes**, then continue creating the file.
113
+
# Bearer token for authentication
114
+
#bearerToken=<Bearer-token>
115
+
# Session key for authentication
116
+
#sessionKey=<Session-Key>
130
117
131
118
#### Run the examples
132
119
@@ -144,7 +131,7 @@ Using Session key
144
131
145
132
python examplename.py --sessionKey="<value>"
146
133
147
-
If you saved your login credentials in the **.splunkrc** file, you can omit those arguments:
134
+
If you saved your login credentials in the **.env** file, you can omit those arguments:
0 commit comments