how can I get Hostnames anits respective IP address through a query.For e.g (index=winlog | Stats count by host) only returns hostnames .I would like the hostname and IP address by modifying the search.
This doesn't work
What "doesn't work"?
Add more grouping fields to your stats
call:
index=ndx sourcetype=srctp
| stats count by host ip