Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update getting-started-splunk-setup.md #2417

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jenworthington
Copy link
Collaborator

I can't quite figure out how the customer is supposed to use this. It reads as steps but they don't seem like actual guided tasks. Is it more of a best practices topic or an overview? Or if it is numbered steps/process, then maybe we add links to each step? I'd love to get your thoughts and maybe we can discuss in our 1:1

I can't quite figure out how the customer is supposed to use this. It reads as steps but they don't seem like actual guided tasks. Is it more of a best practices topic or an overview? Or if it is numbered steps/process, then maybe we add links to each step? I'd love to get your thoughts and maybe we can discuss in our 1:1
@mstopa-splunk
Copy link
Contributor

hi @jenworthington sure, that's what this section is about:

Topic: how to setup your Splunk instance to work with SC4S

Steps:

  1. Create default indexes in Splunk
  2. Set up the Splunk HTTP Event Collector

These are the two things that must be done to ensure SC4S-Splunk connection.

Ad 1 Indexes
You can use your custom set of indexes. But make sure that all of them, as well as the default set, are created in Splunk, else you will miss events processed by SC4S

Ad 2 HTTP event collector

  • Refer to Splunk docs to see how to set it up
  • But here are best practices to avoid problems:
    a. put HEC endpoints of your indexers behind a load balancer. Use native syslog-ng load balancing or, preferably, an external load balancer
    b. don't use an intermediate tier of HWFs
    c. make sure that the HEC token has permissions to write in the indexes that you'll need
    d. make sure that you either don't put any "Selected Indexes" or you carefully keep this list up to date
    e. If you're not using TLS on SC4S, turn it off in Splunk's HEC token too.

@mstopa-splunk mstopa-splunk changed the title Update getting-started-splunk-setup.md docs: update getting-started-splunk-setup.md Apr 23, 2024
@mstopa-splunk
Copy link
Contributor

partially solves #2358

@mstopa-splunk
Copy link
Contributor

@jenworthington can you work on the new file docs/gettingstarted/getting-started-splunk-setup-new.md ? I will replace the old one with this one when we finish

Copy link
Collaborator

@rjha-splunk rjha-splunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the comment.

@mstopa-splunk
Copy link
Contributor

@rjha-splunk I left the file that you saw for reference for Jen, but please check docs/gettingstarted/getting-started-splunk-setup-new.md instead. It will replace the old one completely

@jenworthington
Copy link
Collaborator Author

jenworthington commented Apr 24, 2024

Thanks for the new suggestions for structure, it was really helpful. I think I've captured all of the requested changes, take a look and let me know, happy to work on this one some more as needed.

docs/gettingstarted/getting-started-splunk-setup.md Outdated Show resolved Hide resolved
docs/gettingstarted/getting-started-splunk-setup.md Outdated Show resolved Hide resolved

## Step 1: Create indexes within Splunk

SC4S maps each sourcetype to the following indexes by default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customers report problems to us because sometimes they don't create those indexes in Splunk, so better to say in the docs that the SC4S's default set of indexes must be created in Splunk

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes so much more sense!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but the call for action for the reader is that they must create those indexes or they will have problems, please compare with the original document

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make it explicit:

Suggested change
SC4S maps each sourcetype to the following indexes by default:
SC4S maps each sourcetype to the following indexes by default. Make sure to create them in Splunk.

docs/gettingstarted/getting-started-splunk-setup.md Outdated Show resolved Hide resolved
docs/gettingstarted/getting-started-splunk-setup.md Outdated Show resolved Hide resolved
* SC4S traffic must be sent to HEC endpoints that are configured directly on the indexers.

