pandiag.ttl 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; Created By : cybergavin
  3. ; Created On : 13-MAR-2020
  4. ; Description : Quick'n'Dirty TTL script to connect to a PAN firewall and run diagnostics to troubleshoot issues.
  5. ; The diagnostic commands were provided in a TTL by PAN Support and the TTL was modified to include connection and logging.
  6. ; "pause" commands included to allow time for the receipt and processing of commands. May be modified or eliminated as required.
  7. ; USER-DEFINED: Set values for the connection (server/username/password/keyfile) and log directory.
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9. ;
  10. ; Choose one of the following "connect" methods, set values and uncomment.
  11. ;
  12. ;connect 'myserver /ssh /2 /auth=password /user=username /passwd=password'
  13. ;connect 'myserver /ssh /2 /auth=publickey /user=username /passwd=password /keyfile=private-key-file'
  14. ;connect 'myserver /ssh /2 /auth=password /user=username /ask4passwd'
  15. pause 5
  16. sendln 'set cli pager off'
  17. pause 1
  18. sendln 'set cli scripting-mode on'
  19. pause 1
  20. changedir 'S:\pandiag' ; Change directory to store logs
  21. ;
  22. ; Diagnostic loop
  23. ;
  24. :diagloop
  25. gettime logfile "pandiaglog-%Y%m%d-%H.txt"
  26. logopen logfile 0 1
  27. sendln 'show clock'
  28. pause 1
  29. sendln 'show counter global filter delta yes'
  30. pause 1
  31. sendln 'show running resource-monitor ingress-backlogs'
  32. pause 1
  33. sendln 'show running resource-monitor second last 10'
  34. pause 1
  35. logclose
  36. pause 1
  37. goto diagloop