If you are unfamiliar with Docker this might seem like a daunting task but trust me, it’s the easiest way to get up and running. If you are familiar with Docker and wants to try there’s a guide for deploying the report via Kubernetes.
Please do not that this is still in the testing phase and this post is continously updated. Feedback much welcome.
Table of Contents
Clone the repository and prepare a user
- Get a Linux server with a fairly modern OS
- Install Docker
- Add a local user for bigipreport
sudo adduser bigipreport --shell=/bin/false
- Create a directory, clone the latest version of BigIPReport and set the bigipreport user as owner:
sudo mkdir -p /opt/bigipreport
cd /opt/bigipreport
sudo git clone https://github.com/net-utilities/BigIPReport.git .
sudo chown -R bigipreport:bigipreport /opt/bigipreport
sudo chmod 755 /opt/bigipreport/underlay
Start the frontend
Easiest part to do of them all:
sudo docker run -d \
-v "/opt/bigipreport/underlay:/usr/share/nginx/html:ro" \
--restart unless-stopped \
-p 8080:80 bigipreport/frontend
This runs an mounts the report root to a pre-configured nginx container with compression, support for brotli and microcaching to the nginx config.
Configure and test the data collection
Edit the configuration file /opt/bigipreport/bigipreport.xml and set the Report Root to exactly underlay/ and leave the default document as is.
Then configure the rest of the mandatory configuration (Credentials, Device groups. Look at the examples in the configuration file if unsure. Start with one cluster and add the rest when you have tested the functionality.
Run the container to test your configuration:
sudo docker run --rm -v "/opt/bigipreport:/bigipreport/" bigipreport/data-collector
Verify the script log and look for errors. If all went fine you can visit http://<ip>:8080 on your server.
If the container collected the data and the report looks fine you can add more clusters to the device group config and run the container again until you’re happy. Take a note of how long the longest run took, we’ll need that soon.
If you ran into trouble, try us at Devcentral or Discord.
Schedule a cron job
Create a cron job to run the script at your chosen interval by creating /etc/cron.d/bigireport and putting this content in it (try removing root from the line if it’s not working, worked for CentOS 7, thanks RajeshP):
0 * * * * root /usr/bin/docker run -d --rm -v "/opt/bigipreport:/bigipreport/" bigipreport/data-collector
The example above runs the report once per hour.
I’d advise you to change this interval as often as you can while still letting the job finish (this is where the longest report data collection from before comes in).
To make sense of the cron schedule syntax I’d recommend this page.
I am able to login using ssh and gui using same credentials to this load balancer.
Main error is this statement, and also I tried (https://support.f5.com/csp/article/K43377453) this KB assuming it is a bug on F5, but still same issue. My F5 is running on 14.1.4.1 version.
Error getting auth token from 10.10.10.1 : Authentication failed, see inner exception. (Line 1689, Tries 1)
Below is the complete error output I am getting when running the command.
[root@f5reporting bigipreport]# sudo docker run –rm -v “/opt/bigipreport:/bigipreport/” bigipreport/data-collector
2021-04-16 05:13:23 Successfully loaded the config file: /bigipreport/bigipreportconfig.xml
2021-04-16 05:13:23 Starting: PSCommandPath=/bigipreport/bigipreport.ps1 ConfigurationFile=/bigipreport/bigipreportconfig.xml PollLoadBalancer= Location= PSScriptRoot=/bigipreport
2021-04-16 05:13:23 Pre-execution checks
2021-04-16 05:13:23 Pre execution checks were successful
2021-04-16 05:13:24 Enabling TLS1.2
2021-04-16 05:13:24 Start-Job 10.10.10.1 (1 / 10)
2021-04-16 05:13:25 10.10.10.1:Successfully loaded the config file: /bigipreport/bigipreportconfig.xml
2021-04-16 05:13:25 10.10.10.1:Starting: PSCommandPath= ConfigurationFile=/bigipreport/bigipreportconfig.xml PollLoadBalancer=10.10.10.1 Location=/bigipreport PSScriptRoot=/bigipreport
2021-04-16 05:13:25 10.10.10.1:Pre-execution checks
2021-04-16 05:13:26 10.10.10.1:Pre execution checks were successful
2021-04-16 05:13:26 10.10.10.1:Enabling TLS1.2
2021-04-16 05:13:26 10.10.10.1:Getting data from 10.10.10.1
2021-04-16 05:13:26 10.10.10.1:Error getting auth token from 10.10.10.1 : Authentication failed, see inner exception. (Line 1689, Tries 1)
2021-04-16 05:13:26 10.10.10.1:Error getting auth token from 10.10.10.1 : Authentication failed, see inner exception. (Line 1689, Tries 2)
2021-04-16 05:13:26 10.10.10.1:Error getting auth token from 10.10.10.1 : Authentication failed, see inner exception. (Line 1689, Tries 3)
2021-04-16 05:13:26 10.10.10.1:Error getting auth token from 10.10.10.1 : Authentication failed, see inner exception. (Line 1689, Tries 4)
2021-04-16 05:13:28 Verifying load balancer data to make sure that no load balancer is missing
2021-04-16 05:13:28 10.10.10.1 does not seem to have been indexed
2021-04-16 05:13:28 does not seem to have been indexed
2021-04-16 05:13:28 Missing data from device group containing 10.10.10.1, .
2021-04-16 05:13:28 Missing data, run script with xml and a loadbalancer name for more information
2021-04-16 05:13:28 Missing load balancer data, writing report anyway
InvalidOperation: /bigipreport/bigipreport.ps1:2107
Line |
2107 | $StatsMsg += ” LB:” + $Global:ReportObjects.Values.LoadBalancer.Count
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The property ‘LoadBalancer’ cannot be found on this object.
| Verify that the property exists.
[root@f5reporting bigipreport]#
[root@f5reporting bigipreport]#
We solved the problem via the discord channel and documented the resolution here:
https://loadbalancing.sebigipreport-rest/#Authentication_failed_see_inner_exception