### Step 2: Create a load balancing mechanism
Create a load balancing mechanism between SC4S and Splunk indexers. See [Set up load balancing](https://docs.splunk.com/Documentation/Splunk/9.2.1/Forwarding/Setuploadbalancingd) for more information. Note that this should not be confused with load balancing between [sources and SC4S](../lb.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

splunk docs on load balancing don't apply to this case. Can we make it more in the style of:

In some situations, it is necessary to ensure balancing of the output from SC4S to Splunk indexers. Note that this should not be confused with load balancing between [sources and SC4S](../lb.md). 

what we mean here is that:

  • if you have Splunk Cloud no worry, you're already covered and your SC4S output will be automatically load balanced to Splunk indexers
  • if you have Splunk Enterprise and a single indexer, you obviously don't need an lb
  • if you have Splunk Enterprise and mutliple indexers, you should load balance your SC4S output

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! Is there another topic we should link to in case they are now to the product and need some guidance for creating this type of load balancing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately there's nothing to link at this point, we don't provide any further recommendations for lbs at this point

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In some configurations, you should ensure output balancing from SC4S to Splunk indexers. To do this, you create a load balancing mechanism between SC4S and Splunk indexers. See Set up load balancing for more information."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jenworthington sounds great but we cannot use this link because it's for heavy forwarders, not sc4s:

In some configurations, you should ensure output balancing from SC4S to Splunk indexers. To do this, you create a load balancing mechanism between SC4S and Splunk indexers.

docs/gettingstarted/getting-started-splunk-setup.md Outdated Show resolved Hide resolved
@mstopa-splunk
Copy link
Contributor

@jenworthington ready for the next iteration

- Refer to [Splunk Cloud](http://docs.splunk.com/Documentation/Splunk/7.3.1/Data/UsetheHTTPEventCollector#Configure_HTTP_Event_Collector_on_managed_Splunk_Cloud)
or [Splunk Enterprise](http://dev.splunk.com/view/event-collector/SP-CAAAE6Q) for specific HEC configuration instructions based on your
To set up syslog processing with SC4S, perform the following tasks in your Splunk instance:
1. Create indexes within Splunk.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check how mkdocs renders documentation: https://splunk.github.io/splunk-connect-for-syslog/2417/gettingstarted/getting-started-splunk-setup/

in this case we need a newline before the list else we get:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a new line before the steps. I don't see it rendering though, am i doing it wrong?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/gettingstarted/getting-started-splunk-setup.md Outdated Show resolved Hide resolved
docs/gettingstarted/k8s-microk8s.md Outdated Show resolved Hide resolved
@mstopa-splunk
Copy link
Contributor

mstopa-splunk commented May 8, 2024

@jenworthington something went wrong and your changes to docs/gettingstarted/getting-started-splunk-setup.md from the last pass were not commited. I opened all previous comments again, please go through them and commit the final pass, I'm sorry for that situation

I made these changes a while back but maybe i did something weird with the branching? So I redid them and hopefully second time is the charm. ;)
@@ -1,9 +1,8 @@
# Splunk setup
To ensure proper integration for SC4S and Splunk, perform the following tasks in your Splunk instance:

1. Create indexes within Splunk.
1. Create copies of your SC4S indexes in Splunk.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

originally Splunk has just a few indexes; SC4S requires way more to be there, so the user needs to create them, not sure what copies mean in this context

@@ -30,7 +31,7 @@ SC4S maps each sourcetype to the following indexes by default:
* `print`
* `_metrics` (Optional opt-in for SC4S operational metrics; ensure this is created as a metrics index)

You can also you create your own indexes in Splunk. See [Create custom indexes]( https://docs.splunk.com/Documentation/Splunk/9.2.1/Indexer/Setupmultipleindexes) for more information.
If you create custom indexes in SC4S you must also create them in Splunk. See [Create custom indexes]( https://docs.splunk.com/Documentation/Splunk/9.2.1/Indexer/Setupmultipleindexes) for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't create indexes in SC4S so maybe:

Suggested change
If you create custom indexes in SC4S you must also create them in Splunk. See [Create custom indexes]( https://docs.splunk.com/Documentation/Splunk/9.2.1/Indexer/Setupmultipleindexes) for more information.
If you use custom indexes in SC4S you must also create them in Splunk. See [Create custom indexes]( https://docs.splunk.com/Documentation/Splunk/9.2.1/Indexer/Setupmultipleindexes) for more information.


## Step 1: Create indexes within Splunk

SC4S maps each sourcetype to the following indexes by default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make it explicit:

Suggested change
SC4S maps each sourcetype to the following indexes by default:
SC4S maps each sourcetype to the following indexes by default. Make sure to create them in Splunk.

Splunk type.

Keep in mind the following best practices specific to HEC for SC4S:
* Make sure that the HEC token created for SC4S has permissions to add events to `main`, `_metrics`, and all other event destination indexes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_metrics are not events, so maybe:

Suggested change
* Make sure that the HEC token created for SC4S has permissions to add events to `main`, `_metrics`, and all other event destination indexes.
* Make sure that the HEC token created for SC4S has permissions to write to `_metrics` and all event destination indexes.

@mstopa-splunk
Copy link
Contributor

@jenworthington ready for the final pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants