I’ve been using this BigFix Query in the WebUI to get the client log of the current day:
locked lines of files ((year of it as string & month of it as two digits & day_of_month of it as two digits) of date (local time zone) of now & “.log”) of folders “__Global/Logs” of (data folder of client)
It works fine, but now I need to get the last 7 days from now, how can I adapt the query?
Do you want the one log from 7 days ago, or the last 7 days worth of logs? If the former, try something like the following:
locked lines of files ((year of it as string & month of it as two digits & day_of_month of it as two digits) of date (local time zone) of (now - 7 * day) & ".log") of folders "__Global/Logs" of (data folder of client)
Here is another possible approach which includes .log and .bkg files: locked lines of files whose (modification time of it > (now - 7*day)) of folders "__Global/Logs" of (data folder of client)