Custom Inventory Fields
I see the reference to Custom Inventory Fields under software in computer inventory. Nothing is listed. How do I add custom fields?
The interest is in specifying configuration files to audit under both Windows and Linux platforms.
The interest is in specifying configuration files to audit under both Windows and Linux platforms.
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
jkatkace
15 years ago
If you use one of the boolean functions, which end in "Exists", "LessThan", "GreaterThan", or "Equals", those don't create custom fields. They create custom software inventory items, which show up in Installed Programs if the expression you type in the text area returns "true".
Only functions ending in "Return" will create custom inventory fields, and only if they actually return a value. If they don't, you'll see them in Installed Programs as an indication that the measurement was taken. Not having a value in the Custom Inventory Fields area will indicate that the item measured didn't exist or returned no value.
Only functions ending in "Return" will create custom inventory fields, and only if they actually return a value. If they don't, you'll see them in Installed Programs as an indication that the measurement was taken. Not having a value in the Custom Inventory Fields area will indicate that the item measured didn't exist or returned no value.
Comments:
-
Ah, very simple differentiating explanation....nice. - MichAda 12 years ago
-
Thank you so much for clarifying this! I expected all functions to work the same as the "return" ones and when my boolean "exists" one did not appear like my others I was stumped.
Since you have explained that the boolean ones end up in inventory under Software Titles I am now back in business with my needed smart label. - JS_DC 5 years ago
Posted by:
jkatkace
15 years ago
You add them as custom software inventory items.
Go to Inventory/Software and then click on the "Choose action..." pulldown to "Add New Item".
After you've named the field and filled in the Vendor (probably your own company) and version number, go to Custom Inventory Rule field. There's a gold question mark there that gives you the names of all the functions you can use, and which platforms support which. Here's what that says:
GENERAL INFORMATION
The use of the Custom Inventory Rules is very powerful and you should read the documentation before attempting to configure one of these rules. There are a variety of concerns that should be reviewed before enabling this. The notes here are meant only as a quick syntax reference for the available functions.
FUNCTION SYNTAX
Windows
| Linux
| | Mac OS
| | |
W L M - DirectoryExists(path)
W L M - FileExists(path)
W - FileVersionEquals(path, version)
W - FileVersionLessThan(path, version)
W - FileVersionGreaterThan(path, version)
W - ProductVersionEquals(path, version)
W - ProductVersionLessThan(path, version)
W - ProductVersionGreaterThan(path, version)
W L M - FileInfoGreaterThan(fullpath, attribute, type, value)
W L M - FileInfoLessThan(fullpath, attribute, type, value)
W L M - FileInfoEquals(fullpath, attribute, type, value)
W - RegistryKeyExists(registryPath)
W - RegistryValueEquals(registryPath, valueName, value)
W - RegistryValueLessThan(registryPath, valueName, value)
W - RegistryValueGreaterThan(registryPath, valueName, value)
W L M - EnvironmentVariableExists(var)
L M - EnvironmentVariableGreaterThan(var, type, value)
L M - EnvironmentVariableLessThan(var, type, value)
L M - EnvironmentVariableEquals(var, type, value)
W L M - FilenamesMatchingRegexExist(fullpath,regex)
W L M - FilenamesMatchingRegexGreaterThan(fullpath,regex,value)
W L M - FilenamesMatchingRegexLessThan(fullpath,regex,value)
W L M - FilenamesMatchingRegexEqual(fullpath,regex,value)
W - FilenamesMatchingRegexReturn(fullpath,regex,type)
M - PlistValueExists(fullpath, entry)
M - PlistValueGreaterThan(fullpath, entry, type, value)
M - PlistValueLessThan(fullpath, entry, type, value)
M - PlistValueEquals(fullpath, entry, type, value)
W - RegistryValueReturn(registryPath, name, type)
L M - EnvironmentVariableReturn(var, type)
W L M - FileInfoReturn(path, attribute, type)
L M - FilenamesMatchingRegexReturn (fullpath, regex, type)
W L M - ShellCommandTextReturn(command)
W L M - ShellCommandDateReturn(command)
W L M - ShellCommandNumberReturn(command)
M - PlistValueReturn(fullpath, entry, type)
ARGUMENT NOTES
type can be TEXT, NUMBER, or DATE
attribute on windows can be: Comments, Language , CompanyName, LegalCopyright , FileBuildPart, LegalTrademarks , FileDescription, OriginalFilename , FileMajorPart, PrivateBuild , FileMinorPart, ProductBuildPart , FileName, ProductMajorPart , FilePrivatePart, ProductMinorPart , FileVersion, ProductName , InternalName, ProductPrivatePart , IsDebug, ProductVersion , IsPatclhed, SpecialBuild , IsPreRelease, CreatedDate , IsPrivateBuild, ModifiedDate , IsSpecialBuild, AccessedDate
attribute on unix/OS X can be: device_number, inode, number_links, owner, group, size, access_time, modification_time, creation_time, block_size, blocks
EXAMPLES
FileExists(C:\WINDOWS\notepad.exe)
FileVersionEquals(C:\Program Files\Internet Explorer\iexplore.exe, 6.0.2900.2180)
RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion,CSDVersion,Service Pack 2)
FileExists(/bin/cp)
FileInfoReturn(/etc/hosts, modification_time, DATE)
Go to Inventory/Software and then click on the "Choose action..." pulldown to "Add New Item".
After you've named the field and filled in the Vendor (probably your own company) and version number, go to Custom Inventory Rule field. There's a gold question mark there that gives you the names of all the functions you can use, and which platforms support which. Here's what that says:
GENERAL INFORMATION
The use of the Custom Inventory Rules is very powerful and you should read the documentation before attempting to configure one of these rules. There are a variety of concerns that should be reviewed before enabling this. The notes here are meant only as a quick syntax reference for the available functions.
FUNCTION SYNTAX
Windows
| Linux
| | Mac OS
| | |
W L M - DirectoryExists(path)
W L M - FileExists(path)
W - FileVersionEquals(path, version)
W - FileVersionLessThan(path, version)
W - FileVersionGreaterThan(path, version)
W - ProductVersionEquals(path, version)
W - ProductVersionLessThan(path, version)
W - ProductVersionGreaterThan(path, version)
W L M - FileInfoGreaterThan(fullpath, attribute, type, value)
W L M - FileInfoLessThan(fullpath, attribute, type, value)
W L M - FileInfoEquals(fullpath, attribute, type, value)
W - RegistryKeyExists(registryPath)
W - RegistryValueEquals(registryPath, valueName, value)
W - RegistryValueLessThan(registryPath, valueName, value)
W - RegistryValueGreaterThan(registryPath, valueName, value)
W L M - EnvironmentVariableExists(var)
L M - EnvironmentVariableGreaterThan(var, type, value)
L M - EnvironmentVariableLessThan(var, type, value)
L M - EnvironmentVariableEquals(var, type, value)
W L M - FilenamesMatchingRegexExist(fullpath,regex)
W L M - FilenamesMatchingRegexGreaterThan(fullpath,regex,value)
W L M - FilenamesMatchingRegexLessThan(fullpath,regex,value)
W L M - FilenamesMatchingRegexEqual(fullpath,regex,value)
W - FilenamesMatchingRegexReturn(fullpath,regex,type)
M - PlistValueExists(fullpath, entry)
M - PlistValueGreaterThan(fullpath, entry, type, value)
M - PlistValueLessThan(fullpath, entry, type, value)
M - PlistValueEquals(fullpath, entry, type, value)
W - RegistryValueReturn(registryPath, name, type)
L M - EnvironmentVariableReturn(var, type)
W L M - FileInfoReturn(path, attribute, type)
L M - FilenamesMatchingRegexReturn (fullpath, regex, type)
W L M - ShellCommandTextReturn(command)
W L M - ShellCommandDateReturn(command)
W L M - ShellCommandNumberReturn(command)
M - PlistValueReturn(fullpath, entry, type)
ARGUMENT NOTES
type can be TEXT, NUMBER, or DATE
attribute on windows can be: Comments, Language , CompanyName, LegalCopyright , FileBuildPart, LegalTrademarks , FileDescription, OriginalFilename , FileMajorPart, PrivateBuild , FileMinorPart, ProductBuildPart , FileName, ProductMajorPart , FilePrivatePart, ProductMinorPart , FileVersion, ProductName , InternalName, ProductPrivatePart , IsDebug, ProductVersion , IsPatclhed, SpecialBuild , IsPreRelease, CreatedDate , IsPrivateBuild, ModifiedDate , IsSpecialBuild, AccessedDate
attribute on unix/OS X can be: device_number, inode, number_links, owner, group, size, access_time, modification_time, creation_time, block_size, blocks
EXAMPLES
FileExists(C:\WINDOWS\notepad.exe)
FileVersionEquals(C:\Program Files\Internet Explorer\iexplore.exe, 6.0.2900.2180)
RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion,CSDVersion,Service Pack 2)
FileExists(/bin/cp)
FileInfoReturn(/etc/hosts, modification_time, DATE)
Posted by:
Thaiguy78
15 years ago
Thank you for that information. It is very helpful.
After configuring the custom software package, I have successfully detected that a file exists on the Computer, but it is showing under the "Installed Programs" heading. How do I make it show up under "Custom Inventory Fields?"
Also, is there any way to display the content of a file, or can you only check for its existence?
After configuring the custom software package, I have successfully detected that a file exists on the Computer, but it is showing under the "Installed Programs" heading. How do I make it show up under "Custom Inventory Fields?"
Also, is there any way to display the content of a file, or can you only check for its existence?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.