Skip to content

Commit

Permalink
docs: fix firehose-subscription-id name
Browse files Browse the repository at this point in the history
  • Loading branch information
ajasnosz committed Sep 19, 2024
1 parent 7427ef5 commit 828b009
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ This is recommended for dev environments only.
* `HEC_RETRIES`: Retry count for sending events to Splunk. After expiring, events will begin dropping causing data loss. (Default: 5)
* `HEC_WORKERS`: Set the amount of Splunk HEC workers to increase concurrency while ingesting in Splunk. (Default: 8)
* `ENABLE_EVENT_TRACING`: Enables event trace logging. Splunk events will now contain a UUID, Splunk Nozzle Event Counts, and a Subscription-ID for Splunk correlation searches. (Default: false)
* `SPLUNK_LOGGING_INDEX`: The Splunk index where logs from the nozzle of the sourcetype `cf:splunknozzle` will be sent to. Warning: Setting an invalid index will cause events to be lost. This index must match one of the selected indexes for the Splunk HTTP event collector token used for the SPLUNK_TOKEN parameter. When not provided, all logging events will be forwarded to the default SPLUNK_INDEX. The default value is `""`
* `STATUS_MONITOR_INTERVAL`: Time interval (in s/m/h. For example, 3600s or 60m or 1h) for Enabling Monitoring (Metric data of insights with in the connectors). Default is 0s (Disabled).
* `SPLUNK_LOGGING_INDEX`: The Splunk index where logs from the nozzle of the sourcetype `cf:splunknozzle` will be sent to. Warning: Setting an invalid index will cause events to be lost. This index must match one of the selected indexes for the Splunk HTTP event collector token used for the SPLUNK_TOKEN parameter. When not provided, all logging events will be forwarded to the default SPLUNK_INDEX. (Default: "")
* `STATUS_MONITOR_INTERVAL`: Time interval (in s/m/h. For example, 3600s or 60m or 1h) to enable monitoring of metric data within the connector. (This increases CPU load and should be used only for insights purposes. Default: 0s).
* `SPLUNK_METRIC_INDEX`: Index in which metric data will be ingested when monitoring module is enabled
* `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
* `REFRESH_SPLUNK_CONNECTION`: If set to true, PCF will periodically refresh connection to Splunk (how often depends on KEEP_ALIVE_TIMER value). If set to false connection will be kept alive and reused. (Default: false)
* `KEEP_ALIVE_TIMER`: Time after which connection to Splunk will be refreshed, if `REFRESH_SPLUNK_CONNECTION` is set to true (in s/m/h. For example, 3600s or 60m or 1h). (Default: 30s)
* `MEMORY_BALLAST_SIZE`: Size of memory allocated to reduce GC cycles. Size should be less than the total memory. Default is 0.
* `MEMORY_BALLAST_SIZE`: Size of memory allocated to reduce GC cycles. Size should be less than the total memory. (Default: 0).

__About app cache params:__

Expand Down Expand Up @@ -418,7 +418,7 @@ A correct setup logs a start message with configuration parameters of the Nozzle
skip-ssl: true
splunk-host: http://localhost:8088
splunk-index: atomic
subscription-id: splunk-firehose
firehose-subscription-id: splunk-firehose
trace-logging: true
status-monitor-interval: 0s
version:
Expand Down Expand Up @@ -487,7 +487,7 @@ sourcetype="cf:counterevent"
### 7. Nozzle is not collecting any data with 'websocket' (bad handshake) error
If the nozzle reports below error, then check if the configured "subscription-id" has '#' as a prefix. Please remove the prefix or prepend any other character than '#' to fix this issue.
If the nozzle reports below error, then check if the configured "firehose-subscription-id" has '#' as a prefix. Please remove the prefix or prepend any other character than '#' to fix this issue.
```
Error dialing trafficcontroller server: websocket: bad handshake.\nPlease ask your Cloud Foundry Operator to check the platform configuration (trafficcontroller is wss://****:443).
```
Expand Down
2 changes: 1 addition & 1 deletion eventsink/splunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (s *Splunk) buildEvent(fields map[string]interface{}) map[string]interface{

if s.config.TraceLogging {
extraFields["nozzle-event-counter"] = strconv.FormatUint(atomic.AddUint64(&s.eventCount, 1), 10)
extraFields["subscription-id"] = s.config.SubscriptionID
extraFields["firehose-subscription-id"] = s.config.SubscriptionID
extraFields["uuid"] = s.config.UUID
}
for k, v := range s.config.ExtraFields {
Expand Down
4 changes: 2 additions & 2 deletions splunknozzle/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Config struct {

SkipSSLCF bool `json:"skip-ssl-cf"`
SkipSSLSplunk bool `json:"skip-ssl-splunk"`
SubscriptionID string `json:"subscription-id"`
SubscriptionID string `json:"firehose-subscription-id"`
KeepAlive time.Duration `json:"keep-alive"`

AddAppInfo string `json:"add-app-info"`
Expand Down Expand Up @@ -141,7 +141,7 @@ func NewConfigFromCmdFlags(version, branch, commit, buildos string) *Config {
kingpin.Flag("keep-alive-timer", "Interval used to close and refresh connection to Splunk").
OverrideDefaultFromEnvar("KEEP_ALIVE_TIMER").Default("30s").DurationVar(&c.KeepAliveTimer)

kingpin.Flag("enable-event-tracing", "Enable event trace logging: Adds splunk trace logging fields to events. uuid, subscription-id, nozzle event counter").
kingpin.Flag("enable-event-tracing", "Enable event trace logging: Adds splunk trace logging fields to events. uuid, firehose-subscription-id, nozzle event counter").
OverrideDefaultFromEnvar("ENABLE_EVENT_TRACING").Default("false").BoolVar(&c.TraceLogging)
kingpin.Flag("debug", "Enable debug mode: forward to standard out instead of splunk").
OverrideDefaultFromEnvar("DEBUG").Default("false").BoolVar(&c.Debug)
Expand Down
2 changes: 1 addition & 1 deletion splunknozzle/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ var _ = Describe("Config", func() {
"--job-host=nozzle.example.comc",
"--skip-ssl-validation-cf",
"--skip-ssl-validation-splunk",
"--subscription-id=my-nozzlec",
"--firehose-subscription-id=my-nozzlec",
"--firehose-keep-alive=24s",
"--add-app-info=OrgName",
"--ignore-missing-app",
Expand Down
6 changes: 3 additions & 3 deletions testing/integration/testcases/test_nozzle_configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_search_event_on_splunk_is_not_empty(self, test_env, splunk_logger):
@pytest.mark.Critical
@pytest.mark.parametrize("query_input", [
"index={} cf_app_name=data_gen nozzle-event-counter>0", # nozzle-event-counter should be searchable
"index={} cf_app_name=data_gen subscription-id::splunk-ci", # subscription-id should be searchable
"index={} cf_app_name=data_gen firehose-subscription-id::splunk-ci", # subscription-id should be searchable
"index={} cf_app_name=data_gen uuid::*" # uuid should be searchable
])
def test_enable_event_tracing_is_true(self, test_env, splunk_logger, query_input):
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_search_by_wrong_extra_fields(self, test_env, splunk_logger, query_input

@pytest.mark.Critical
@pytest.mark.parametrize("query_input", [
"index={} cf_app_name=data_gen subscription-id::* event_type=LogMessage"
"index={} cf_app_name=data_gen firehose-subscription-id::* event_type=LogMessage"
])
def test_fields_and_values_in_splunk_event(self, test_env, splunk_logger, query_input):
self.splunk_api = SplunkApi(test_env, splunk_logger)
Expand All @@ -125,7 +125,7 @@ def test_fields_and_values_in_splunk_event(self, test_env, splunk_logger, query_
'index': test_env['splunk_index'],
'source': 'compute',
'sourcetype': 'cf:logmessage',
'subscription-id': 'splunk-ci'
'firehose-subscription-id': 'splunk-ci'
}

assert_json_contains(expect_content, last_event, "Event raw data results mismatch")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_search_by_extra_fields(self, query_input, is_result_empty, test_env, sp
@pytest.mark.Critical
@pytest.mark.parametrize("query_input", [
"index={0} test_tag::{1} nozzle-event-counter>0", # nozzle-event-counter should not be searchable
"index={0} test_tag::{1} subscription-id::splunk-ci", # subscription-id should not be searchable
"index={0} test_tag::{1} firehose-subscription-id::splunk-ci", # subscription-id should not be searchable
"index={0} test_tag::{1} uuid::*" # uuid should not be searchable
])
def test_enable_event_tracing_is_false(self, test_env, query_input, splunk_logger):
Expand Down
24 changes: 12 additions & 12 deletions tile/tile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ forms:
- name: splunk_host
type: string
label: HTTP Event Collector Endpoint URL
description: Splunk HTTP Event Collector endpoint URL. It is required parameter.
description: Splunk HTTP Event Collector endpoint URL. It is a required parameter.
- name: splunk_token
type: secret
label: HTTP Event Collector Token
description: Splunk HTTP Event Collector token. It is required parameter.
description: Splunk HTTP Event Collector token. It is a required parameter.
- name: skip_ssl_validation_splunk
type: boolean
label: Skip SSL Validation
Expand All @@ -41,12 +41,12 @@ forms:
- name: splunk_index #It's a required parameter in config.go and doesn't have default, but here it has default value
type: string
label: Index
description: The name of the Splunk index that events will be sent to. It is required parameter. WARNING:Setting an invalid index will cause events to be lost.
description: The name of the Splunk index that events will be sent to. It is a required parameter. WARNING:Setting an invalid index will cause events to be lost.
default: main
- name: splunk_logging_index
type: string
label: Logging Index
description: The name of the Splunk index where logging events will be sent to. When not provided, all logging events will be forwarded to the splunk_index. WARNING:Setting an invalid index will cause events to be lost.
description: The name of the Splunk index where logging events will be sent to. When not provided, all logging events will be forwarded to the splunk_index. WARNING:Setting an invalid index will cause internal events to be lost.
default: ""
optional: true

Expand All @@ -57,15 +57,15 @@ forms:
- name: api_endpoint
type: string
label: API Endpoint
description: Cloud Foundry API endpoint. It is required parameter.
description: Cloud Foundry API endpoint. It is a required parameter.
- name: client_id
type: string
label: Client ID
description: CF UAA Client ID. It is required parameter.
description: CF UAA Client ID. It is a required parameter.
- name: client_secret
type: secret
label: Client Secret
description: CF UAA Client Secret. It is required parameter.
description: CF UAA Client Secret. It is a required parameter.
- name: skip_ssl_validation_cf
type: boolean
label: Skip SSL Validation
Expand Down Expand Up @@ -102,7 +102,7 @@ forms:
- name: scale_out_nozzle
type: integer
label: Scale Out Nozzle
description: Adds more Splunk nozzle components to spread the load. Recommendation:Run 2 or more nozzles for high availability.
description: Adds more Splunk nozzle instances to spread the load. Recommendation:Run 2 or more nozzles for high availability.
default: 2
- name: firehose_subscription_id
type: string
Expand Down Expand Up @@ -160,7 +160,7 @@ forms:
type: string
label: Status Monitor Interval
default: 0s
description: Time interval (in s/m/h. For example, 3600s or 60m or 1h) for Enabling Monitoring - metric data of insights with in the connectors. (Increases CPU load. Use for insights purposes only) Default is 0s (Disabled).
description: Time interval (in s/m/h. For example, 3600s or 60m or 1h) to enable monitoring of metric data within the connector. (This increases CPU load and should be used only for insights purposes. Default:0s)
- name: flush_interval
type: string
label: Flush Interval
Expand All @@ -180,7 +180,7 @@ forms:
type: string
label: Org Space Cache Invalidate TTL
default: 72h
description: Time interval (in s/m/h. For example, 3600s or 60m or 1h) between refreshing the organization and space cache. Defaults to 72h.
description: Time interval (in s/m/h. For example, 3600s or 60m or 1h) between refreshing the organization and space cache. (Default:72h)
- name: app_limits
type: integer
label: App Limits
Expand All @@ -189,7 +189,7 @@ forms:
- name: nozzle_memory
type: string
label: Nozzle Memory
description: Nozzle memory in MB. Default is 256 MB.
description: Nozzle memory in MB. (Default:256M)
default: 256M
- name: firehose_keep_alive
type: string
Expand Down Expand Up @@ -277,7 +277,7 @@ forms:
type: integer
label: Memory Ballast Size
default: 0
description: Size of memory allocated to reduce GC cycles. Size should be less than the total memory. Default is 0.
description: Size of memory allocated to reduce GC cycles. Size should be less than the total memory (Default:0).

migration: |
if (typeof properties['properties']['.properties.add_app_info']['value'] == "boolean") {
Expand Down

0 comments on commit 828b009

Please sign in to comment.