Skip to content

Commit f96370e

Browse files
committed
SCFF-44 adding details to Readme file regarding filtering
1 parent f82af4c commit f96370e

2 files changed

Lines changed: 35 additions & 12 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Flags:
3535
--version Show application version.
3636
```
3737

38+
3839
There are two ways to run this Nozzle:
3940

4041
1. Run as standalone app
@@ -48,6 +49,28 @@ godep go run main.go --sumo-endpoint=https://sumo-endpoint --api-endpoint=https:
4849

4950
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).
5051

52+
53+
### Filtering Option
54+
55+
There is a lot of Events coming from Cloud Foundry and, in most of the cases, we will only want to see **some** of them or **exclude** some of them, in this cases the filtering flags are useful.
56+
57+
If you want to include only the events that contains:
58+
59+
* job: diego_cell
60+
* source_type: app
61+
62+
and you are not interested in the events that contains:
63+
64+
* source_type:other
65+
* unit:count
66+
67+
The correct way of using those flags will be:
68+
69+
```
70+
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 --log-events-batch-size=200 --events=LogMessage, ValueMetric --include-only-matching-filter=job:diego_cell,source_type:app --exclude-always-matching-filter=source_type:other,unit:count
71+
```
72+
73+
5174
### Run as a tile in Pivotal Cloud Foundry
5275

5376
**Pivotal Cloud Foundry** (PCF) has a Tile Generator tool which will help you to deploy this Nozzle in PCF allowing an easy configuration of it.

tile.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# The high-level description of your tile.
33
# Replace these properties with real values.
44
#
5-
name: firehose-to-sumologic # By convention lowercase with dashes
5+
name: sumo-logic-nozzle # By convention lowercase with dashes
66
icon_file: resources/sumo_128x128-B.png
7-
label: Sumo Logic Firehose Nozzle for PCF
7+
label: Sumo Logic Nozzle for PCF
88
description: Forward firehose logs to Sumo Logic
99

1010
# Global defaults (all optional)
@@ -31,7 +31,7 @@ packages:
3131
manifest:
3232
# any options that you would normally specify in a cf manifest.yml, including</i>
3333
buildpack: https://github.com/cloudfoundry/go-buildpack.git
34-
command: sumo-logic-nozzle
34+
command: firehose-to-sumologic
3535
path: sumo-logic-nozzle.zip
3636
health_check: none
3737
needs_cf_credentials: true
@@ -89,6 +89,10 @@ forms:
8989
label: Cloud Foundry Settings
9090
description: Cloud Foundry Settings details
9191
properties:
92+
- name: api-endpoint
93+
type: string
94+
label: Cloud Foundry API Endpoint
95+
description: API endpoint for CF
9296
- name: cloudfoundry-user
9397
type: string
9498
label: Cloud Foundry User
@@ -97,10 +101,6 @@ forms:
97101
type: secret
98102
label: Cloud Foundry Password
99103
description: Password for API user
100-
- name: api-endpoint
101-
type: string
102-
label: Cloud Foundry API Endpoint
103-
description: API endpoint for CF
104104
- name: log-events-batch-size
105105
type: string
106106
label: Log Events Batch Size
@@ -111,6 +111,11 @@ forms:
111111
label: Comma separated list of events you would like (Default is "LogMessage")
112112
default: LogMessage
113113
description: Valid options are Error, ContainerMetric, HttpStart, HttpStop, HttpStartStop, LogMessage, ValueMetric, CounterEvent
114+
- name: verbose-log-messages
115+
type: boolean
116+
label: Verbose in 'LogMessage' event
117+
default: true
118+
description: If is not checked, it will send only the LogMessage and the App id
114119
- name: nozzle-polling-period
115120
type: string
116121
label: Nozzle Polling Period
@@ -122,8 +127,3 @@ forms:
122127
default: true
123128
description: Handle if the Nozzle logs will be ignored and not send to Sumo Logic
124129
configurable: false
125-
- name: verbose-log-messages
126-
type: boolean
127-
label: Verbose in LogMessage event
128-
default: true
129-
description: If is false, it will send only the LogMessage and the App id

0 commit comments

Comments
 (0)