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

Cohesity: some logs are not detected by parser, filter needs to be updated #2215

Closed
aalisher-tmx opened this issue Oct 4, 2023 · 8 comments · Fixed by #2234
Closed

Cohesity: some logs are not detected by parser, filter needs to be updated #2215

aalisher-tmx opened this issue Oct 4, 2023 · 8 comments · Fixed by #2234
Assignees

Comments

@aalisher-tmx
Copy link

Was the issue replicated by support?
No
What is the sc4s version ?
3.1.4
Is there a pcap available?
can share via email or via sales engineer
Is the issue related to the environment of the customer or Software related issue?
Software
Is it related to Data loss, please explain ?
Protocol? Hardware specs?
cohesity is using port 514 (tcp) to ingest syslog
Last chance index/Fallback index?
Fallback
Is the issue related to local customization?

Do we have all the default indexes created?
Yes
Describe the bug
A clear and concise description of what the bug is.
I have defined a custom index for the keys defined in https://splunk.github.io/splunk-connect-for-syslog/main/sources/vendor/Cohesity/cluster/ in a metadata file. But some of the logs are still going to infraops and osnix indexes. Looks like filter is not detecting some of the source types.
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
@ikheifets-splunk
Copy link
Contributor

@aalisher-tmx Please don't forget mention this issue, when you will send .pcap file. Will wait your .pcap file

@ikheifets-splunk ikheifets-splunk self-assigned this Oct 4, 2023
@aalisher-tmx
Copy link
Author

sent an email with the pcap file. Thanks.

@ikheifets-splunk
Copy link
Contributor

ikheifets-splunk commented Oct 5, 2023

@aalisher-tmx I looked at your .pcap file.

We identifying logs as cohesity only if logs produced by program cluster_audit (sourcetype=cohesity:cluster:audit) or dataprotection_events (sourcetype=cohesity:cluster:dataprotection).

In your case logs producing mostly producing sshd. we can't identify your logs produced by ssh because it's a very generic logs and might be produced by any vendor. Also would be wrong write it oninfraops index. In general it's not device specific logs, it's ssh logs.

By this reason it's not a bug.

@aalisher-tmx
Copy link
Author

aalisher-tmx commented Oct 5, 2023 via email

@ikheifets-splunk
Copy link
Contributor

ikheifets-splunk commented Oct 5, 2023

@aalisher-tmx As I already mentioned ssh logs might be produced by any vendor and device, we mostly skipping such logs and analysing only device-specific logs. I also will discuss with another maintainers tomorrow about that, but it's seems that we wouldn't fix that.

If you really need to mark them as cohesity then I can propose such approach. You need to ask tech support provide you custom local configuration that will identify logs as cohesity if hostname is equal to some hostname (constant name of device that producing this logs).

@ikheifets-splunk
Copy link
Contributor

@aalisher-tmx if we talking about api_audit please send me .pcap with that. In your .pcap I didn't find something similar.
If we talking about ssh, I already described what to do on my previous comment

@chipzzz
Copy link

chipzzz commented Oct 10, 2023

Is there anyway to ingest json logs? They seemed to always be dropped by sc4s.

@ikheifets-splunk ikheifets-splunk linked a pull request Oct 11, 2023 that will close this issue
@ikheifets-splunk
Copy link
Contributor

ikheifets-splunk commented Oct 13, 2023

@aalisher-tmx will merge soon that PR that will add support api_audit.
UPD please update SC4S on version 3.4.7 we added support of api_audit

If we talking about sshd (as I mentioned before) you need to create a local parser:

block parser sshd_cohesity_parser() {
    channel {
        rewrite {
            r_set_splunk_dest_default(
                index("main")
                source("cohesity:sshd")
                sourcetype("cohesity:sshd")
                vendor("cohesity")
                product("sshd")
            );
        };
    };
};

application sshd_cohesity_parser[sc4s-syslog-pgm] {
   filter {
        program("sshd" type(string) flags(prefix)) and host("ttpsa-coh01-cc520220127-node-2");
    };	
    parser { sshd_cohesity_parser(); };
};

P.S. Kindly recommending use regex for host filtering

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 a pull request may close this issue.

3 participants