Overview on How to Create an Ini File Check

I’ll expand on this later.
This page shows a high level overview. There is a detailed step by step example here.

High Level Steps:

  • When you create your own ini file checks you should create your own ini files. This way your checks will not be overwritten during the upgrade process. To ensure that there is never an ini file name clash you may want to prefix your ini files with something that will be unique to you eg your company name, a random number etc.
  • Find the WMI classes relevant to your check by other documentation or simply by browsing the WMI classes
  • Find out what kind of data your WMI Class contains by browsing the WMI class or by running wmic from the command line (use debug mode to find wmic command line examples)
  • Base it on one of the samples or another check. They key here is to find a check that does a similar thing. The most important things that make the checks the same are:
    • Number of WMI queries (samples=). Anything using a RAWDATA class is probably good for samples=2
    • whether the query returns multiple rows and how those rows are displayed (predisplay= and display= vs using lists with createlist=)
    • whether the query limits the rows returned using a WHERE clause eg WHERE Name like "{_arg1}"
    • use of calculated fields (customfield=)
    • creation of lists (createlist=)
  • Refer to the sample check [sample full] in samples.ini to get the complete list of all possible ini settings and their documentation
  • Use debug mode (-d) to watch what your check does