I’m searching for a relevance which will get me the applied patches via rest API on both linux and windows machines.
Here is the input:
server name
KB ids or RHSA ids
After patching process I’m trying to verify whether patches are installed or not in the servers via Bgifix. For example, in server1(windows) if I’ve installed KB123,KB234, I’ll be needing a relevance query to check whether KB123 and KB234 is present in server1 or not.
I went through topics in forum but not able to find the correct relevance for this. Any help is appreciated.
Take a look at this query. This is just for Patches for Windows, but this will pull back the computer name and the fixlet name for all non-relevant fixlets for an endpoint.
( item 0 of it as string & “$x$” &
item 1 of it as string & “$x$” &
item 2 of it as string )
of (
(if (exists Name of Computer of it | false)
then (concatenations “%0A” of (Name of Computer of it as string))
else (“”)),
(if (exists Name of Fixlet of it | false)
then (concatenations “%0A” of (Name of Fixlet of it as string))
else (“”)),
(if (exists Relevant Flag of it | false)
then (concatenations “%0A” of (Relevant Flag of it as string))
else (“”)))
of
results
whose (((Relevant Flag of it = False)))
of bes fixlets
whose (
(name of site of it = “Enterprise Security”))
if (exists wmi) then ((string value of property "HotFixID" of it & " - " & string value of property "InstalledOn" of it) of select objects "HotFixID, InstalledOn from Win32_QuickFixEngineering where HotFixID != 'File 1'" of wmi) as string else ("N/A")