I would like to know if it's possible to set a purge log in analytics specificly by package. I mean, for a package which runs once a year the retention log will be for example of 2 years, but for packages which runs once a day the retention will be only 100 days.
Is it possible to configure this setting other than in command line?
Thanks
Best Answer
H
Harshit Upadhayay
said
12 minutes ago
Hello, Yes, this is possible. The purge supports a sessionname filter, so you can run a separate purge with its own retention for each package. The name to use is the one shown in the Name column of the Analytics session reports.
You don’t need the OS command line. In Analytics, open the runtime (right-click it in the Navigator, then Open) and use the Command tab:
purge keep 100 day sessionname MY_DAILY_PACKAGE
purge keep 730 day sessionname MY_YEARLY_PACKAGE
A % wildcard also works (for example MONTHLY%). To automate it, use schedule purge keep with the same options plus a cron expression:
The Purge tab of the same editor is where scheduled purges are managed. Please check whether it has a session name field in your version. If it doesn’t, use the commands above.
Two cautions:
Don’t keep an unfiltered purge (for example purge keep 100 day with no sessionname) on the same runtime. It would also delete the yearly package’s sessions.
If several runtimes share the same log database, a purge affects all sessions in that database.
If the log database has never been purged, reduce retention gradually (for example 180, then 150, then 120 days) and wait for each purge to finish before starting the next. Thank you
1 Comment
H
Harshit Upadhayay
said
12 minutes ago
Answer
Hello, Yes, this is possible. The purge supports a sessionname filter, so you can run a separate purge with its own retention for each package. The name to use is the one shown in the Name column of the Analytics session reports.
You don’t need the OS command line. In Analytics, open the runtime (right-click it in the Navigator, then Open) and use the Command tab:
purge keep 100 day sessionname MY_DAILY_PACKAGE
purge keep 730 day sessionname MY_YEARLY_PACKAGE
A % wildcard also works (for example MONTHLY%). To automate it, use schedule purge keep with the same options plus a cron expression:
The Purge tab of the same editor is where scheduled purges are managed. Please check whether it has a session name field in your version. If it doesn’t, use the commands above.
Two cautions:
Don’t keep an unfiltered purge (for example purge keep 100 day with no sessionname) on the same runtime. It would also delete the yearly package’s sessions.
If several runtimes share the same log database, a purge affects all sessions in that database.
If the log database has never been purged, reduce retention gradually (for example 180, then 150, then 120 days) and wait for each purge to finish before starting the next. Thank you
Dsi Tmd
Hi,
I would like to know if it's possible to set a purge log in analytics specificly by package. I mean, for a package which runs once a year the retention log will be for example of 2 years, but for packages which runs once a day the retention will be only 100 days.
Is it possible to configure this setting other than in command line?
Thanks
Hello,
Yes, this is possible. The purge supports a
sessionnamefilter, so you can run a separate purge with its own retention for each package. The name to use is the one shown in the Name column of the Analytics session reports.You don’t need the OS command line. In Analytics, open the runtime (right-click it in the Navigator, then Open) and use the Command tab:
purge keep 100 day sessionname MY_DAILY_PACKAGEpurge keep 730 day sessionname MY_YEARLY_PACKAGEA
%wildcard also works (for exampleMONTHLY%). To automate it, useschedule purge keepwith the same options plus a cron expression:schedule purge keep 100 day cron "0 0 23 * * ?" sessionname MY_DAILY_PACKAGEThe Purge tab of the same editor is where scheduled purges are managed. Please check whether it has a session name field in your version. If it doesn’t, use the commands above.
Two cautions:
purge keep 100 daywith nosessionname) on the same runtime. It would also delete the yearly package’s sessions.If the log database has never been purged, reduce retention gradually (for example 180, then 150, then 120 days) and wait for each purge to finish before starting the next.
Thank you
Harshit Upadhayay
Hello,
Yes, this is possible. The purge supports a
sessionnamefilter, so you can run a separate purge with its own retention for each package. The name to use is the one shown in the Name column of the Analytics session reports.You don’t need the OS command line. In Analytics, open the runtime (right-click it in the Navigator, then Open) and use the Command tab:
purge keep 100 day sessionname MY_DAILY_PACKAGEpurge keep 730 day sessionname MY_YEARLY_PACKAGEA
%wildcard also works (for exampleMONTHLY%). To automate it, useschedule purge keepwith the same options plus a cron expression:schedule purge keep 100 day cron "0 0 23 * * ?" sessionname MY_DAILY_PACKAGEThe Purge tab of the same editor is where scheduled purges are managed. Please check whether it has a session name field in your version. If it doesn’t, use the commands above.
Two cautions:
purge keep 100 daywith nosessionname) on the same runtime. It would also delete the yearly package’s sessions.If the log database has never been purged, reduce retention gradually (for example 180, then 150, then 120 days) and wait for each purge to finish before starting the next.
Thank you