Collector Logs
The Forward Collector provides logging functionality that can help in troubleshooting Connectivity tests as well as Snapshot collections.
The API endpoints referenced in this page are not published in the Forward API docs and are subject to change.
Logs can be retrieved by the following methods:
- via REST API. This method is available for Forward SaaS and Forward Cluster users.
- by archiving the
home/.fwd/logsfolder and transferring the file to Forward tech support. This method is only available for Forward SaaS users. Please refer to this page for more details.
Accessing Collector Logs via APIs
Collector log APIs provide a variety of options, as described below.
Retrieve a list of collector operations
This API endpoint lists collector operations of a network in a human-readable format. Each operation appears on a line, and each entry is ordered by start time in ascending order. The start time and end time of collections are printed both in Unix Time and in formatted date time. The collector operation could be of type collection or connectivity test. In the case of a single-device connectivity test, this API will also print the name of the device being tested.
| via API | GET: "api/networks/<NETWORK_ID>/collections" |
| via URL directly in browser | https://<YOUR_VM_IP>/api/networks/<NETWORK_ID>/collections |
A sample output of this API call:
Collector Operation 684 on network 101, start time 2018-01-12 11:41:06 PST (Unix Time : 1515786066712), finish time 2018-01-12 11:41:24 PST (Unix Time : 1515786084209). Type: COLLECTION.
Collector Operation 685 on network 101, start time 2018-01-12 11:42:23 PST (Unix Time : 1515786143874), finish time 2018-01-12 11:42:48 PST (Unix Time : 1515786168988). Type: CONNECTIVITY_TEST. Devices: cat6k
Retrieve logs for a specific collector operation
There are two options here:
- Retrieve logs by the time range. This API endpoint returns the collection logs taken after a collection start time, which is a required parameter. This API takes the following optional filters:
- a particular device name
- the end time of the collection (logs before the provided end time will be shown)
- the logging level, which can be TRACE, DEBUG, INFO, WARN, ERROR. Specifying a logging level will show all logs in that level and the above level. E.g., if level INFO is specified, all logs with level INFO, WARN, ERROR will be shown.
- The start time and end time in the format of Unix Time.
| via API | GET: "api/networks/<NETWORK_ID>/collections/logs?startTime={startTime}&deviceName={deviceName}&endTime={endTime}&level={level}" |
| via URL directly in browser | https://<YOUR_VM_IP>/api/networks/<NETWORK_ID>/collections/logs?startTime={startTime}&deviceName={deviceName}&endTime={endTime}&level={level} |
- Retrieve logs by the operation ID. This API also takes the following optional filters:
- a particular device name
- the logging level, which can be TRACE, DEBUG, INFO, WARN, ERROR. Specifying a logging level will show all logs in that level and the above level. E.g., if level INFO is specified, all logs with level INFO, WARN, ERROR will be shown.
| via API | GET: "api/networks/<NETWORK_ID>/collections/{operationId}/logs?deviceName={deviceName}&level={level}" |
| via URL directly in browser | https://<YOUR_VM_IP>/api/networks/<NETWORK_ID>/collections/{operationId}/logs?deviceName={deviceName}&level={level} |
Retrieve logs for the last collector operation
- This API returns the logs for the last collection on the specified network. In case of an ongoing collection, it will return the logs which have been saved so far for the current collection. This API takes the following optional filters:
- a particular device name
- the logging level, which can be TRACE, DEBUG, INFO, WARN, ERROR. Specifying a logging level will show all logs in that level and the above level. E.g., if level INFO is specified, all logs with level INFO, WARN, ERROR will be shown.
| via API | GET: "api/networks/<NETWORK_ID>/collections/current/logs?deviceName={deviceName}&level={level}" |
| via URL directly in browser | https://<YOUR_VM_IP>/api/networks/<NETWORK_ID>/collections/current/logs?deviceName={deviceName}&level={level} |
Tail any ongoing collector activity on a network
This API streams the current ongoing collection logs (if any) of the specified network, identified by the network id . It also takes an optional device name filter parameter, which can be used to filter the logs belonging to the device of interest.
| via API | GET: "api/networks/<NETWORK_ID>/collections/logs/tail?deviceName={deviceName}" |
| via URL directly in browser | https://<YOUR_VM_IP>/api/networks/<NETWORK_ID>/collections/logs/tail?deviceName={deviceName} |
The sample collector logs output:
2018-08-22 10:48:06 Z [collector-1278-1] INFO com.forwardnetworks.client.cli.main.FwdCli: Version: 2.0.388
2018-08-22 10:48:06 Z [collector-1278-1] INFO com.forwardnetworks.client.cli.main.FwdCli: BuildNumber: e7bfe25a8eba7eca -- built at 2018-07-17 17:48:07 UTC
2018-08-22 10:48:06 Z [collector-1278-1] INFO com.forwardnetworks.client.cli.main.FwdCli:
Host Info:
Available Processors : 40
Heap Memory Usage-Init : 2116026368
Heap Memory Usage-Used : 1399089296
Heap Memory Usage-Commited : 6895960064
Heap Memory Usage-Max : 28631367680
Non-Heap Memory Usage-Init : 2555904
Non-Heap Memory Usage-Used : 105405008
Non-Heap Memory Usage-Commited : 166133760
Non-Heap Memory Usage-Max : -1
2018-08-22 10:48:06 Z [collector-1278-1] INFO com.forwardnetworks.client.cli.main.FwdCli:
Java System Info:
java.specification.version : 1.8
java.version : 1.8.0_102
os.arch : amd64
java.runtime.version : 1.8.0_102-b14
java.specification.vendor : Oracle Corporation
java.vm.specification.name : Java Virtual Machine Specification
java.vm.vendor : Oracle Corporation
os.version : 3.16.0-4-amd64
java.runtime.name : Java(TM) SE Runtime Environment
java.vm.specification.vendor : Oracle Corporation
java.vm.info : mixed mode
java.specification.name : Java Platform API Specification
java.vendor : Oracle Corporation
java.vm.version : 25.102-b14
java.vm.specification.version : 1.8
java.vm.name : Java HotSpot(TM) 64-Bit Server VM
os.name : Linux
2018-08-22 10:48:06 Z [collector-1278-1] INFO com.forwardnetworks.client.cli.main.FwdCli:
Java VM Arguments:
-Dlogback.configurationFile=logback-client-daemon.xml
2018-08-22 10:48:06 Z [collector-1278-1] INFO com.forwardnetworks.client.j.l: Running snapshot collector ...
2018-08-22 10:48:06 Z [collector-1278-1] INFO r_rrt986-r3tba2-prd: Ssh will be used for collecting rrt986-r3tba2-prd
2018-08-22 10:48:06 Z [collector-1278-1] INFO r_rrt984-r3tba5-prd: Ssh will be used for collecting rrt984-r3tba5-prd
2018-08-22 10:48:06 Z [collect-mgr-0] INFO com.forwardnetworks.client.e.aj: Collection on rrt986-r3tba2-prd started.
2018-08-22 10:48:06 Z [collector-1278-1] INFO r_rrt981-r3tad2-prd: Ssh will be used for collecting rrt981-r3tad2-prd
2018-08-22 10:48:06 Z [collect-mgr-1] INFO com.forwardnetworks.client.e.aj: Collection on rrt984-r3tba5-prd started.
2018-08-22 10:48:06 Z [collect-mgr-2] INFO com.forwardnetworks.client.e.aj: Collection on rrt981-r3tad2-prd started.
2018-08-22 10:48:06 Z [pool-9424-thread-1] INFO r_rrt986-r3tba2-prd: Connecting to 'rrt986-r3tba2-prd' at 178.26.131.120
2018-08-22 10:48:06 Z [collector-1278-1] INFO r_rrt983-r3tba2-prd: Ssh will be used for collecting rrt983-r3tba2-prd
2018-08-22 10:48:06 Z [pool-9426-thread-1] INFO r_rrt981-r3tad2-prd: Connecting to 'rrt981-r3tad2-prd' at 178.26.131.45
------OUTPUT OMITTED FOR BREVITY---------