Practical Guide to Relevance Ben Kus 1312008 IT
Practical Guide to Relevance Ben Kus – 1/31/2008 IT Just Works © 2008 Big. Fix, Inc.
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 October 20 IT Just Works © 2008 Big. Fix, Inc. 2
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) October 20 IT Just Works © 2008 Big. Fix, Inc. 3
Compare Relevance to other systems Language Query only Powerful Cross Platform Extensible Easy to read Learning Curve VBScript No Yes No Medium Jscript No Yes Yes No Medium WMI Sorta Not really No Yes Easy PERL No Yes Yes No Medium C++ No Yes Yes No Hard . INF Yes No Yes Easy Relevance Yes Yes Yes Easy October 20 IT Just Works © 2008 Big. Fix, Inc. 4
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” • Big. Fix spends a lot of time maintaining the Relevance language and inspectors to meet all these goals as much as possible October 20 IT Just Works © 2008 Big. Fix, Inc. 5
Terminology • Relevance – Language name • Relevance Engine – Engine that processes relevance • Inspectors – “objects” in the Relevance Language • • (“operating system”, “rpm”, “ram”, “time”, etc. ) Qn. A (or “Fixlet Debugger”) – Tool to evaluate relevance Actionscript – Big. Fix action language (not Relevance) Fixlet – Relevance + Action + Description Property – Relevance query the agent returns October 20 IT Just Works © 2008 Big. Fix, Inc. 6
The Many Uses of Relevance • Big. Fix uses Relevance for many reasons: – Retrieve properties from agents – Used in Fixlets / Tasks – Used to define actions and constraints – Customize Client. UI – Used in Dashboards/Wizards (session relevance) – Basis of Custom Reports (session relevance) October 20 IT Just Works © 2008 Big. Fix, Inc. 7
Big. Fix Inspectors • • Each Inspector is built by Big. Fix 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 Big. Fix 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 • Big. Fix Goal: – Continue to make more inspectors to make our customers have more flexibility and ease of use October 20 IT Just Works © 2008 Big. Fix, Inc. 8
Where to begin? • Big. Fix 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 Big. Fixlets, Properties, Forum posts, etc. October 20 IT Just Works © 2008 Big. Fix, Inc. 9
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> – – 10 Q: (it) of size of file "c: boot. ini" Allows for singular treatment of items in a list IT Just Works © 2008 Big. Fix, Inc. 10
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 October 20 IT Just Works © 2008 Big. Fix, Inc. 11
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 October 20 IT Just Works © 2008 Big. Fix, Inc. 12
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 Big. Fix October 20 IT Just Works © 2008 Big. Fix, Inc. 13
Fixlet Debugger • The Fixlet Debugger is the most useful tool for a Relevance Author • There are multiple modes for Fixlet Debugger: – Qn. A 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 (2 ms is short. . 1 sec is very long) October 20 IT Just Works © 2008 Big. Fix, Inc. 14
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” • Big. Fix Forum – http: //forum. bigfix. com – Post your Relevance questions October 20 IT Just Works © 2008 Big. Fix, Inc. 15
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! October 20 IT Just Works © 2008 Big. Fix, Inc. 16
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. • October 20 IT Just Works © 2008 Big. Fix, Inc. 17
What to do when stuck? • Find ways to get the information outside of Big. Fix – 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! October 20 IT Just Works © 2008 Big. Fix, Inc. 18
Questions? IT Just Works © 2008 Big. Fix, Inc.
- Slides: 19