š¶ Livin' on the Edge š¶
Now that we've installed Cribl Edge, let's see how it can help us in ingesting our syslogs today. Edge not only lets us explore our EdgeĀ Nodes on a whim, but also routes our observability data (in this case, syslog) without requiring another parser.
-
Navigate back to the apache syslog file's modal:
- Click into
Manage > Explore > Files > Manual
. - In the
Files
list, click the/var/log/apache/yyy-mm-dd.log
entry.
- Click into
-
Once in the
File
modal, clickMonitorĀ thisĀ file
at the top right. -
In the
Input ID
field, enterapache
. -
Click the
Fields
left tab, then clickAddĀ Field
to add the following field names and values to the table:Name Value sourcetype
"edge-apache-file"
index
"syslog"
-
Click
Save
. -
In the resulting confirmation dialog, click
Yes
to navigate to theCollect
page.
And just like that, we configured Cribl Edge to monitor a syslog file. Then, we navigated to one of Edgeās routing pages, Collect
. Here on the Collect
submenu tab, we can configure Edge to send the file contents nearly anywhere.
That's cool and all, but this is only one file. If you remember, Syslog-NG is configured to change files every day. And we have more than one directory to monitor (/var/log/pan
&& /var/log/apache
)!
in_file_varlog
source- On
Collect
page's filter, remove theSOURCE ID / apache
filter to see all the sources. - At the top of our
Sources
list, click theFile Monitor
tile to expand the stack. - Hover over the
in_file_varlog
tile and clickConfigure
.
Cribl Edge has a neat default File Monitor
configured to watch for log files in /var/log
. Convenient! Let's use that, since it will see all of our Syslog-NG files being written. We just need to make sure they have the right index
and sourcetype
configured.
-
With the
in_file_varlog
drawer open, click the leftFields
tab. -
Click
Add Field
and fill out the followingName
/Value
pairs:Name Value sourcetype
"edge-".concat(source.split('/')[3])
index
"syslog"
-
Click
Save
.
Neat little side note: The Value
text field accepts JavaScript expressions (indicated by the blue line at the field's left). This allows us to variably set the sourcetype
for our data. We'll see the fruits of this after we plumb up the Splunk connection.
Now that we've configured the actual Source we want to use, letās send our data to some low-cost object storage. This way, in the event we need access to an unaltered copy of our syslog data, we'll have it.
S3 and Meā
In a scene straight out of a cooking show, we have already configured an S3 instance in order to speed this sandbox along. Feel free to spend some time looking at the configuration if youād like.
- Click and hold the
+
on the right-hand side of thein_file_varlog
tile (in the expandedFile Monitor
group). - While holding down the button on your mouse (or other pointing device), drag across to the
S3
tile on the right-hand side. - Once your connection line is over the
S3
tile, release the button to complete the connection. - In the resulting pop-up, leave the default
Passthru
selection and clickSave
.
Oh and the SIEM, tooā
While weāre here, letās also send a copy of our syslog data to the SIEM. That way, we are mirroring our current setup, in case we want to replace the agent that ships our syslog events in the future. Or, say, if we want to change up SIEM vendors without needing to change our agentsā¦
- At Cribl Edge's upper right, click
Add Destination
. - Find
Splunk Single Instance
, either by typing in the filter, or by expanding theMoreĀ Destinations
section. - Hover over the
Splunk Single Instance
tile and clickAddĀ New
. - Enter
splunk
as theOutput ID
and as theAddress
. - Click
Save
. - Connect the
in_file_varlog
FileĀ Monitor Source to the newSplunkĀ SingleĀ Instance
Destination (again by clicking and dragging). - In the resulting pop-up, leave the default
Passthru
selection and clickSave
. - At the top right of Edge's UI, click
Commit
. - In the resulting
Git Changes
modal, enter a commit message (example below) and clickCommit & Deploy
.Added syslog-ng File Monitors and routed to S3 AND Splunk
You can repeat the steps above for the apache
Source as well, if you'd like. Then you can check out what it would look like in Splunk at the end. Or not. I'm not your boss.
If you do this, you gotta figure out what to search for by yourself. š
Perf! We have now duplicated the current environment, as well as added a low-cost archive to the mix.
It probably seems silly that we used splunk
as the address for our Splunk Single Instance
destination, but thatās how we have our k8s environment configured for sandboxes. Donāt take our word for it! Feel free to go back to the Splunk UI (the Splunk
top tab) and search for our edge-apache
or edge-pan
sourcetype.
index="syslog" sourcetype="edge-apache"
index="syslog" sourcetype="edge-pan"
We could be done there, but letās do what we actually came here to do: add CriblĀ Stream to the mix.