Using Relevance to inspect client version

(imported topic written by SarahGalvan)

I want to use the version of the TEM client to base compatibility decisions. So how would I do this in relevance? Is there a way to ask “is this the Red Hat and SUSE Linux version of the TEM Client” or “the Ubuntu / Debian version” without depending on the OS string? Basically using what is installed to base a decision rather than what might be installed because of the OS. A more existential solution since in the end it is the client providing the services.

I have tried “client as string” and “name of client”, but on nix systems that just gives me the path to the executable.

Thank you for helping me with all of these questions. I greatly appreciate it.

(imported comment written by SystemAdmin)

The object is primarily about the client itself, and not the environment that it is running in. You do need to use object but they do have patterns

name of operating system starts with "Linux"
name of operating system starts with "Win"
name of operating system starts with "Mac"

Or if you only need course control, these return a boolean

windows of operating system
unix of operating system
mac of operating system

(imported comment written by SarahGalvan)

The operating system is insufficient. I am interested about the client itself. Particularly which one of these http://support.bigfix.com/install/besclients-nonwindows.html it is. Not all Linux operating systems support the rpm inspector, for example. The support is based on the client so it is the client I want information regarding.

(imported comment written by SystemAdmin)

There may be a way to ask for the agent. I’m not aware of it. Perhaps you can more specifically ask for what your looking for such as:

name of operating system starts with “Linux” and exists rpm (to see if it is Linux and rpm is supported)

exists rpm (is RPM supported)

name of operating system contains “win” (any windows)

exists wmi (to see if wmi is supported)

(imported comment written by SarahGalvan)

name of operating system starts with “Linux” and exists rpm

The above will break on Ubuntu/Debian installs, complaining “The operator ‘rpm’ is not defined.”

(imported comment written by SarahGalvan)

If I can figure out if things like “rpm” exist without producing an error, then my problem would be solved. However, it looks like “exists” doesn’t work in this case. Is there another way to phrase it?

(imported comment written by SystemAdmin)

Yes, it looks convoluted but it does work:

exists true whose (if true then (exists rpm) else false)

(imported comment written by SarahGalvan)

Thank you so much! That was EXACTLY what I was looking for. I am so happy.

How does it work?

(imported comment written by SystemAdmin)

Its a combination of a few items, the combination of the exists and if cause the relevance parsing to turn an error into a false which can me more manageable.

(imported comment written by SarahGalvan)

Is it version specific?

(imported comment written by SystemAdmin)

This should work on any system. Basically if “exists rpm” comes back true the statement will be true. If “exists rpm” comes back with an error, which it should on any system that doesn’t support rpm, it will be false.

You can test it by creating an analysis property to run against all your systems to see how they evaluate and respond to the relevance statement to verify.