This article applies as of PRTG 22.1.74
Monitoring ITOps Board license expiration with PRTG
We have put together an EXE/Script Advanced sensor that you can use to monitor the license expiration of your ITOps Board.
Requirements
- PRTG Enterprise Monitor 22.1.74 or later
- ITOps Board 2.11.3 or later
- You need a user account that has sufficient rights to the license information in ITOps Board. As of version 3.0.4 this means the user must be a group of the Administrators group
- The probe on which you want to deploy the sensor must be able to reach the ITOps Board instance via HTTP/HTTPS (default port is 59212).
- The probe on which you want to deploy the sensor must run PowerShell version 3 or later.
- The probe on which you want to deploy the sensor must be allowed to run unsigned PowerShell scripts. For further information, refer to the Knowledge Base articles Guide for PowerShell-based custom sensors and PowerShell 32-bit or 64-bit and Execution Policy.
Known limitations
- The sensor will not produce any alerts by default unless it is unable to authenticate and contact the ITOps Board instance altogether or the license is missing/expired. Once the sensor is deployed, we recommend that you set up limits in the channel's settings to get alerted in advance. For example, define a lower error limit when the license is 14 days from expiring. This way, you are notified 2 weeks before it expires. See also the Paessler website: How to set up notifications via the PRTG web interface.
- While in ITOps Board you can have several licenses stored/saved at once (with each license having it's own separate expiry date) only the license listed under "Summary" is actually taken into account for this sensor. Because of this it makes sense to always delete/remove old licenses once you add a new one, so that the summary also references the newest license at any given time.
Sensor creation and usage
1. Download the provided .zip file and extract it under the following path of the desired probe:
C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML |
Please keep in mind that, when extracted, you will end up with two files, one of which will be in a subfolder called include, this is by design.
2. Create a new device in PRTG with the address (FQDN) of the ITOps Board instance that you want to monitor.
3. Now, select Add Sensor. In the search field, enter "Script Advanced" and then select the EXE/Script Advanced sensor from the result list.
4. In the Add Sensor dialog, enter the following:
4.1 The Sensor Name and Tags (optional)
4.2 Under EXE/Script, select Get-ITOpsBoardLicenseExpiry.ps1 from the dropdown list.
4.3 The Parameters should be:
-TargetName '%host' -TargetPort 443 -Username '%windowsdomain\%windowsuser' -Password '%windowspassword' -Timeout 20 |
IMPORTANT: For the % placeholders to work, make sure the settings (Windows credentials, device address) in the parent device in PRTG are correct. We recommend that you use the placeholders but you can also enter any of the values directly if you do not want to work with placeholders. Please also note that while in this example we're working with port 443 the default port for ITOps Board is 59212, so please adjust it accordingly to your setup
Please also note that if your probe does not trust the certificate on the ITOps Board instance, you will also need to add the "-TrustAllCerts" parameter. See Troubleshooting below for details.
4.4 Unless required for other reasons, leave the default Environment, Security Context, and Mutex Name.
4.5 Set the Timeout (Sec.) to 30 seconds. This should be more than enough for the execution.
4.6 The Result Handling should only be enabled if you need to troubleshoot the sensor's execution.
4.7 Disable the inheritance for the Scanning Interval and set it to something more appropriate like 6h or 12h.
Tip: Since we are monitoring the number of days until the expiration, there is no point in querying the license status every 1 or 5 minutes.
4.8 Click Continue to create the sensor.
5. The sensor should display channels and values after one scanning interval. Once this happens, you can adjust the channel limits to your requirements (optional, but necessary to get alerts in a timely fashion).
Resulting sensor
The resulting sensors (after setting limits) will look like the following:
Click to enlarge.
The sensor's settings will look like this:
Click to enlarge.
Troubleshooting
Here is a troubleshooting checklist you can go over if you have issues:
- Check your installed PowerShell version (on the probe) to make sure it meets the minimum requirements. Just enter $PSVersionTable in a PowerShell prompt on the probe that runs the sensor.
- Make sure that the execution of scripts is allowed on the probe that runs the sensor.
- Double-check that the parameters are correct and that the credentials are valid by running the script interactively. When running the script interactively, you can also run the following to get more details about it:
Get-Help .\Get-ITOpsBoardLicenseExpiry.ps1 -Detailed |
Or, for examples:
Get-Help .\Get-ITOpsBoardLicenseExpiry.ps1 -Examples |
- If you are working with an untrusted certificate for ITOps Board or otherwise get the error Exception on Line 90: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel., add the "-TrustAllCerts" parameter to the query. This should only be used when you are unable to query it otherwise as it introduces a security risk. Alternatively, make sure the probe where the sensor runs trusts the certificate used on the target system.
- Make sure that the remote probe can reach ITOps Board on the required port. A proxy may not work here.
- For any other issues: Do not hesitate to contact us by replying to this post or by contacting us via a support ticket. Please also link this Knowledge Base post.
Version history
0.1 | 2022/10 | Initial version (internal only) |
0.9 | 2022/03 | First public version, added documentation, help, examples, additional parameters and more details in case of errors |
0.92 | 2022/03 | Sensor now produces a clearer error when there's no valid/active license on the server. Thanks to user ct for the input/feedback and assistance |
Remarks
- Please understand that we can neither provide in-depth technical support for custom sensors nor can we guarantee that the sensors described in this article will work on your systems. You use all components at your own risk.
- Feel free to further modify this script to monitor other properties, or share it (free of charge) as well.
- The script uses a third-party PowerShell function ConvertFrom-Json2, which is included with the download. Credits of this function go to the original author.
Best regards,
Luciano Lingnau [Paessler]
More
Add comment