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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...