AAA, NAC, Guest Access & BYOD

 View Only
last person joined: 21 hours ago 

Clearpass, CPPM, OnBoard, OnGuard, Guest, QuickConnect, AirGroup, IntroSpect

How to schedule ClearPass log collection using CLI

By esupport Unpublished

  
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:

 

  • Example CLI command to schedule a log collection:

 

 [appadmin@cppm]#dump logs -o -q "2021-06-10 23:25" -u 00:05 -i 1234512345 -m "Radius server" -n 2
  • The above command will start collecting logs from "2021-06-10 23:25" and will keep the Radius server service in DEBUG for 5 minutes. Logs would be collected for 2 days if not stopped.

 

  • Example CLI command to check the current schedules:

 

[appadmin@cppm]# dump logs -o -v
  • This also shows the current status of running log collections.

 

  • Example CLI command to delete the log collection schedules (Not running):

 

[appadmin@cppm]# dump logs -o -r 

 

  • Example CLI command to delete running log collection schedule:

 

[appadmin@cppm]# dump logs -o -r -z

 

  • Example CLI command to keep multiple services in DEBUG during log collection:

 

[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

 

0 comments
0 views