BigIP Report Old
Problem this snippet solves:
This codeshare has been deprecated due to a hosting platform corruption. I have moved code and conversation to a new record (on the same original URL) https://devcentral.f5.com/s/articles/bigip-report
can be Overview
This is a script which will generate a report of the BigIP LTM configuration on all your load balancers making it easy to find information and get a comprehensive overview of virtual servers and pools connected to them.
This information is used to relay information to our NOC and developers to give them insight in where things are located and to be able to plan patching and deploys. I also use it myself as a quick way get information or gather data used as a foundation for RFC's, ie get a list of all external virtual servers without compression profiles.
The script has been running on 13 pairs of load balancers, indexing over 1200 virtual servers for several years now and the report is widely used across the company and by many companies and governments across the world.
It's easy to setup and use and only requires guest permissions on your devices.
Demo/Preview
Please note that it takes time to make these so sometimes they're a bit outdated and they only cover one HA pair. However, they still serve the purpose of showing what you can expect from the report.
Interactive demo
http://loadbalancing.se/bigipreportdemo/
Screen shots
The main report:
The device overview:
Certificate details:
How to use this snippet:
This codeshare has been deprecated due to a hosting platform corruption. I have moved code and conversation to a new record (on the same original URL) https://devcentral.f5.com/s/articles/bigip-report
Installation instructions
BigipReport REST
This is the only branch we're updating since middle of 2020 and it supports 12.x and upwards (maybe even 11.6).
Download: https://loadbalancing.se/downloads/bigipreport-v5.5.4.zip
Documentation, installation instructions and troubleshooting: https://loadbalancing.se/bigipreport-rest/
Docker support
This will be the recommended way of running bigipreport in the near future. It's still undergoing testing but it's looking really good so far.
https://loadbalancing.se/2021/01/05/running-bigipreport-on-docker/
BigipReport (Legacy)
Older version of the report that only runs on Windows and is depending on a Powershell plugin originally written by Joe Pruitt (F5).
BigipReport (Stable):
https://loadbalancing.se/downloads/bigipreport-5.3.1.zip
BigipReport (BETA): https://loadbalancing.se/downloads/bigipreport-5.4.0-beta.zip
iControl Snapin: https://loadbalancing.se/downloads/f5-icontrol.zip
Documentation and installation instructions:
https://loadbalancing.se/bigip-report/
Upgrade instructions
Protect the report using APM and active directory
Written by DevCentral member Shann_P:
https://loadbalancing.se/2018/04/08/protecting-bigip-report-behind-an-apm-by-shannon-poole/
Got issues/problems/feedback?
Still have issues? Drop a comment below. We usually reply quite fast. Any bugs found, issues detected or ideas contributed makes the report better for everyone, so it's always appreciated.
---
Also trying out a Discord channel now. You're welcome to hang out with us there:
Code :
85931,86647,90730
Tested this on version:
13.0
- silverem_84897Nimbostratus
Hi I got some error when starting the script:
PS C:\inetpub\wwwroot> .\Bigipreport-4.3.8.ps1 Successfully loaded the config file 2017-04-06 13:02:26 Configuring the console window 2017-04-06 13:02:26 Pre-execution checks 2017-04-06 13:02:26 Mounting The syntax of this command is: NET USE [devicename | *] [\computername\sharename[\volume] [password | *]] [/USER:[domainname]username] [/USER:[dotted domain name]username] [/USER:[username@dotted domain name] [/SMARTCARD] [/SAVECRED] [[/DELETE] | [/PERSISTENT:{YES | NO}]] NET USE {devicename | *} [password | *] /HOME NET USE [/PERSISTENT:{YES | NO}] 2017-04-06 13:02:26 Share could not be mounted 2017-04-06 13:02:26 There were errors during the config file sanity check 2017-04-06 13:02:26 Exiting PS C:\inetpub\wwwroot>
What is wrong with the script?
Rgds
Silvere
Hi Silvere
It looks like the configuration file is not properly populated as the share name does not seem to exist rather than an error in the script itself. Are you writing the file to a separate server from the one that generates the script? Otherwise you can just leave that section as it is in the default configuration file.
Example of a functioning share (replace the details with those in your environment):
\\server.domain.local\sharename$ domain\username yourpassword
/Patrik
- silverem_84897Nimbostratus
Hi The config xml has the following parameters. S I don't know why I get an error
Silvere
Ok, that should work indeed. Let me see if I can replicate the issue.
/Patrik
I've tested the latest version now with minimum configuration and it ran just fine. Could you please tell me your Powershell version?
Example:
$PSVersionTable Name Value ---- ----- PSVersion 5.1.14393.953 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14393.953 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
/Patrik
- silverem_84897Nimbostratus
Ok I see where the problem is, now I use the same powershell version like you but now: 2017-04-07 10:32:56 Writing temporary pools json object to E:\personal\scripts\Bigipreport-4.3.8\json\pools.json.tmp New-Object : Exception calling ".ctor" with "4" argument(s): "Could not find a part of the path 'E:\personal\scripts\Bigipreport-4.3.8\json\pools.json.tmp'."At E:\personal\scripts\Bigipreport-4.3.8\Bigipreport-4.3.8.ps1:1541 char:18 + ... eamWriter = New-Object System.IO.StreamWriter($($Global:poolsjsonpath ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
Exception calling "Write" with "1" argument(s): "Cannot write to a closed TextWriter."At E:\personal\scripts\Bigipreport-4.3.8\Bigipreport-4.3.8.ps1:1542 char:24 + ... eamWriter.Write($($Global:pools | ConvertTo-Json -Compress -Depth 5)) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ObjectDisposedException 2017-04-07 10:32:56 Failed to update the temporary pool json file 2017-04-07 10:32:56 Writing temporary monitor json object to E:\personal\scripts\Bigipreport-4.3.8\json\monitors.json.tmp New-Object : Exception calling ".ctor" with "4" argument(s): "Could not find a part of the path 'E:\personal\scripts\Bigipreport-4.3.8\json\monitors.json.tmp'."At E:\personal\scripts\Bigipreport-4.3.8\Bigipreport-4.3.8.ps1:1552 char:18 + ... eamWriter = New-Object System.IO.StreamWriter($($Global:monitorsjsonp ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand Exception calling "Write" with "1" argument(s): "Cannot write to a closed TextWriter."At E:\personal\scripts\Bigipreport-4.3.8\Bigipreport-4.3.8.ps1:1553 char:24 + ... Writer.Write($($Global:monitors | ConvertTo-Json -Compress -Depth 5)) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi!
This error is due to the defined ReportRoot not containing the HTML content. Check out step number 3 here:
https://loadbalancing.se/bigip-report/Download_the_BigipReport_package
/Patrik
- silverem_84897Nimbostratus
Strange, got the same result 2017-04-07 11:26:05 No iRule links to add to the dropdown 2017-04-07 11:26:05 No iRule definitions to add to the body 2017-04-07 11:26:05 Writing report temporary file to C:\inetpub\wwwroot\default.html.tmp 2017-04-07 11:26:05 Writing temporary pools json object to C:\inetpub\wwwroot\json\pools.json.tmp New-Object : Exception calling ".ctor" with "4" argument(s): "Could not find a part of the path 'C:\inetpub\wwwroot\json\pools.json.tmp'."At C:\inetpub\wwwroot\Bigipreport-4.3.8.ps1:1541 char:18 + ... eamWriter = New-Object System.IO.StreamWriter($($Global:poolsjsonpath ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand Exception calling "Write" with "1" argument(s): "Cannot write to a closed TextWriter."At C:\inetpub\wwwroot\Bigipreport-4.3.8.ps1:1542 char:24 + ... eamWriter.Write($($Global:pools | ConvertTo-Json -Compress -Depth 5)) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ObjectDisposedException 2017-04-07 11:26:05 Failed to update the temporary pool json file 2017-04-07 11:26:05 Writing temporary monitor json object to C:\inetpub\wwwroot\json\monitors.json.tmp New-Object : Exception calling ".ctor" with "4" argument(s): "Could not find a part of the path 'C:\inetpub\wwwroot\json\monitors.json.tmp'."At C:\inetpub\wwwroot\Bigipreport-4.3.8.ps1:1552 char:18 + ... eamWriter = New-Object System.IO.StreamWriter($($Global:monitorsjsonp ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand Exception calling "Write" with "1" argument(s): "Cannot write to a closed TextWriter."At C:\inetpub\wwwroot\Bigipreport-4.3.8.ps1:1553 char:24 + ... Writer.Write($($Global:monitors | ConvertTo-Json -Compress -Depth 5)) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ObjectDisposedException
Confirm that C:\inetpub\wwwroot\json\ exists? Does not look that way from your error message.
/Patrik
And also, that the user running the script has write permissions to that folder.
/Patrik