Needs to send out reports every hour to an external entity and try to figure out how to have some default values set when there is no data for that time range instead of sending an empty report. The query is below:
eventtypes=TIC-FW-NETSCREEN earliest="-1h@h" latest=@h | stats max(deviceclass) as DeviceClass count(_raw) AS Count last(_time) AS FirstRecord first(_time) as LastRecord | convert ctime(FirstRecord) | convert ctime(LastRecord) | outputcsv filename.csv
Desired Output when there are no records for the search:
DeviceClass,Count,FirstRecord,LastRecord FIREWALL,0,"01/01/1970 00:00:00","01/01/1970 00:00:00"