it just works ©2008 bigfix, inc. practical guide to relevance ben kus – 1/31/2008

19
IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

Upload: jasmin-bryan

Post on 04-Jan-2016

224 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

IT Just Works

©2008 BigFix, Inc.

Practical Guide to Relevance

Ben Kus – 1/31/2008

Page 2: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works2

Presentation Goal

• Explain Relevance• Help Relevance beginners get started• Help round out knowledge for more advanced users• Explain some tools and resources• Teach some tips/tricks• Caution against some potential pitfalls

Apr 20, 2023

Page 3: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works3

About Relevance

• Origins of Relevance– Created in 1997– We needed language that could describe computer issues– No other good languages available

• Design Goals– Query-only language – not allowed to change things– Powerful – be able to express very complicated expressions– Cross platform – language shouldn’t be OS dependent– Extensible – add new “inspectors” over time– Easy to read – should be readable by untrained users– Reasonable learning curve – easy things easy, hard things not too

hard (make relevance author’s life as easy as possible)

Apr 20, 2023

Page 4: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works4

Compare Relevance to other Languages

• How does Relevance compare to other languages in terms of the design goals (Ben’s opinion):

Apr 20, 2023

Language Query only

Powerful Cross Platform

Extensible Easy to read

Learning Curve

VBScript No Yes No Yes No Medium

Jscript No Yes Yes Yes No Medium

WMI Sorta Not really No Yes Yes Easy

PERL No Yes Yes Yes No Medium

C++ No Yes Yes Yes No Hard

.INF Yes No Yes No Yes Easy

Relevance Yes Yes Yes Yes Yes Easy

Page 5: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works5

Relevance Attributes

• Relevance queries …– will not change your computers– will try to avoid causing network traffic (if at all possible)– can be “English-like” for easier reading– will generally try to find the most efficient way possible to get the

information– will always try to be “safe” and “standard”

• BigFix spends a lot of time maintaining the Relevance language and inspectors to meet all these goals as much as possible

Apr 20, 2023

Page 6: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works6

Terminology

• Relevance – Language name• Relevance Engine – Engine that processes relevance• Inspectors – “objects” in the Relevance Language

(“operating system”, “rpm”, “ram”, “time”, etc.)• QnA (or “Fixlet Debugger”) – Tool to evaluate relevance• Actionscript – BigFix action language (not Relevance)• Fixlet – Relevance + Action + Description• Property – Relevance query the agent returns

Apr 20, 2023

Page 7: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works7

The Many Uses of Relevance

• BigFix uses Relevance for many reasons:– Retrieve properties from agents– Used in Fixlets / Tasks– Used to define actions and constraints– Customize ClientUI– Used in Dashboards/Wizards (session relevance)– Basis of Custom Reports (session relevance)

Apr 20, 2023

Page 8: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works8

BigFix Inspectors

• Each Inspector is built by BigFix to make it easy for Relevance authors to get information

• There are many, many inspectors for all OSes– file, folder, registry, rpm, wmi, processor, ram, pkgmgr, time, string,

metabase, running application, regapps, dacls, …

• Each inspector is programmed by BigFix to get information through whatever the best mechanism (mostly OS API calls)

• The size of the full inspector guides give a sense of the amount of inspectors:

– Almost 400 pages for Windows– 200+ pages each for Linux, Solaris, HPUX, AIX, Mac

• BigFix Goal:– Continue to make more inspectors to make our customers have more

flexibility and ease of use

Apr 20, 2023

Page 9: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works9

Where to begin?

• BigFix provides Relevance training courses– Company-specific classes available– Regional classes available

• Many people learn Relevance on their own• One key to learning Relevance is the Fixlet Debugger

– http://support.bigfix.com/fixlet/

• Try some basic queries• Steal Relevance and modify it yourself!

– From BigFix Fixlets, Properties, Forum posts, etc.

Apr 20, 2023

Page 10: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works1010

Some Major Forms of Relevance

1. <Property> of <Object>– Q: size of file "c:\boot.ini"– Basic form of relevance

2. if (condition) then ("T") else ("F")– Q: if (exists file "c:\boot.ini) then (size of file "c:\boot.ini) else (0)– Good for analysis or retrieved properties

