Getting Data In

SC4S routing configuration not working

L_Petch
Path Finder

Hello,

 

I am trying to get logs from my opnsense FW to go to an index called prod_opnsense but everything I have tried doesn't seem to make a difference and it still ends up in the LASTCHANCE index.

 

The latest thing I have tried is below but this also does not work,

I added a new port UDP 515 to my env file. I have checked the opnsense device is sending to this port and can see it in TCPDUMP using it and it makes it to the lastchance index so is not being blocked by any firewall rules etc.

SC4S_DEST_SPLUNK_HEC_DEFAULT_URL=https://HF_IP:8088
SC4S_DEST_SPLUNK_HEC_DEFAULT_TOKEN=TOKEN_ID
#Uncomment the following line if using untrusted SSL certificates
SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY=no

#Add additional listening ports
SC4S_LISTEN_OPNSENSE_UDP_PORT=515
SC4S_DEST_GLOBAL_ALTERNATES=d_archive

 

I added a new logpath file /opt/sc4s/local/config/log_paths/opnsense_515.conf.tmpl

filter f_opnsense_515 {
    source(s_src_udp_515);
    # This filter will match the program name "filterlog"
    program("filterlog");
};

# Log statement to process the traffic
log {
    source(s_src_udp_515);
    filter(f_opnsense_515);

    # Set the vendor_product field. This is how SC4S will map the traffic to an index.
    rewrite {
        set("sc4s_vendor_product", "opnsense");
    };

    # Send the processed logs to the Splunk destination
    destination(d_splunks_ops);
};

 

I then added the below to  /opt/sc4s/local/context/splunk_metadata.csv

opnsense,index,prod_opnsense

 

 

Anyone know why this is not working?

Labels (1)
Tags (1)
0 Karma

Meett
Splunk Employee
Splunk Employee

Hello @L_Petch  This seems to be something around parser itself,
Curious around this line : 

destination(d_splunks_ops)

 

I believe you have shared only half parser above...? can you please share all details? specially what does this d_splunks_ops stands for and what is inside that ? You can also raise support case on this matter if needed . 

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...