I’m trying to create a new property that will report Windows OS or Unix OS into one single field. I get Windows OS to report OK, but get an “” for all my Unix OS machines in my new analysis. Below is the relevance I’m using.
Any thoughts on what I could be doing wrong?
if (name of operating system as string contains “SunOS” or name of operating system as string contains “AIX”) then (name of operating system) else (if ((name of operating system as lowercase contains “linux”) and (exists file “/etc/redhat-release”)) then "Red Hat Enterprise Linux " & parenthesized part 2 of it & ".0 " & parenthesized part 1 of it & " " & parenthesized part 3 of it of match (regex "(AS|ES|WS) release (
0-9
+) ((
^)
*))") of line of file “/etc/redhat-release” else if (exists wmi) then (string value of selects “caption from win32_operatingsystem” of wmi & " " & csd version of operating system) else (“N/A”) )
Also, I notice that when creating a new property within a custom analysis, it creates a new computer property and appears to be a duplicate when using same property name. Is there a way to re-use existing property that has already been created or is this by design?
If you hover your mouse over the “” in the console, what is the error message string it gives? And is it failing for all the AIX, Solaris, Unix, etc?
Certain properties (like OS, Last Report time, Relay, etc) are reserved and cannot be changed. You can create another property with the same name but it will not overwrite the previous property.
I noticed that both Sun and AIX machines report correct OS versions – just the RHE Linux versions report the error. When I hover over the “error” fields, the message is “The expression could not be evaluated for unknown reasons.”
I assume the syntax I’m using to report RHE version is incorrect. I tried using similar syntax used in the “OS - Unix” property…