Skip to content

Commit 46bba9f

Browse files
committed
SCFF-44 adding details regarding filtering
1 parent f96370e commit 46bba9f

1 file changed

Lines changed: 26 additions & 13 deletions

File tree

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,32 @@ If everything goes right, you should see in your terminal the _Nozzle's Logs_ an
5252

5353
### Filtering Option
5454

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:
55+
asked. It works this way:
56+
* case 1:
57+
Include-Only filter="" (Empty)
58+
Exclude-Always filter="" (Empty)
59+
in this case, all the events will be sent to Sumo Logic
60+
61+
* case 2:
62+
Include-Only filter="" (Empty)
63+
Exclude-Always filter= "source_type:other,origin:rep",
64+
in this case, all the events that contains a source-type:other field OR an origin:rep field will be not sent to Sumo Logic
65+
66+
* case 3:
67+
Include-Only filter="job:diego_cell,source_type:other"
68+
Exclude-Always filter="" (Empty)
69+
in this case, Only the events that contains a job:diego-cell field OR a source-type:other field will be sent to Sumo Logic
70+
71+
* case 4:
72+
Include-Only filter="job:diego_cell,source_type:other"
73+
Exclude-Always filter="source_type:other,origin:rep"
74+
75+
in this case, all the events that contains a job:diego-cell field OR a source-type:other field will be sent to Sumo Logic
76+
AND also
77+
all the events that contains a source-type:other field OR an origin:rep field will be not sent to Sumo Logic
78+
if an event share both filters (contains a Include-Only filter field and a Exclude-Always filter field), Only the *Include-Only filter will be considered*
79+
80+
The correct way of using those flags will be something like this:
6881

6982
```
7083
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

0 commit comments

Comments
 (0)