Java Process Monitoring

I’ve been tasked to figure out (if this is even possible) which servers need java installed. It’s installed on many servers but I’m doubting it really needs to be. Does anyone have ideas on how to find this out whether by SCOM or maybe something else like Powershell/WMI?

Thanks,

Gary

apparently all I need is get this run on all systems “java.exe -version” and report back the results for each. We are trying to track down Oracle Java versions vs Non Oracle.

Sounds like you need the Community PowerShell MP:

https://squaredup.com/blog/free-powershell-monitoring-management-pack-download-now/

With a little scripting, you can have this for a rule or a monitor (a rule will likely be best, as you don’t want this affecting the health state of a server, as nothing is actually wrong) that runs the script and returns the results, giving you some insight.

You can then pull this into a dashboard via the Alerts tile, or via a SQL query, which can then be shared out to people.

Should be pretty straight forward :slight_smile:

Agree to Jelly. Use the Community PowerShell MP and create an alert rule targeting the Windows Servers.

If I am not mistake applications that require Java have a file extension *.jar.

The following line will list all *.jar files in the current directory.:

Get-ChildItem -Filter *.jar -Recurse

You can create a new attribute in the Authoring Pane of the SCOM Console and use the registry on all Windows Servers as discovery method. Then you check for the existence of a regkey which comes with the Java installation. You can then create a group for these servers or a View in the Monitoring pane. The attribute and the View/Group have to be stored in the same MP.

At the risk of coming across as Mr Grumpy; I’d take a little care with this. I’m not saying don’t use SCOM and don’t use this approach; just have a think about the possible implications first :wink:

  1. Does your company have a strategic solution to software asset management ? If so; why not use that?
  2. SCOM is not an asset management solution. SCCM is the on-premises Microsoft solution for that. SCOM can be used but be aware that once you set that precedent other teams may follow. And it might - depending on what you are doing - have a hit on performance of SCOM and \ or the monitored servers.
  3. Get-Child-Item .... -Recurse can be a dangerous thing to do on the whole filesystem.
  4. If Java does create a registry key then you could (along the same lines as Markus points out) create a class such as JavaInstalled with a property of version and create a registry based discovery which would be lightweight. It wouldn't tell what servers need Java but it would tell you which servers had it installed. And you could then work through these from a security perspective to ensure:
    • Java was required
    • Java was up to date
Create a class and registry based discovery - https://raw.githubusercontent.com/f1point2/SCOMMPFragments/master/ClassAndDiscoveryLocalApplicationAndFilteredRegistryProvider.txt

Create Group - https://raw.githubusercontent.com/f1point2/SCOMMPFragments/master/Group_InstanceGroup_ApplicationServer.txt

If you know the specific registry keys then I can put something together quickly.

Cheers

Graham

Hey Graham. Thanks so much for this. Due to the fact that we do not monitor every single server with SCOM (mod/dev/etc), we just decided to use Lansweeper and SCCM to help pinpoint where it’s installed. The tricky part is finding out if it’s really necessary so we are breaking these up into groups by admins to report back.