Splunk Search

Why does my search in curl return empty results?

Buscatrufas
Path Finder

Hi guys,

I tried to make a search using curl, but the problem is when the command finalizes, it return empty.

Here is my command:

curl -u user:pass -k https://myURL/services/search/jobs/export --data-urlencode search="search | inputlookup lookup_cve | join CPE_ASSOCIATED [search index=\"analisis_vuln\" sourcetype=\"nmap_csv\" | stats values(ip) by CPE_ASSOCIATED]" -d output_mode=csv -o reporte_`date +%Y-%m-%d`

I don't know where the problem is 😞

Thanks for any help.

Best Regards, Buscatrufas 🙂

0 Karma
1 Solution

Buscatrufas
Path Finder

Can close this guys, thanks anyway. I fixed it by removing search from the string. The final command is the following:

 curl -u user:pass -k https://myURL/services/search/jobs/export --data-urlencode search="| inputlookup lookup_cve | join CPE_ASSOCIATED [search index=\"analisis_vuln\" sourcetype=\"nmap_csv\" | stats values(ip) by CPE_ASSOCIATED]" -d output_mode=csv -o reporte_`date +%Y-%m-%d`

Thanks 🙂

View solution in original post

Buscatrufas
Path Finder

Can close this guys, thanks anyway. I fixed it by removing search from the string. The final command is the following:

 curl -u user:pass -k https://myURL/services/search/jobs/export --data-urlencode search="| inputlookup lookup_cve | join CPE_ASSOCIATED [search index=\"analisis_vuln\" sourcetype=\"nmap_csv\" | stats values(ip) by CPE_ASSOCIATED]" -d output_mode=csv -o reporte_`date +%Y-%m-%d`

Thanks 🙂

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...