All Apps and Add-ons

Read a whole csv of hosts and other information and ping the hosts only

samuelng
New Member

Hi, I have a csv file of hosts names and other information. And I want to use network toolkit to ping the hosts only.
my csv file is stored in an area C:\Splunk\WINDOWS\WMI

index=wmi source="C:\\Splunk\\Windows\\WMI\\IMFS_CMDBRawData.csv"
| fields Name
| lookup ping host as Name
| table Name _raw host sent received packet_loss min_ping max_ping avg_ping jitter return_code raw_output

However, I am only seeing Name and _raw

And this is the error message i receive: Script for lookup table 'ping' returned error code 1. Results may be incorrect.

Tags (2)
0 Karma

p_gurav
Champion

Could you please try this:

index=wmi source="C:\\Splunk\\Windows\\WMI\\IMFS_CMDBRawData.csv"
 | lookup ping host as Name OUTPUTNEW
 | table Name _raw host sent received packet_loss min_ping max_ping avg_ping jitter return_code raw_output
0 Karma
Get Updates on the Splunk Community!

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...

Splunkbase | Splunk Dashboard Examples App for SimpleXML End of Life

The Splunk Dashboard Examples App for SimpleXML will reach end of support on Dec 19, 2024, after which no new ...

Understanding Generative AI Techniques and Their Application in Cybersecurity

Watch On-Demand Artificial intelligence is the talk of the town nowadays, with industries of all kinds ...