Uptime of OS relevance

I have this query which pulls bunch of information but when I add “uptime of operating system”. It gives “uptime” is not defined.

relevance_server_list=’((names of it, ids of it,operating systems of it,concatenation “|” of (ip addresses of it as string),( concate
nation “” of substrings separated by “,” of it) of ( last report time of it as string),uptime of operating systems of it ) of members
of bes computer groups whose ( name of it = “Unix Servers All”))’

“The operator “uptime” is not defined.”

The type of relevance you are using above is session relevance, but the uptime of <operating system> inspector is client relevance. In order to return an Uptime value, you’ll have to have an existing BigFix property (either global property, or a property within an analysis) that returns the uptime of the endpoint, then reference it within your session relevance with something like this (though may be a slightly different form depending on your environment - in this case, it will return the value of the ‘CPU’ property):

((names of it, ids of it,operating systems of it,concatenation "|" of (ip addresses of it as string),( concatenation "" of substrings separated by "," of it) of ( last report time of it as string), value of result from (bes property "CPU") of it) of members of bes computer groups whose ( name of it = "Unix Servers All"))

1 Like

Thansk Aram
it works like charm.

server1,1703,Linux Red Hat Enterprise Server 6.6 (2.6.32-754.14.2.el6.x86_64),Fri28Jun201911:07:11-0400,10.221.116.112|10.221.99.49,20days

value of result from (bes property “Uptime”) of it

I tried this relevance where it returns the error ‘Singular expression refers to nonexistent object.’

The relevance is ,
((names of it, ids of it,operating systems of it,concatenation “|” of (ip addresses of it as string),( concatenation “” of substrings separated by “,” of it) of ( last report time of it as string), value of result from (bes property “Uptime”) of it) of bes computers whose ( name of it = “computer name”))

Please help on this.

Break your code into pieces & test which one is creating issue.

What I believe you dont have UPTIME property based on the other question you have posted & thats cause of relevance failure.

Q: ((names of it, ids of it, operating systems of it, concatenation "|" of (ip addresses of it as string), ( concatenation "" of substrings separated by "," of it) of ( last report time of it as string), value of result from (bes property "Uptime in Days") of it) of bes computers whose ( name of it as lowercase = "MY Machines"))
A: My Machine, 4267590, Win2012R2 6.3.9600, 1.2.1.2|1.1.1.1, Fri 27 Aug 2021 05:04:21 -0500, 0

This is the bit which I have & I changed from code -

value of result from (bes property “Uptime in Days”) of it

Apart from it you can do it more safely using below -

Q: ((name of it as string | "Not Reported", id of it as string | "Not Reported", operating system of it as string | "Not Reported", concatenation "|" of (ip addresses of it as string) | "Not Reported", ( concatenation "" of substrings separated by "," of it) of ( last report time of it as string) | "Not Reported", value of result from (bes property "Uptime in Days") of it | "Not Reported") of bes computers whose ( name of it as lowercase = "my machine"))
A: My machine, 4267590, Win2012R2 6.3.9600, 1.2.1.1|1.2.1.1, Fri 27 Aug 2021 05:19:50 -0500, 0

@vk.khurava
When I tried this relevance , it is working fine,

When I add the bes property, it is showing the error as below.

Uptime in Days will only work if you have that RP (column) created/enabled in your BigFix console !!!