Looking for API to get uptime of Linux based OS machines

Hi All,

I am using a session relevance to form an API query to get details of Uptime property using the below mentioned session relevance and API query:-1:

https://rootservername:52311/api/query?relevance=(names of computers of it, values of it) of results of bes properties whose (name of it = “Uptime - Unix”)

When I add OS of it or operating system of it, the quey produces the result as ‘Operating System’ not defined. Can I have a query to produce the uptime result of machines whose OS contains Linux. Please suggest.

Thank You!!

Hi,

It depends and what data structure you are after and whether you are set on certain properties or not. Based on your query, the easiest way to get it done at the lowest evaluation “cost” is probably to use “operating system” sub-inspector to and structure it like this:

/api/query?relevance=(name of computer of it. operating system of computer of it, values of it) of results of bes properties whose (name of it = "Uptime - Unix")

This will give you the basic/default OS data for the machines. If you are after some custom “Operating System” property with the exact data it contains, then you would need to add a second property query and there is ways to do it but then you have to start balancing between optimization and complexity (the more optimized something is the more complex the session relevance code gets)…

2 Likes

Thanks you Sir, It worked for me. Appreciate your help!!

1 Like