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
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!