I am trying to use this. It will create a file with the correct file name, it just has no contents... Any Ideas?
my command:
`eval_lab_invalid_chars` | `eval_lab_field_errors` | `remove_inactive_tests` | `lab_table_1` | `compendium_status_3_spaces` | `compendium_filter_status(Good)` | `report_date_grouping_lab` | `new_compendium_filter` | `division_lookup` | `compendium_date_format` | `compendium_new_lab_dedup` | `compendium_new_lab_table` | outputcsv [ search index=compendium sourcetype=lab_compendium | head 1 | eval query="All_lab_new_".strftime(now(),"%b_%d_%Y") | fields query | format "" "" "" "" "" ""]`
When I run the search without the outputcsv command I get results...
We ended up using PowerShell to do the renames and moving the files to the Shared Location that we wanted to use. Changed outputcsv to outputlookup and setup some transforms.conf to setup the initial location of the files.
We ended up using PowerShell to do the renames and moving the files to the Shared Location that we wanted to use. Changed outputcsv to outputlookup and setup some transforms.conf to setup the initial location of the files.
I keep hearing that about a lot of the issues we deal with. I am beginning to wonder if there is something wrong with Windows!
very strange I have not had that happen in my experience so far.
We are on 4.3.5
That is correct, if I use a static file name it works fine. When using the dynamic name I get a blank file.
I think we are just going to use PowerShell to add the date stamp to the file, after it is generated.
strange, what version are you running?
and to just be clear, when you define the file name like outputcsv filename.csv
its works
but when you use the unique name its a blank file?
Tried that too, same result.
try this instead for creating the file name
...| outputcsv [ | stats count | eval filename=strftime(now(), "All_lab_new_%b_%d_%Y") | return $filename]
That is correct, for 450 searches. This file will be used to maintain integrations.
what is the custom name you are trying to accomplish?
All_lab_new_feb_27_2013.csv ?
Yes, it will work that way.
so you if you just use ...|outputcsv somefile.csv
does it work?