Splunk Search

Search String for network Devices

syed_star357
New Member

Hi,

We have around 200 Network devices and want to know, we are getting logs from all the network devices, which we have added into splunk.
Please guide me, what is the search string to get the result from number network devices we are getting logs.

Regards,
Syed
+971522874593

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Assuming you've a lookup table created with all the Network device names, say network_devices.csv, and the name of the field contains network device id is device_id and is available in both lookup and your data, then something like this can give you devices for which you didn't receive data

| inputlookup network_devices.csv | eval count=0 | append [search index=yourindex sourcetype=yoursourcetype | stats count by device_id] | stats max(count) as count by device_id | where count=0

View solution in original post

0 Karma

jmallorquin
Builder

I will assuming that every device is define in the host field :

|metadata type=hosts index=xxxxxx

Hope i help you

0 Karma

somesoni2
Revered Legend

Assuming you've a lookup table created with all the Network device names, say network_devices.csv, and the name of the field contains network device id is device_id and is available in both lookup and your data, then something like this can give you devices for which you didn't receive data

| inputlookup network_devices.csv | eval count=0 | append [search index=yourindex sourcetype=yoursourcetype | stats count by device_id] | stats max(count) as count by device_id | where count=0
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...