Skip to content

Commit 4d50036

Browse files
Docs update (#346)
* Readme changes
1 parent 79e79b2 commit 4d50036

File tree

6 files changed

+38
-29
lines changed

6 files changed

+38
-29
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ jobs:
184184
run: |
185185
cf logs splunk-firehose-nozzle &
186186
187+
# Skip test for now!
187188
execute_tests:
188189

189190
needs: tile-builder
@@ -239,17 +240,16 @@ jobs:
239240
run: |
240241
cf logs splunk-firehose-nozzle &
241242
242-
# Skip test for now!
243-
# # Prepare test environment
244-
# - name: Prepare test environment
245-
# run: |
246-
# .github/pre-functional-test.sh
243+
# Prepare test environment
244+
- name: Prepare test environment
245+
run: |
246+
.github/pre-functional-test.sh
247247
248248
249-
# # Executing tests
250-
# - name: Executing tests
251-
# run: |
252-
# .github/functional-test.sh
249+
# Executing tests
250+
- name: Executing tests
251+
run: |
252+
.github/functional-test.sh
253253
254254
# Teardown
255255
- name: Teardown

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ This is recommended for dev environments only.
112112
* `SPLUNK_METRIC_INDEX`: Index in which metric data will be ingested when monitoring module is enabled
113113
* `SELECTED_MONITORING_METRICS`: Name of the metrics that you want to monitor and add using comma seprated values. List of the metrics that are supported in the metrics modules are given below
114114

115-
116-
117115
__About app cache params:__
118116

119117
When ADD_APP_INFO config is enabled, the nozzle will enrich the event with app metadata. For this, the nozzle maintains a cache of all the apps locally so that it doesn’t need to query from remote every time.
@@ -142,31 +140,31 @@ on user authentication.
142140
cd splunk-firehose-nozzle
143141
```
144142

145-
1. Authenticate to Cloud Foundry
143+
2. Authenticate to Cloud Foundry
146144

147145
```shell
148146
cf login -a https://api.[your cf system domain] -u [your id]
149147
```
150148

151-
1. Copy the manifest template and fill in needed values (using the credentials created during setup)
149+
3. Copy the manifest template and fill in needed values (using the credentials created during setup)
152150

153151
```shell
154152
vim scripts/ci_nozzle_manifest.yml
155153
```
156154

157-
1. Push the nozzle
155+
4. Push the nozzle
158156

159157
```shell
160158
make deploy-nozzle
161159
```
162160

163161
#### Dump application info to boltdb ####
164-
If in production there are lots of CF applications(say tens of thousands) and if the user would like to enrich
165-
application logs by including application meta data,querying all application metadata information from CF may take some time.
166-
For example if we include, add app name, space ID, space name, org ID and org name to the events.
162+
If in production where there are lots of CF applications (say tens of thousands) and if the user would like to enrich
163+
application logs by including application metadata, querying all application metadata information from CF may take some time -
164+
for example if we include: add app name, space ID, space name, org ID and org name to the events.
167165
If there are multiple instances of Spunk nozzle deployed the situation will be even worse, since each of the Splunk nozzle(s) will query all applications meta data and
168-
cache the meta data information to the local boltdb file. These queries will introduce load to the CF system and could potentially take a long time to finish.
169-
Users can run this tool to generate a copy of all application meta data and copy this to each Splunk nozzle deployment. Each Splunk nozzle can pick up the cache copy and update the cache file incrementally afterwards.
166+
cache the metadata information to the local boltdb file. These queries will introduce load to the CF system and could potentially take a long time to finish.
167+
Users can run this tool to generate a copy of all application metadata and copy this to each Splunk nozzle deployment. Each Splunk nozzle can pick up the cache copy and update the cache file incrementally afterwards.
170168

171169
Example of how to run the dump application info tool:
172170

@@ -275,7 +273,7 @@ DEST_KEY =_MetaData:Index
275273
REGEX = (sourcetype::cf:splunknozzle)
276274
FORMAT = new_index
277275
```
278-
<p class="note"><strong>Note:</strong>Moving from version 1.2.4 to 1.2.5,timestamp will use nanosecond precision instead of milliseconds.</p>
276+
<p class="note"><strong>Note:</strong>Moving from version 1.2.4 to 1.2.5, timestamp will use nanosecond precision instead of milliseconds.</p>
279277
280278
281279
__Monitoring(Metric data Ingestion):__
@@ -503,7 +501,7 @@ For development against [bosh-lite](https://github.com/cloudfoundry/bosh-lite),
503501
copy `tools/nozzle.sh.template` to `tools/nozzle.sh` and supply missing values:
504502
505503
```
506-
$ cp script/dev.sh.template tools/nozzle.sh
504+
$ cp tools/nozzle.sh.template tools/nozzle.sh
507505
$ chmod +x tools/nozzle.sh
508506
```
509507

testing/integration/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,28 @@
66
Deploy nozzle to Cloud Foundry env via `cf push`
77
```
88
cf login --skip-ssl-validation -a https://api.<your cf sys domain> -u <your cf user name> -p <your cf password>
9-
9+
1010
make deploy-nozzle
1111
```
1212
- Run nozzle binary locally
1313
1414
Create a `env.sh` file to export all configuration env variables locally.
1515
``````
1616
#!/usr/bin/env bash
17-
17+
1818
export SKIP_SSL_VALIDATION_CF=true
1919
export SKIP_SSL_VALIDATION_SPLUNK=true
2020
export ADD_APP_INFO=<String item list of metadata fields: AppName,OrgName,OrgGuid,SpaceName,SpaceGuid>
2121
export API_ENDPOINT=<CF-ENDPOINT>
22+
export API_PASSWORD=<CF-PASSWORD>
23+
export API_USER=<CF-USER>
2224
export EVENTS=ValueMetric,CounterEvent,Error,LogMessage,HttpStartStop,ContainerMetric
2325
export SPLUNK_TOKEN=<HEC-TOKEN>
24-
export SPLUNK_HOST=<HEC-ENDPOINT>
25-
export SPLUNK_INDEX=<TARGET-SPLUNK-INDEX>
26+
export SPLUNK_URL=<HEC-ENDPOINT>
27+
export SPLUNK_USER=<SPLUNK-USERNAME>
28+
export SPLUNK_PASSWORD=<SPLUNK-PASSWORD>
29+
export SPLUNK_INDEX=main
30+
export SPLUNK_METRIC_INDEX=<SPLUNK-METRIC-INDEX>
2631
export FIREHOSE_SUBSCRIPTION_ID=splunk-nozzle
2732
export FIREHOSE_KEEP_ALIVE=25s
2833
export CLIENT_ID=<CF CLIENT ID>
@@ -31,9 +36,9 @@
3136
Start nozzle binary
3237
```
3338
cf login --skip-ssl-validation -a https://api.<your cf sys domain> -u <your cf user name> -p <your cf password>
34-
39+
3540
source env.sh
36-
41+
3742
./splunk-firehose-nozzle
3843
```
3944
#### Install python 3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pytest
22
requests
33
json_delta
4-
pyyaml
4+
pyyaml<5.4.0

testing/integration/test-env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ export SPLUNK_URL=<value>
22
export SPLUNK_USER=<value>
33
export SPLUNK_PASSWORD=<value>
44
export API_ENDPOINT=<value>
5-
export SPLUNK_INDEX=<value>
5+
export API_PASSWORD=<value>
6+
export API_USER=<value>
7+
export SPLUNK_INDEX=<value>
8+
export SPLUNK_METRIC_INDEX=<value>

tools/nozzle.sh.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ export SPLUNK_TOKEN=<token>
1414
export SPLUNK_HOST=<hec host, something like https://example.cloud.splunk.com:8088>
1515
export SPLUNK_INDEX=<index>
1616

17+
export CLIENT_ID=<client_id>
18+
export CLIENT_SECRET=<client_secret>
19+
1720
go run main.go

0 commit comments

Comments
 (0)