3. <Property> whose (condition of it) of <Object>– Q: size whose (it > 10) of file "c:\boot.ini"– Filters a list

4. (it) of <Property> of <Object>– Q: (it) of size of file "c:\boot.ini"– Allows for singular treatment of items in a list

Page 11: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works11

Example Fixlet Scenario

• (Example taken directly from forum post)• Problem: Computers need to have folder “C:\Logs”• Need to create a custom Fixlet

– Relevance: check if folder exists– Action: create folder

• Process:– First, need to find Relevance / Actionscript (look at other Fixlets,

experiment, ask on forum, …)– Verify with Fixlet Debugger– Create custom Fixlet and test

Apr 20, 2023

Page 12: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works12

Example Fixlet Scenario – Couple notes…

• Because we were detecting a specific condition and we needed to change something, we used a Fixlet (or Task)

• Fixlet relevance must evaluate to “True” or “False” – errors are equal to “False” for Fixlets

• Action status is determined by the relevance for Fixlets– Fixlets must start as “True” and after the action change to

“False” for the status to change to “Fixed”• If the relevance is still “True”, it will be “Failed”

– Tasks will return “Completed” if the action ran all the lines

Apr 20, 2023

Page 13: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works13

Example Property Scenario

• Problem: Need to find the version of the WMI• Tools

– Look through Fixlet relevance– Use the “inspector search engine”– Use the Fixlet Debugger

• Process:– Need to find the relevance– Refine the relevance using the Fixlet Debugger– Create a custom property in BigFix

Apr 20, 2023

Page 14: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works14

Fixlet Debugger

• The Fixlet Debugger is the most useful tool for a Relevance Author

• There are multiple modes for Fixlet Debugger:– QnA Mode – Q:/A: format that is simple and easy– Single Clause Mode – Helps read large Relevance queries– Graphical Breakdown Mode – Graphical representation of the

Relevance query (very useful for debugging)– Action mode – Test actions (new functionality in Alpha)

• Make sure your version number matches your agent version number

• Pay attention to “Evaluation Times” to make sure no queries run too long (2ms is short.. 1 sec is very long)

Apr 20, 2023

Page 15: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works15

Relevance Building Tools

• Fixlet Debugger– http://support.bigfix.com/fixlet/ – Very useful for testing Relevance/Actionscript

• Inspector Search Engine– http://support.bigfix.com/inspectorsearch/inspector_search.html– Great way to search for Relevance Inspectors– Much easier to use than the full PDF “Inspector Guides”

• BigFix Forum– http://forum.bigfix.com – Post your Relevance questions

Apr 20, 2023

Page 16: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works16

Relevance Building Tools (more…)

• More Guides / Quick References– http://support.bigfix.com/fixlet/

• Action Guide Examples– Easy way to get acquainted with actionscript

• Relevance Error Messages– Help understand those confusing error messages

• Custom Authoring Training Guide– Good place to start if you don’t know any Relevance

• Inspector Guides– All inspectors listed for all supported OSes

• http://support.bigfix.com/bes/misc/retrievedproperties.html – Useful for looking at lots of bits and pieces of relevance

• http://search.bigfix.com!

Apr 20, 2023

Page 17: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works17

What to worry about?

• Relevance is designed to be safe, but you can still cause issues if you aren’t careful:– Relevance that runs too long

• Always check evaluation times• Be careful with WMI

– Relevance that iterates over too many files• Avoid causing too much disk IO

– Descendants of folder, lines of file, etc.– Relevance that causes undesired side-effects

• Be careful with any query that might cause AD traffic– Domain users, security permissions, etc.

Apr 20, 2023

Page 18: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

©2008 BigFix, Inc.

IT Just Works18

What to do when stuck?

• Find ways to get the information outside of BigFix– Is there a file with the info?– Is it in the registry?– Will the WMI help?– Is there an application to run to get the info?

• Once you know how to find the information, getting the relevance right is usually the easier part

• The forum is your friend!

Apr 20, 2023

Page 19: IT Just Works ©2008 BigFix, Inc. Practical Guide to Relevance Ben Kus – 1/31/2008

IT Just Works

©2008 BigFix, Inc.

Questions?

Apr 20, 2023