Deployment Architecture

How to add condition in splunk data model constraint

tejaswiniul
Explorer

I have a outbound flow that gets data written by App, mem and cards api. cards and mem api is writing logs into applog but App is writing logs in syslog.

In my data model I have sourcetype=app_log as the source type. So in case of all flows except app I am getting write splunk dashboard report but for application I am not getting any data.

So I want to add a condition in data model "constraint" section like when api is applications then sourcetype=app_log OR sourcetype=sys_log else sourcetype=app_log

Can anyone assist me how to do this in splunk?

Tags (2)
0 Karma
1 Solution

lguinn2
Legend

In order for this to work, you must be able to identify the syslog data that came from the App. I will assume that the source field is different for syslog data from App, in contrast to all other syslog data. You might be able to use "host" instead of source, if the only syslog data from that host is from the App

(source="the/source/info/for/the/syslog/for/the/app"  sourcetype=sys_log ) OR sourcetype=app_log

View solution in original post

lguinn2
Legend

In order for this to work, you must be able to identify the syslog data that came from the App. I will assume that the source field is different for syslog data from App, in contrast to all other syslog data. You might be able to use "host" instead of source, if the only syslog data from that host is from the App

(source="the/source/info/for/the/syslog/for/the/app"  sourcetype=sys_log ) OR sourcetype=app_log

tejaswiniul
Explorer

Thanks Lhuinn 🙂

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...