Requirement:
- Setup an automated schedule in ClearPass to start collecting logs at a specified time in future
- This should also put certain services in DEBUG for a specified duration to collect DEBUG logs
- This is required due to log collection is not feasible during the time of the issue.
Solution:
- Starting from 6.9.6, 6.10 version, log collection can be scheduled using CLI using the following command syntax:
#dump logs -o [-r] [-v] [-q "yyyy-mm-dd HH:MM"] [-u HH:MM] [-i <tac-case-id>] [-m "<policy-manager-service>"] [-n <days>] [-h]
-q -- start date and time to set Policy Manager services log level to DEBUG mode
-m -- Policy Manager service name to set log level to DEBUG mode
-u -- duration to set Policy Manager services log level in DEBUG mode
-i -- Aruba TAC Case Id. Should be 10 digits long
-v -- view the schedule for log collection and status of last log collection
-r -- delete the schedule for log collection, use -z option with -r to try force delete
Configuration:
[appadmin@cppm]#dump logs -o -q "2021-06-10 23:25" -u 00:05 -i 1234512345 -m "Radius server" -n 2
[appadmin@cppm]# dump logs -o -v
[appadmin@cppm]# dump logs -o -r
[appadmin@cppm]# dump logs -o -r -z
[appadmin@cppm]# dump logs -o -q "2021-06-10 23:40" -u 00:05 -i 1234512345 -m "Radius server" -m "Policy server" -n 2
- Generated log files can be downloaded from Local Shared Folder:
Verification
[appadmin@cppm]# dump logs -o -q "2021-06-10 23:40" -u 00:05 -i 1234512345 -m "Radius server" -m "Policy server" -n 2
INFO - Scheduled log collection
[appadmin@cppm]# dump logs -o -v
INFO - Log collection scheduled at 10-06-2021 23:40
Set DEBUG log level for duration (HH:MM): 00:05
Affected Policy Manager service(s): Policy server, Radius server
Log collection for (in days): 2
Aruba TAC Case Id: 1234512345
[appadmin@cppm]# dump logs -o -v
INFO - Log collection scheduled at 10-06-2021 23:40
Set DEBUG log level for duration (HH:MM): 00:05
Affected Policy Manager service(s): Policy server,Radius server
Log collection for (in days): 2
Aruba TAC Case Id: 1234512345
Running status: Policy Manager service(s) are set to DEBUG mode
[appadmin@cppm]# dump logs -o -v
INFO - Log collection scheduled at 10-06-2021 23:40
Set DEBUG log level for duration (HH:MM): 00:05
Affected Policy Manager service(s): Radius server
Log collection for (in days): 2
Aruba TAC Case Id: 1234512345
Running status: Log collection started
[appadmin@cppm]# dump logs -o -v
INFO - Log collection is not scheduled
INFO - Last log collection successfull, download log-file: 1234512345_10-06-2021_23-40_00-05.tar.gz from Local Shared Folders