Very nice.
I invented a similar wheel a couple months ago when I discovered a significant inconsistency that occurs in the installed version information. There are several sources to identify version (_status callback, get_probes callback, getrobots, local log files, vesions.txt, installed.pkg, cm_nimbus_robot, cm_nimbus_probe, etc.). And, while Nimsoft isn't an outlier in this regard, any time you have many places the same information is stored it is bound to be wrong at times. I have observed (not proven but observed) three events that confound this - if you downgrade a probe install the version information will get out of sync, if you install a package with a dependency and the install of the dependency fails, the version of the dependency will sometimes be recorded as a successful install, and if you have a package with multiple tabs and the first tab is successful and a subsequent tab is not then the package will get recorded as a successful install.
Because of this, in my tool, I added the additional check where for each installed probe I issued the _status callback and compared that version (the one returned by the running probe) to what discovery_server populated in cm_nimbus_probe.
The results were a little disturbing as I found, across about 7k robots, about 250 cases where the installed version inventory value didn't match the running probe.
Might not be a big deal for some but consider the log4j issue recently where you have to identify the systems that have a probe version with an exploit and you have to ask the question about generating the list of systems that are vulnerable - is a one in 300 probes (250 failures in 7,000 robots with an average of 10 probes) or 1 in 30 affected robots error in the list acceptable? Probably not.
Fixing the inconsistency is a **** matter of redeploying the mismatched probe again (except in the downgrade scenario - there it was necessary to install the latest version).
Back to the tool, a question, how do you deal with version strings like 9.34HF1? Most places in Nimsoft, this data is stored as a number and so the fix number is lost.
Original Message:
Sent: Apr 06, 2022 01:40 AM
From: Luc Christiaens
Subject: Tech Tip: robot/probe version checker and report tool
If there is something common between all clients I visited in the past it is the difficulty they had to have a clear view on what probes and their versions that were installed in their environment.
Via the good old Infrastructure Manager we could drag and drop a new version of a probe, but it was not always easy to see/check the total picture/results.
---
The attached tool, available in Perl source and compiled format, will try to get the highest available version from your LOCAL archive and compare this with the information available from the DB table: cm_nimbus_probe.
Input:
To help you create specific target reports you have several input parameters where you can filter on: origin, hub, robot, probe, os_major_os_minor, user_tag1 and user_tag2

Output:
- html report with in red all robot/probe that have lower versions installed
- PU txt file with commands ready to be executed to upgrade the probes (they are NEVER executed/deployed/upgraded automatically)
This example was run with parameters -ri"robotname" -ex"n"
(-ex"n" is to report also the probes that have a correct version installed)
In the PU txt file you can find:

Doc file is also included in package/attachment
This is a first version, remarks, suggestions, problems and questions are very welcome.