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
--log-events-batch-size=200 Log Events Batch Size to send to Sumo
23
-
--sumo-post-minimum-delay=200ms
24
-
Sumo Logic HTTP Post Minimum Delay
25
-
--sumo-category="" Sumo Logic Category
26
-
--sumo-name="" Sumo Logic Name
27
-
--sumo-host="" Sumo Logic Host
28
-
--verbose-log-messages Allow Verbose Log Messages
29
-
--custom-metadata="" Use this flag for addingCustom Metadata (key1:value1,key2:value2, etc...)
30
-
--include-only-matching-filter=""
31
-
Adds an 'Include only' filter to Events content (key1:value1,key2:value2, etc...)
32
-
--exclude-always-matching-filter=""
33
-
Adds an 'Exclude always' filter to Events content (key1:value1,key2:value2,
34
-
etc...)
35
-
--version Show application version.
10
+
Flags: (See run command, in this document, for syntax of flags)
11
+
--help Show context-sensitive help (also try --help-long and --help-man).
12
+
--api-endpoint= CF API Endpoint
13
+
--sumo-endpoint= SUMO-ENDPOINT Complete URL for the endpoint, copied from the Sumo Logic HTTP Source configuration
14
+
--subscription-id="firehose" Cloud Foundry ID for the subscription.
15
+
--cloudfoundry-user= Cloud Foundry User
16
+
--cloudfoundry-password= Cloud Foundry Password
17
+
--events="LogMessage" Comma separated list of events you would like. Valid options are ContainerMetric, CounterEvent, Error, HttpStart, HttpStartStop,
18
+
HttpStop, LogMessage, ValueMetric
19
+
--nozzle-polling-period=15s How frequently this Nozzle polls the CF Firehose for data
20
+
--log-events-batch-size=500 When number of messages in the buffer is equal to this flag, send those to Sumo Logic
21
+
--sumo-post-minimum-delay=2000ms Minimum time between HTTP POST to Sumo Logic
22
+
--sumo-category="" This value overrides the default 'Source Category' associated with the configured Sumo Logic HTTP Source
23
+
--sumo-name="" This value overrides the default 'Source Name' associated with the configured Sumo Logic HTTP Source
24
+
--sumo-host="" This value overrides the default 'Source Host' associated with the configured Sumo Logic HTTP Source
25
+
--verbose-log-messages Enable Verbose in 'LogMessage' Event. If this flag is NOT present, the LogMessage will contain ONLY the fields: tiemstamp, cf_app_guid, Msg
26
+
--custom-metadata="" Use this flag for addingCustom Metadata to the JSON (key1:value1,key2:value2, etc...)
27
+
--include-only-matching-filter="" Adds an 'Include only' filter to Events content (key1:value1,key2:value2, etc...)
28
+
--exclude-always-matching-filter="" Adds an 'Exclude always' filter to Events content (key1:value1,key2:value2, etc...)
29
+
--version Show application version.
36
30
```
37
31
38
32
@@ -43,8 +37,9 @@ There are two ways to run this Nozzle:
43
37
44
38
### Run as standalone app
45
39
40
+
This is an example for running the Nozzle using the flags options described above:
46
41
```
47
-
godep go run main.go --sumo-endpoint=https://sumo-endpoint --api-endpoint=https://api.endpoint --cloudfoundry-user=some_user --cloudfoundry-password=some_password --sumo-post-minimum-delay=200ms --custom-metadata=Key1:Value1,Key2:Value2,Key3:Value3 --log-events-batch-size=200 --events=LogMessage, ValueMetric --verbose-log-messages
42
+
godep go run main.go --sumo-endpoint=https://sumo-endpoint --api-endpoint=https://api.endpoint --cloudfoundry-user=some_user --cloudfoundry-password=some_password --sumo-post-minimum-delay=200ms --sumo-host=123.123.123.0 --sumo-category=categoryTest --sumo-name=NameTestMETA --log-events-batch-size=200 --events=LogMessage, ValueMetric --verbose-log-messages
48
43
```
49
44
50
45
If everything goes right, you should see in your terminal the _Nozzle's Logs_ and, in the __Sumo Logic endpoint__ (defined in the _--sumo-endpoint_ flag) you should see the logs according the events you choose (_'LogMessage'_ and _'ValueMetric'_ with _verbose_ in this case).
apiEndpoint=kingpin.Flag("api-endpoint", "URL to CF API Endpoint").OverrideDefaultFromEnvar("API_ENDPOINT").String()
22
+
sumoEndpoint=kingpin.Flag("sumo-endpoint", "SUMO-ENDPOINT Complete URL for the endpoint, copied from the Sumo Logic HTTP Source configuration").OverrideDefaultFromEnvar("SUMO_ENDPOINT").String()
23
23
//dopplerEndpoint = kingpin.Flag("doppler-endpoint", "Overwrite default doppler endpoint return by /v2/info").OverrideDefaultFromEnvar("DOPPLER_ENDPOINT").String()
24
24
subscriptionId=kingpin.Flag("subscription-id", "Cloud Foundry ID for the subscription.").Default("firehose").OverrideDefaultFromEnvar("FIREHOSE_SUBSCRIPTION_ID").String()
25
-
user=kingpin.Flag("cloudfoundry-user", "Cloud Foundry User").OverrideDefaultFromEnvar("CLOUDFOUNDRY_USER").String() //user created in CF, authorized to connect the firehose
26
-
password=kingpin.Flag("cloudfoundry-password", "Cloud Foundry Password").OverrideDefaultFromEnvar("CLOUDFOUNDRY_PASSWORD").String()// password created along with the firehose_user //kingpin.Flag("skip-ssl-validation", "Please don't").Default("false").OverrideDefaultFromEnvar("SKIP_SSL_VALIDATION").Bool()
user=kingpin.Flag("cloudfoundry-user", "Cloud Foundry User").OverrideDefaultFromEnvar("CLOUDFOUNDRY_USER").String() //user created in CF, authorized to connect the firehose
wantedEvents=kingpin.Flag("events", fmt.Sprintf("Comma separated list of events you would like. Valid options are %s", eventRouting.GetListAuthorizedEventEvents())).Default("LogMessage").OverrideDefaultFromEnvar("EVENTS").String()
eventsBatchSize=kingpin.Flag("log-events-batch-size", "Log Events Batch Size to send to Sumo").Default("200").OverrideDefaultFromEnvar("LOG_EVENTS_BATCH_SIZE").Int()
32
-
sumoPostMinimumDelay=kingpin.Flag("sumo-post-minimum-delay", "Sumo Logic HTTP Post Minimum Delay").Default("200ms").OverrideDefaultFromEnvar("SUMO_POST_MINIMUM_DELAY").Duration()
customMetadata=kingpin.Flag("custom-metadata", "Use this flag for addingCustom Metadata (key1:value1,key2:value2, etc...)").Default("").OverrideDefaultFromEnvar("CUSTOM_METADATA").String()
30
+
tickerTime=kingpin.Flag("nozzle-polling-period", "How frequently this Nozzle polls the CF Firehose for data").Default("15s").OverrideDefaultFromEnvar("NOZZLE_POLLING_PERIOD").Duration()
31
+
eventsBatchSize=kingpin.Flag("log-events-batch-size", "When number of messages in the buffer is equal to this flag, send those to Sumo Logic").Default("500").OverrideDefaultFromEnvar("LOG_EVENTS_BATCH_SIZE").Int()
32
+
sumoPostMinimumDelay=kingpin.Flag("sumo-post-minimum-delay", "Minimum time between HTTP POST to Sumo Logic").Default("2000ms").OverrideDefaultFromEnvar("SUMO_POST_MINIMUM_DELAY").Duration()
33
+
sumoCategory=kingpin.Flag("sumo-category", "This value overrides the default 'Source Category' associated with the configured Sumo Logic HTTP Source").Default("").OverrideDefaultFromEnvar("SUMO_CATEGORY").String()
34
+
sumoName=kingpin.Flag("sumo-name", "This value overrides the default 'Source Name' associated with the configured Sumo Logic HTTP Source").Default("").OverrideDefaultFromEnvar("SUMO_NAME").String()
35
+
sumoHost=kingpin.Flag("sumo-host", "This value overrides the default 'Source Host' associated with the configured Sumo Logic HTTP Source").Default("").OverrideDefaultFromEnvar("SUMO_HOST").String()
36
+
verboseLogMessages=kingpin.Flag("verbose-log-messages", "Enable Verbose in 'LogMessage' Event. If this flag NOT present, the LogMessage will contain ONLY the fields: tiemstamp, cf_app_guid, Msg").Default("false").OverrideDefaultFromEnvar("VERBOSE_LOG_MESSAGES").Bool()
37
+
customMetadata=kingpin.Flag("custom-metadata", "Use this flag for addingCustom Metadata to the JSON (key1:value1,key2:value2, etc...)").Default("").OverrideDefaultFromEnvar("CUSTOM_METADATA").String()
38
38
includeOnlyMatchingFilter=kingpin.Flag("include-only-matching-filter", "Adds an 'Include only' filter to Events content (key1:value1,key2:value2, etc...)").Default("").OverrideDefaultFromEnvar("INCLUDE_ONLY_MATCHING_FILTER").String()
39
39
excludeAlwaysMatchingFilter=kingpin.Flag("exclude-always-matching-filter", "Adds an 'Exclude always' filter to Events content (key1:value1,key2:value2, etc...)").Default("").OverrideDefaultFromEnvar("EXCLUDE_ALWAYS_MATCHING_FILTER").String()
0 commit comments