API Documentation¶
insights.core¶
-
class
insights.core.
CommandParser
(context, extra_bad_lines=None)[source]¶ Bases:
insights.core.Parser
This class checks output from the command defined in the spec.
Raises: ContentException
-- When context.content contains a single line and that line contains one of the string in the bad_single_lines or extra_bad_lines list. Or, when context.content contains multiple lines and there is one line contains one of the string in the bad_lines or extra_bad_lines list.-
static
validate_lines
(results, bad_single_lines, bad_lines)[source]¶ This function returns False when:
1. If the `results` is a single line and that line contains one of the string in the `bad_single_lines` list. 2. If the `results` contains multiple lines and there is one line contains one of the string in the `bad_lines` list.
If no bad line is found the function returns True.
Parameters: - results (list) -- The results string of the output from the command defined by the command spec.
- bad_single_lines (list) -- The list of bad lines should be checked only when the result contains a single line.
- bad_lines (list) -- The list of bad lines should be checked only when the result contains multiple lines.
Returns: True for no bad lines or False for bad line found.
Return type: (Boolean)
-
static
-
class
insights.core.
ConfigCombiner
(confs, main_file, include_finder)[source]¶ Bases:
insights.core.ConfigComponent
Base Insights component class for Combiners of configuration files with include directives for supplementary configuration files. httpd and nginx are examples.
-
class
insights.core.
ConfigComponent
[source]¶ Bases:
object
-
directives
¶
-
find_all
(*queries, **kwargs)¶ Finds matching results anywhere in the configuration
-
sections
¶
-
select
(*queries, **kwargs)[source]¶ Given a list of queries, executes those queries against the set of Nodes. A Node has three primary attributes: name (str), attrs ([str|int]), and children ([Node]).
Nodes also have a value attribute that is either the first attribute (in the case of simple directives that only have one), or the string representation of all attributes joined by a single space.
Each positional argument to select represents a query against the name and/or attributes of the corresponding level of the configuration tree. The first argument queries root nodes, the second argument queries children of the root nodes, etc.
An individual query is either a single value or a tuple. A single value queries the name of a Node. A tuple queries the name and the attrs.
So: select(name_predicate) or select((name_predicate, attrs_predicate))
In general, select(pred1, pred2, pred3, …)
If a predicate is a simple value (string or int), an exact match is required for names, and an exact match of any attribute is required for attributes.
Examples: select(“Directory”) queries for all root nodes named Directory.
select(“Directory”, “Options”) queries for all root nodes named Directory that contain at least one child node named Options. Notice the argument positions: Directory is in position 1, and Options is in position 2.
select((“Directory”, “/”)) queries for all root nodes named Directory that contain an attribute exactly matching “/”. Notice this is one argument to select: a 2-tuple with predicates for name and attrs.
If you are only interested in attributes, just pass None for the name predicate in the tuple: select((None, “/”)) will return all root nodes with at least one attribute of “/”
In addition to exact matches, the elements of a query can be functions that accept the value corresponding to their position in the query. A handful of useful functions and boolean operators between them are provided.
select(startswith(“Dir”)) queries for all root nodes with names starting with “Dir”.
select(~startswith(“Dir”)) queries for all root nodes with names not starting with “Dir”.
select(startswith(“Dir”) | startswith(“Ali”)) queries for all root nodes with names starting with “Dir” or “Ali”. The return of | is a single callable passed in the first argument position of select.
select(~startswith(“Dir”) & ~startswith(“Ali”)) queries for all root nodes with names not starting with “Dir” or “Ali”.
If a function is in an attribute position, it is considered True if it returns True for any attribute.
For example, select((None, 80)) often will return the list of one Node [Listen 80]
select((“Directory”, startswith(“/var”))) will return all root nodes named Directory that also have an attribute starting with “/var”
If you know that your selection will only return one element, or you only want the first or last result of the query , pass one=first or one=last.
select((“Directory”, startswith(“/”)), one=last) will return the single root node for the last Directory entry starting with “/”
If instead of the root nodes that match you want the child nodes that caused the match, pass roots=False.
node = select((“Directory”, “/var/www/html”), “Options”, one=last, roots=False) might return the Options node if the Directory for “/var/www/html” was defined and contained an Options Directive. You could then access the attributes with node.attrs. If the query didn’t match anything, it would have returned None.
If you want to slide the query down the branches of the config, pass deep=True to select. That allows you to do conf.select(“Directory”, deep=True, roots=False) and get back all Directory nodes regardless of nesting depth.
conf.select() returns everything.
Available predicates are: & (infix boolean and) | (infix boolean or) ~ (prefix boolean not)
For ints or strings: eq (==) e.g. conf.select(“Directory, (“StartServers”, eq(4))) ge (>=) e.g. conf.select(“Directory, (“StartServers”, ge(4))) gt (>) le (<=) lt (<)
For strings: contains endswith startswith
-
-
class
insights.core.
ConfigParser
(context)[source]¶ Bases:
insights.core.Parser
,insights.core.ConfigComponent
Base Insights component class for Parsers of configuration files.
Raises: SkipComponent
-- When input content is empty.
-
class
insights.core.
ContainerConfigCombiner
(confs, main_file, include_finder, engine, image, container_id)[source]¶ Bases:
insights.core.ConfigCombiner
Base Insights component class for Combiners of container configuration files with include directives for supplementary configuration files. httpd and nginx are examples.
-
conf_path
¶
-
container_id
= None¶ The ID of the container.
Type: str
-
engine
= None¶ The engine provider of the container.
Type: str
-
image
= None¶ The image of the container.
Type: str
-
-
class
insights.core.
ContainerParser
(context)[source]¶ Bases:
insights.core.Parser
A class specifically for container parser, with the “image” name, the engine provider and the container ID on the basis of
Parser
.-
container_id
= None¶ The ID of the container.
Type: str
-
engine
= None¶ The engine provider of the container.
Type: str
-
image
= None¶ The image of the container.
Type: str
-
-
class
insights.core.
FileListing
(context)[source]¶ Bases:
insights.core.Parser
Warning
This class is deprecated and will be removed from 3.5.0. Please use the
insights.parsers.ls.FileListing
instead.Reads a series of concatenated directory listings and turns them into a dictionary of entities by name. Stores all the information for each directory entry for every entry that can be parsed, containing:
- type (one of [bcdlps-])
- permission string including ACL character
- number of links
- owner and group (as given in the listing)
- size, or major and minor number for block and character devices
- date (in the format given in the listing)
- name
- name of linked file, if a symlink
In addition, the raw line is always stored, even if the line doesn’t look like a directory entry.
Also provides a number of other conveniences, such as:
- lists of regular and special files and subdirectory names for each directory, in the order found in the listing
- total blocks allocated to all the entities in this directory
Note
For listings that only contain one directory,
ls
does not output the directory name. The directory is reverse engineered from the path given to the parser by Insights - this assumes the translation of spaces to underscores and ‘/’ to ‘.’ in paths. For example,ls -l /var/www/html
will be translated tols_-l_.var.www.html
. The reverse translation will make mistakes, for example in translating.etc.yum.repos.d
to/etc/yum/repos/d
. Use caution in checking the paths when requesting single directories.Parses the SELinux information if present in the listing. SELinux directory listings contain:
- the type of file
- the permissions block
- the owner and group as given in the directory listing
- the SELinux user, role, type and MLS
- the name, and link destination if it’s a symlink
Sample input data looks like this:
/example_dir:total 20dr-xr-xr-x. 3 0 0 4096 Mar 4 16:19 .-rw-r--r--. 1 0 0 123891 Aug 25 2015 config-3.10.0-229.14.1.el7.x86_64lrwxrwxrwx. 1 0 0 11 Aug 4 2014 menu.lst -> ./grub.confbrw-rw----. 1 0 6 253, 10 Aug 4 16:56 dm-10crw-------. 1 0 0 10, 236 Jul 25 10:00 controlExamples
>>> file_listing <insights.core.FileListing at 0x7f5319407450> >>> '/example_dir' in file_listing True >>> file_listing.dir_contains('/example_dir', 'menu.lst') True >>> dir = file_listing.listing_of('/example_dir') >>> dir['.']['type'] 'd' >>> dir['config-3.10.0-229.14.q.el7.x86_64']['size'] 123891 >>> dir['dm-10']['major'] 253 >>> dir['menu.lst']['link'] './grub.conf'
-
dir_entry
(directory, name)[source]¶ The parsed data for the given entry name in the given directory.
-
files_of
(directory)[source]¶ The list of non-special files (i.e. not block or character files) in the given directory.
-
listing_of
(directory)[source]¶ The listing of this directory, in a dictionary by entry name. All entries contain the original line as is in the ‘raw_entry’ key. Entries that can be parsed then have fields as described in the class description above.
-
parse_content
(content)[source]¶ Called automatically to process the directory listing(s) contained in the content.
-
path_entry
(path)[source]¶ The parsed data given a path, which is separated into its directory and entry name.
-
class
insights.core.
IniConfigFile
(context)[source]¶ Bases:
insights.core.ConfigParser
A class specifically for reading configuration files in ‘ini’ format.
The input file format supported by this class is:
[section 1] key = value ; comment # comment [section 2] key with spaces = value string [section 3] # Must implement parse_content in child class # and pass allow_no_value=True to parent class # to enable keys with no values key_with_no_value
Examples
>>> class MyConfig(IniConfigFile): ... pass >>> content = ''' ... [defaults] ... admin_token = ADMIN ... [program opts] ... memsize = 1024 ... delay = 1.5 ... [logging] ... log = true ... logging level = verbose ... '''.split() >>> my_config = MyConfig(context_wrap(content, path='/etc/myconfig.conf')) >>> 'program opts' in my_config True >>> my_config.sections() ['program opts', 'logging'] >>> my_config.defaults() {'admin_token': 'ADMIN'} >>> my_config.items('program opts') {'memsize': 1024, 'delay': 1.5} >>> my_config.get('logging', 'logging level') 'verbose' >>> my_config.getint('program opts', 'memsize') 1024 >>> my_config.getfloat('program opts', 'delay') 1.5 >>> my_config.getboolean('logging', 'log') True >>> my_config.has_option('logging', 'log') True
-
data
¶ self, it’s for backward compatibility.
Type: Returns Type: obj
-
get
(section, option)[source]¶ Parameters: - section (str) -- The section str to search for.
- option (str) -- The option str to search for.
Returns: Returns the value of the option in the specified section.
Return type: str
-
getboolean
(section, option)[source]¶ Returns: Returns boolean form based on the data from get. Return type: bool
-
getfloat
(section, option)[source]¶ Returns: Returns the float value off the data from get. Return type: float
-
getint
(section, option)[source]¶ Returns: Returns the int value off the data from get. Return type: int
-
has_option
(section, option)[source]¶ Parameters: - section (str) -- The section str to search for.
- option (str) -- The option str to search for.
Returns: Returns weather the option in the section exist.
Return type: bool
-
items
(section)[source]¶ Parameters: section (str) -- The section str to search for. Returns: Returns all of the options in the specified section. Return type: dict
-
-
class
insights.core.
JSONParser
(context)[source]¶ Bases:
insights.core.Parser
,insights.core.LegacyItemAccess
A parser class that reads JSON files. Base your own parser on this.
-
class
insights.core.
LegacyItemAccess
[source]¶ Bases:
object
Mixin class to provide legacy access to
self.data
attribute.Provides expected passthru functionality for classes that still use
self.data
as the primary data structure for all parsed information. Use this as a mixin on parsers that expect these methods to be present as they were previously.Examples
>>> class MyParser(LegacyItemAccess, Parser): ... def parse_content(self, content): ... self.data = {} ... for line in content: ... if 'fact' in line: ... k, v = line.split('=') ... self.data[k.strip()] = v.strip() >>> content = ''' ... # Comment line ... fact1=fact 1 ... fact2=fact 2 ... fact3=fact 3 ... '''.strip() >>> my_parser = MyParser(context_wrap(content, path='/etc/path_to_content/content.conf')) >>> my_parser.data {'fact1': 'fact 1', 'fact2': 'fact 2', 'fact3': 'fact 3'} >>> my_parser.file_path '/etc/path_to_content/content.conf' >>> my_parser.file_name 'content.conf' >>> my_parser['fact1'] 'fact 1' >>> 'fact2' in my_parser True >>> my_parser.get('fact3', default='no fact') 'fact 3'
-
class
insights.core.
LogFileOutput
(context)[source]¶ Bases:
insights.core.Parser
Class for parsing log file content.
Log file content is stored in raw format in the
lines
attribute.Assume the log file content is:
Log file line one Log file line two Log file line three, and more
Examples
>>> class MyLogger(LogFileOutput): ... pass >>> MyLogger.keep_scan('get_one', 'one') >>> MyLogger.keep_scan('get_three_and_more', ['three', 'more']) >>> MyLogger.keep_scan('get_one_or_two', ['one', 'two'], check=any) >>> MyLogger.last_scan('last_line_contains_file', 'file') >>> MyLogger.keep_scan('last_2_lines_contain_file', 'file', num=2, reverse=True) >>> MyLogger.keep_scan('last_3_lines_contain_line_and_t', ['line', 't'], num=3, reverse=True) >>> MyLogger.token_scan('find_more', 'more') >>> MyLogger.token_scan('find_four_and_more', ['four', 'more']) >>> MyLogger.token_scan('find_four_or_more', ['four', 'more'], check=any) >>> my_logger = MyLogger(context_wrap(contents, path='/var/log/mylog')) >>> my_logger.file_path '/var/log/mylog' >>> my_logger.file_name 'mylog' >>> my_logger.get('two') [{'raw_message': 'Log file line two'}] >>> 'line three,' in my_logger True >>> my_logger.get(['three', 'more']) [{'raw_message': 'Log file line three, and more'}] >>> my_logger.lines[0] 'Log file line one' >>> my_logger.get_one [{'raw_message': 'Log file line one'}] >>> my_logger.get_three_and_more == my_logger.get(['three', 'more']) True >>> my_logger.last_line_contains_file {'raw_message': 'Log file line three, and more'} >>> len(my_logger.last_2_lines_contain_file) 2 >>> len(my_logger.last_3_lines_contain_line_and_t) # Only 2 lines contain 'line' and 't' 2 >>> my_logger.find_more True >>> my_logger.find_four_and_more False >>> my_logger.find_four_or_more True
-
lines
¶ List of the lines from the log file content.
Type: list
-
get
(s, check=<built-in function all>, num=None, reverse=False)[source]¶ Returns all lines that contain s anywhere and wrap them in a list of dictionaries. s can be either a single string or a string list. For list, all keywords in the list must be found in each line.
Parameters: - s (str or list) -- one or more strings to search for
- check (func) -- built-in function
all
orany
applied to each line - num (int) -- the number of lines to get,
None
for unlimited - reverse (bool) -- scan start from the head when
False
by default, otherwise start from the tail
Returns: list of dictionaries corresponding to the parsed lines contain the s.
Return type: (list)
Raises: TypeError
-- When s is not a string or a list of strings, or num is not an integer.
-
get_after
(timestamp, s=None)[source]¶ Find all the (available) logs that are after the given time stamp.
If s is not supplied, then all lines are used. Otherwise, only the lines contain the s are used. s can be either a single string or a string list. For list, all keywords in the list must be found in each line.
This method then finds all lines which have a time stamp after the given timestamp. Lines that do not contain a time stamp are considered to be part of the previous line and are therefore included if the last log line was included or excluded otherwise.
Time stamps are recognised by converting the time format into a regular expression which matches the time format in the string. This is then searched for in each line in turn. Only lines with a time stamp matching this expression will trigger the decision to include or exclude lines. Therefore, if the log for some reason does not contain a time stamp that matches this format, no lines will be returned.
The time format is given in
strptime()
format, in the object’stime_format
property. Users of the object should not change this property; instead, the parser should subclassLogFileOutput
and change thetime_format
property.Some logs, regrettably, change time stamps formats across different lines, or change time stamp formats in different versions of the program. In order to accommodate this, the timestamp format can be a list of
strptime()
format strings. These are combined as alternatives in the regular expression, and are given tostrptime
in order. These can also be listed as the values of a dict, e.g.:{'pre_10.1.5': '%y%m%d %H:%M:%S', 'post_10.1.5': '%Y-%m-%d %H:%M:%S'}
Note
Some logs - notably /var/log/messages - do not contain a year in the timestamp. This detected by the absence of a ‘%y’ or ‘%Y’ in the time format. If that year field is absent, the year is assumed to be the year in the given timestamp being sought. Some attempt is made to handle logs with a rollover from December to January, by finding when the log’s timestamp (with current year assumed) is over eleven months (specifically, 330 days) ahead of or behind the timestamp date and shifting that log date by 365 days so that it is more likely to be in the sought range. This paragraph is sponsored by syslog.
Parameters: - timestamp (datetime.datetime) -- lines before this time are ignored.
- s (str or list) -- one or more strings to search for. If not supplied, all available lines are searched.
Yields: dict -- The parsed lines with timestamps after this date in the same format they were supplied. It at least contains the
raw_message
as a key.Raises: ParseException
-- If the format conversion string contains a format that we don’t recognise. In particular, no attempt is made to recognise or parse the time zone or other obscure values like day of year or week of year.
-
classmethod
keep_scan
(result_key, token, check=<built-in function all>, num=None, reverse=False)[source]¶ Define a property that is set to the list of dictionaries of the lines that contain the given token. Uses the get method of the log file.
Parameters: - result_key (str) -- the scanner key to register
- token (str or list) -- one or more strings to search for
- check (func) -- built-in function
all
orany
applied to each line - num (int) -- the number of lines to get,
None
for unlimited - reverse (bool) -- scan start from the head when
False
by default, otherwise start from the tail
Returns: list of dictionaries corresponding to the parsed lines contain the token.
Return type: (list)
-
classmethod
last_scan
(result_key, token, check=<built-in function all>)[source]¶ Define a property that is set to the dictionary of the last line that contains the given token. Uses the get method of the log file.
Parameters: - result_key (str) -- the scanner key to register
- token (str or list) -- one or more strings to search for
- check (func) -- built-in function
all
orany
applied to each line
Returns: dictionary corresponding to the last parsed line contains the token.
Return type: (dict)
-
parse_content
(content)[source]¶ Use all the defined scanners to search the log file, setting the properties defined in the scanner.
-
classmethod
scan
(result_key, func)[source]¶ Define computed fields based on a string to “grep for”. This is preferred to utilizing raw log lines in plugins because computed fields will be serialized, whereas raw log lines will not.
Raises: ValueError
-- When result_key is already a registered scanner key.
-
scanner_keys
= {}¶
-
scanners
= []¶
-
time_format
= '%Y-%m-%d %H:%M:%S'¶ The timestamp format assumed for the log files. A subclass can override this for files that have a different timestamp format. This can be:
- A string in strptime() format.
- A list of strptime() strings.
- A dictionary with each item’s value being a strptime() string. This allows the item keys to provide some form of documentation.
- A None value when there is no timestamp info in the log file
-
classmethod
token_scan
(result_key, token, check=<built-in function all>)[source]¶ Define a property that is set to true if the given token is found in the log file. Uses the __contains__ method of the log file.
Parameters: - result_key (str) -- the scanner key to register
- token (str or list) -- one or more strings to search for
- check (func) -- built-in function
all
orany
applied to each line
Returns: the property will contain True if a line contained (any or all) of the tokens given.
Return type: (bool)
-
-
class
insights.core.
Parser
(context)[source]¶ Bases:
object
Base class designed to be subclassed by parsers.
The framework will construct your object with a Context that will provide at least the content as an interable of lines and the path that the content was retrieved from.
Facts should be exposed as instance members where applicable. For example:
self.fact = "123"
Examples
>>> class MyParser(Parser): ... def parse_content(self, content): ... self.facts = [] ... for line in content: ... if 'fact' in line: ... self.facts.append(line) >>> content = ''' ... # Comment line ... fact=fact 1 ... fact=fact 2 ... fact=fact 3 ... '''.strip() >>> my_parser = MyParser(context_wrap(content, path='/etc/path_to_content/content.conf')) >>> my_parser.facts ['fact=fact 1', 'fact=fact 2', 'fact=fact 3'] >>> my_parser.file_path '/etc/path_to_content/content.conf' >>> my_parser.file_name 'content.conf'
-
file_name
= None¶ Filename portion of the input file.
Type: str
-
file_path
= None¶ Full context path of the input file.
Type: str
-
-
class
insights.core.
Scannable
(*args, **kwargs)[source]¶ Bases:
insights.core.Parser
A class to enable early and easy collection of data in a file.
The Scannable class makes it easy to collect two common types of information from a data file:
- A flag to indicate that the data contains one or more lines with a given string.
- a list of lines containing a given string.
To create a parser from the Scannable parser class, the main job is to override the parse() method, returning your choice of data structure to represent the information in the file. This takes the form of a generator that yields structures for users of your parser. You can yield more than object per line, or you can condense multiple lines into one object. Each object is then scanned with all the defined scanners for this class.
How does that work? Well, the individual rules using your parser will use the any() and collect() methods on the class object itself to set up new attributes of the class that will be given values based on the results of a function that checks each object from your parser for the properties it’s looking for. That’s pretty vague, so let’s give some examples - imagine a parser defined as:
- class AnacondaLog(Scannable):
- pass
(Which uses the default parse() function that simply yields each line in turn.) A rule using this parser then does:
- def warnings(line):
- return line if ‘WARNING’ in line
- def has_fcoe_edd(line):
- return ‘/usr/libexec/fcoe/fcoe_edd.sh’ in line
AnacondaLog.any(‘has_fcoe’, has_fcoe_edd) AnacondaLog.collect(‘warnings’, warnings)
These then act in the following way:
- When an object is instantiated from the AnacondaLog class, it will have the ‘has_fcoe’ attribute. This will be set to True if ‘/usr/libexec/fcoe/fcoe_edd.sh’ was found in any line in the file, or False otherwise.
- When an object is instantiated from the AnacondaLog class, it will have the ‘warnings’ attribute. This will be a list containing all the lines found.
Users of your class can supply any function to either any() or collect(). Functions given to collect() can return anything they want to be collected - if they return something that evaluates to False then nothing is collected (so avoid returning empty lists, empty dicts, empty strings or False).
-
classmethod
any
(result_key, func)[source]¶ Sets the result_key to the output of func if func ever returns truthy
-
classmethod
collect
(result_key, func)[source]¶ Sets the result_key to an iterable of objects for which func(obj) returns True
-
parse
(content)[source]¶ Default ‘parsing’ method. Subclasses should override this method with their own custom parsing as necessary.
-
scanner_keys
= {}¶
-
scanners
= []¶
-
class
insights.core.
StreamParser
(context)[source]¶ Bases:
insights.core.Parser
Parsers that don’t have to store lines or look back in the data stream should implement StreamParser instead of Parser as it is more memory efficient. The only difference between StreamParser and Parser is that StreamParser.parse_content will receive a generator instead of a list.
-
class
insights.core.
SysconfigOptions
(context)[source]¶ Bases:
insights.core.Parser
,insights.core.LegacyItemAccess
A parser to handle the standard ‘keyword=value’ format of files in the
/etc/sysconfig
directory. These are provided in the standard ‘data’ dictionary.Examples
>>> 'OPTIONS' in ntpconf True >>> 'NOT_SET' in ntpconf False >>> 'COMMENTED_OUT' in ntpconf False >>> ntpconf['OPTIONS'] '-x -g'
For common variables such as OPTIONS, it is recommended to set a specific property in the subclass that fetches this option with a fallback to a default value.
Example subclass:
class DirsrvSysconfig(SysconfigOptions): @property def options(self): return self.data.get('OPTIONS', '')
-
class
insights.core.
Syslog
(context)[source]¶ Bases:
insights.core.LogFileOutput
Class for parsing syslog file content.
The important function is
get(s)()
, which finds all lines with the string s and parses them into dictionaries with the following keys:- timestamp - the time the log line was written
- procname - the process or facility that wrote the line
- hostname - the host that generated the log line
- message - the rest of the message (after the process name)
- raw_message - the raw message before being split.
It is best to use filters and/or scanners with the messages log, to speed up parsing. These work on the raw message, before being parsed.
Sample log lines:
May 9 15:13:34 lxc-rhel68-sat56 jabberd/sm[11057]: session started: jid=rhn-dispatcher-sat@lxc-rhel6-sat56.redhat.com/superclient May 9 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon May 9 15:13:36 lxc-rhel68-sat56 wrapper[11375]: Launching a JVM... May 10 15:24:28 lxc-rhel68-sat56 yum[11597]: Installed: lynx-2.8.6-27.el6.x86_64 May 10 15:36:19 lxc-rhel68-sat56 yum[11954]: Updated: sos-3.2-40.el6.noarch
Examples
>>> Syslog.token_scan('daemon_start', 'Wrapper Started as Daemon') >>> Syslog.token_scan('yum_updated', ['yum', 'Updated']) >>> Syslog.keep_scan('yum_lines', 'yum') >>> Syslog.keep_scan('yum_installed_lines', ['yum', 'Installed']) >>> syslog.get('wrapper')[0] {'timestamp': 'May 9 15:13:36', 'hostname': 'lxc-rhel68-sat56', 'procname': wrapper[11375]', 'message': '--> Wrapper Started as Daemon', 'raw_message': 'May 9 15:13:36 lxc-rhel68-sat56 wrapper[11375]: --> Wrapper Started as Daemon' } >>> syslog.daemon_start True >>> syslog.yum_updated True >>> len(syslog.yum_lines) 2 >>> len(syslog.yum_updated_lines) 1
Note
Because syslog timestamps by default have no year, the year of the logs will be inferred from the year in your timestamp. This will also work around December/January crossovers.
-
get_logs_by_procname
(proc)[source]¶ Parameters: proc (str) -- The process or facility that you’re looking for Yields: (dict) -- The parsed syslog messages produced by that process or facility
-
scanner_keys
= {}¶
-
scanners
= []¶
-
time_format
= '%b %d %H:%M:%S'¶
-
class
insights.core.
XMLParser
(context)[source]¶ Bases:
insights.core.LegacyItemAccess
,insights.core.Parser
A parser class that reads XML files. Base your own parser on this.
Examples
>>> content = ''' ... <?xml version="1.0"?> ... <data xmlns:fictional="http://characters.example.com" ... xmlns="http://people.example.com"> ... <country name="Liechtenstein"> ... <rank updated="yes">2</rank> ... <year>2008</year> ... <gdppc>141100</gdppc> ... <neighbor name="Austria" direction="E"/> ... <neighbor name="Switzerland" direction="W"/> ... </country> ... <country name="Singapore"> ... <rank updated="yes">5</rank> ... <year>2011</year> ... <gdppc>59900</gdppc> ... <neighbor name="Malaysia" direction="N"/> ... </country> ... <country name="Panama"> ... <rank>68</rank> ... <year>2011</year> ... <gdppc>13600</gdppc> ... <neighbor name="Costa Rica" direction="W"/> ... </country> ... </data> ... '''.strip() >>> xml_parser = XMLParser(context_wrap(content)) >>> xml_parser.xmlns 'http://people.example.com' >>> xml_parser.get_elements(".")[0].tag # Top-level elements 'data' >>> len(xml_parser.get_elements("./country/neighbor", None)) # All 'neighbor' grand-children of 'country' children of the top-level elements 3 >>> len(xml_parser.get_elements(".//year/..[@name='Singapore']")[0]) # Nodes with name='Singapore' that have a 'year' child 1 >>> xml_parser.get_elements(".//*[@name='Singapore']/year")[0].text # 'year' nodes that are children of nodes with name='Singapore' '2011' >>> xml_parser.get_elements(".//neighbor[2]", "http://people.example.com")[0].get('name') # All 'neighbor' nodes that are the second child of their parent 'Switzerland'
-
raw
¶ raw XML content
Type: str
-
dom
¶ Root element of parsed XML file
Type: Element
-
xmlns
¶ The default XML namespace, an empty string when no namespace is declared.
Type: str
-
data
¶ All required specific properties can be included in data.
Type: dict
-
get_elements
(element, xmlns=None)[source]¶ Return a list of elements those match the searching condition. If the XML input has namespaces, elements and attributes with prefixes in the form prefix:sometag get expanded to {namespace}element where the prefix is replaced by the full URI. Also, if there is a default namespace, that full URI gets prepended to all of the non-prefixed tags. Element names can contain letters, digits, hyphens, underscores, and periods. But element names must start with a letter or underscore. Here the while-clause is to set searching condition from /element1/element2 to /{namespace}element1/{namespace}/element2
Parameters: - element -- Searching condition to search certain elements in an XML file. For more details about how to set searching condition, refer to section 19.7.2.1. Example and 19.7.2.2. Supported XPath syntax in https://docs.python.org/2/library/xml.etree.elementtree.html
- xmlns -- XML namespace, default value to None. None means that xmlns equals to the self.xmlns (default namespace) instead of “” all the time. Only string type parameter (including “”) will be regarded as a valid xml namespace.
Returns: List of elements those match the searching condition
Return type: (list)
-
parse_content
(content)[source]¶ All child classes inherit this function to parse XML file automatically. It will call the function
parse_dom()
by default to parser all necessary data todata
and thexmlns
(the default namespace) is ready for this function.
-
-
class
insights.core.
YAMLParser
(context)[source]¶ Bases:
insights.core.Parser
,insights.core.LegacyItemAccess
A parser class that reads YAML files. Base your own parser on this.
insights.core.context¶
-
class
insights.core.context.
Docker
(role=None)[source]¶ Bases:
insights.core.context.MultiNodeProduct
-
name
= 'docker'¶
-
parent_type
= 'host'¶
-
-
class
insights.core.context.
ExecutionContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
object
-
check_output
(cmd, timeout=None, keep_rc=False, env=None, signum=None)[source]¶ Subclasses can override to provide special environment setup, command prefixes, etc.
-
marker
= None¶
-
-
class
insights.core.context.
ExecutionContextMeta
(name, bases, dct)[source]¶ Bases:
type
-
registry
= [<class 'insights.core.context.HostContext'>, <class 'insights.core.context.HostArchiveContext'>, <class 'insights.core.context.SerializedArchiveContext'>, <class 'insights.core.context.SosArchiveContext'>, <class 'insights.core.context.ClusterArchiveContext'>, <class 'insights.core.context.DockerImageContext'>, <class 'insights.core.context.JBossContext'>, <class 'insights.core.context.JDRContext'>, <class 'insights.core.context.InsightsOperatorContext'>, <class 'insights.core.context.MustGatherContext'>, <class 'insights.core.context.OpenStackContext'>]¶
-
-
class
insights.core.context.
HostArchiveContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
insights.core.context.ExecutionContext
-
marker
= 'insights_commands'¶
-
-
class
insights.core.context.
InsightsOperatorContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
insights.core.context.ExecutionContext
Recognizes insights-operator archives
-
marker
= 'config/featuregate'¶
-
-
class
insights.core.context.
JDRContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
insights.core.context.ExecutionContext
-
marker
= 'JBOSS_HOME'¶
-
-
class
insights.core.context.
MustGatherContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
insights.core.context.ExecutionContext
Recognizes must-gather archives
-
marker
= 'cluster-scoped-resources'¶
-
-
class
insights.core.context.
OSP
(role=None)[source]¶ Bases:
insights.core.context.MultiNodeProduct
-
name
= 'osp'¶
-
parent_type
= 'Director'¶
-
-
class
insights.core.context.
RHEL
(version=['-1', '-1'], release=None)[source]¶ Bases:
object
-
name
= 'rhel'¶
-
-
class
insights.core.context.
RHEV
(role=None)[source]¶ Bases:
insights.core.context.MultiNodeProduct
-
name
= 'rhev'¶
-
parent_type
= 'Manager'¶
-
-
class
insights.core.context.
SerializedArchiveContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
insights.core.context.ExecutionContext
-
marker
= 'insights_archive.txt'¶
-
-
class
insights.core.context.
SosArchiveContext
(root='/', timeout=None, all_files=None)[source]¶ Bases:
insights.core.context.ExecutionContext
-
marker
= 'sos_commands'¶
-
insights.core.dr¶
This module implements an inversion of control framework. It allows dependencies among functions and classes to be declared with decorators and the resulting dependency graphs to be executed.
A decorator used to declare dependencies is called a ComponentType
, a
decorated function or class is called a component, and a collection of
interdependent components is called a graph.
In the example below, needs
is a ComponentType
, one
, two
,
and add
are components, and the relationship formed by their dependencies
is a graph.
from insights import dr class needs(dr.ComponentType): pass @needs() def one(): return 1 @needs() def two(): return 2 @needs(one, two) def add(a, b): return a + b results = dr.run(add)
Once all components have been imported, the graphs they form can be run. To
execute a graph, dr
sorts its components into an order that guarantees
dependencies are tried before dependents. Components that raise exceptions are
considered invalid, and their dependents will not be executed. If a component
is skipped because of a missing dependency, its dependents also will not be
executed.
During evaluation, results are accumulated into an object called a
Broker
, which is just a fancy dictionary. Brokers can be inspected
after a run for results, exceptions, tracebacks, and execution times. You also
can register callbacks with a broker that get invoked after the attempted
execution of every component, so you can inspect it during an evaluation
instead of at the end.
-
class
insights.core.dr.
Broker
(seed_broker=None)[source]¶ Bases:
object
The Broker is a fancy dictionary that keeps up with component instances as a graph is evaluated. It’s the state of the evaluation. Once a graph has executed, the broker will contain everything about the evaluation: component instances, timings, exceptions, and tracebacks.
You can either inspect the broker at the end of an evaluation, or you can register callbacks with it, and they’ll get invoked after each component is called.
-
instances
¶ the component instances with components as keys.
Type: dict
-
missing_requirements
¶ components that didn’t have their dependencies met. Values are a two-tuple. The first element is the list of required dependencies that were missing. The second element is the list of “at least one” dependencies that were missing. For more information on dependency types, see the
ComponentType
docs.Type: dict
-
exceptions
¶ Components that raise any type of exception except
SkipComponent
during evaluation. The key is the component, and the value is a list of exceptions. It’s a list because some components produce multiple instances.Type: defaultdict(list)
-
tracebacks
¶ keys are exceptions and values are their text tracebacks.
Type: dict
-
exec_times
¶ component -> float dictionary where values are the number of seconds the component took to execute. Calculated using
time.time()
. For components that produce multiple instances, the execution time here is the sum of their individual execution times.Type: dict
-
store_skips
¶ Weather to store skips in the broker or not.
Type: bool
-
add_observer
(o, component_type=<class 'insights.core.dr.ComponentType'>)[source]¶ Add a callback that will get invoked after each component is called.
Parameters: o (func) -- the callback function Keyword Arguments: component_type (ComponentType) -- the ComponentType
to observe. The callback will fire any time an instance of the class or its subclasses is invoked.The callback should look like this:
def callback(comp, broker): value = broker.get(comp) # do something with value pass
-
get_by_type
(_type)[source]¶ Return all of the instances of
ComponentType
_type
.
-
observer
(component_type=<class 'insights.core.dr.ComponentType'>)[source]¶ You can use
@broker.observer()
as a decorator to your callback instead ofBroker.add_observer()
.
-
-
insights.core.dr.
add_observer
(o, component_type=<class 'insights.core.dr.ComponentType'>)[source]¶ Add a callback that will get invoked after each component is called.
Parameters: o (func) -- the callback function Keyword Arguments: component_type (ComponentType) -- the ComponentType
to observe. The callback will fire any time an instance of the class or its subclasses is invoked.The callback should look like this:
def callback(comp, broker): value = broker.get(comp) # do something with value pass
-
insights.core.dr.
get_component
(name)[source]¶ Returns the class or function specified, importing it if necessary.
-
insights.core.dr.
get_component_by_name
(name)[source]¶ Look up a component by its fully qualified name. Return None if the component hasn’t been loaded.
-
insights.core.dr.
get_dependency_graph
(component)[source]¶ Generate a component’s graph of dependencies, which can be passed to
run()
orrun_incremental()
.
-
insights.core.dr.
get_dependency_specs
(component)[source]¶ Get the dependency specs of the specified component. Only requires and at_least_one specs will be returned. The optional specs is not considered in this function.
Parameters: component (callable) -- The component to check. The component must already be loaded. Returns: The requires and at_least_one spec sets of the component. Return type: list The return list is in the following format:
[ requires_1, requires_2, (at_least_one_11, at_least_one_12), (at_least_one_21, [req_alo22, (alo_23, alo_24)]), ] Note: - The 'requires_1' and 'requires_2' are `requires` specs. Each of them are required. - The 'at_least_one_11' and 'at_least_one_12' are `at_least_one` specs in the same at least one set. At least one of them is required - The 'alo_23' and 'alo_24' are `at_least_one` specs and together with the 'req_alo22' are `requires` for the sub-set. This sub-set specs and the 'at_least_one_21' are `at_least_one` specs in the same at least one set.
-
insights.core.dr.
get_links
(component)[source]¶ Return the dictionary of links associated with the component. Defaults to
dict()
.
-
insights.core.dr.
get_metadata
(component)[source]¶ Return any metadata dictionary associated with the component. Defaults to an empty dictionary.
-
insights.core.dr.
get_name
(component)[source]¶ Attempt to get the string name of component, including module and class if applicable.
-
insights.core.dr.
get_registry_points
(component)[source]¶ Loop through the dependency graph to identify the corresponding spec registry points for the component. This is primarily used by datasources and returns a set. In most cases only one registry point will be included in the set, but in some cases more than one.
Parameters: component (callable) -- The component object Returns: A list of the registry points found. Return type: (set)
-
insights.core.dr.
get_subgraphs
(graph=None)[source]¶ Given a graph of possibly disconnected components, generate all graphs of connected components. graph is a dictionary of dependencies. Keys are components, and values are sets of components on which they depend.
Return the set of tags associated with the component. Defaults to
set()
.
-
insights.core.dr.
is_enabled
(component)[source]¶ Check to see if a component is enabled.
Parameters: component (callable) -- The component to check. The component must already be loaded. Returns: True if the component is enabled. False otherwise.
-
insights.core.dr.
load_components
(*paths, **kwargs)[source]¶ Loads all components on the paths. Each path should be a package or module. All components beneath a path are loaded.
Parameters: paths (str) -- A package or module to load
Keyword Arguments: - include (str) -- A regular expression of packages and modules to include. Defaults to ‘.*’
- exclude (str) -- A regular expression of packges and modules to exclude. Defaults to ‘test’
- continue_on_error (bool) -- If True, continue importing even if something raises an ImportError. If False, raise the first ImportError.
Returns: The total number of modules loaded.
Return type: int
Raises: ImportError
-
insights.core.dr.
observer
(component_type=<class 'insights.core.dr.ComponentType'>)[source]¶ You can use
@broker.observer()
as a decorator to your callback instead ofadd_observer()
.
-
insights.core.dr.
run
(components=None, broker=None)[source]¶ Executes components in an order that satisfies their dependency relationships.
Keyword Arguments: - components -- Can be one of a dependency graph, a single component, a component group, or a component type. If it’s anything other than a dependency graph, the appropriate graph is built for you and before evaluation.
- broker (Broker) -- Optionally pass a broker to use for evaluation. One is created by default, but it’s often useful to seed a broker with an initial dependency.
Returns: The broker after evaluation.
Return type:
-
insights.core.dr.
run_components
(ordered_components, components, broker)[source]¶ Runs a list of preordered components using the provided broker.
This function allows callers to order components themselves and cache the result so they don’t incur the toposort overhead on every run.
-
insights.core.dr.
run_incremental
(components=None, broker=None)[source]¶ Executes components in an order that satisfies their dependency relationships. Disjoint subgraphs are executed one at a time and a broker containing the results for each is yielded. If a broker is passed here, its instances are used to seed the broker used to hold state for each sub graph.
Keyword Arguments: - components -- Can be one of a dependency graph, a single component, a component group, or a component type. If it’s anything other than a dependency graph, the appropriate graph is built for you and before evaluation.
- broker (Broker) -- Optionally pass a broker to use for evaluation. One is created by default, but it’s often useful to seed a broker with an initial dependency.
Yields: Broker -- the broker used to evaluate each subgraph.
-
insights.core.dr.
run_order
(graph)[source]¶ Returns components in an order that satisfies their dependency relationships.
-
insights.core.dr.
set_enabled
(component, enabled=True)[source]¶ Enable a component for evaluation. If set to False, the component is skipped, and all components that require it will not execute.
If component is a fully qualified name string of a callable object instead of the callable object itself, the component’s module is loaded as a side effect of calling this function.
Parameters: - component (str or callable) -- fully qualified name of the component or the component object itself.
- enabled (bool) -- whether the component is enabled for evaluation.
Returns: None
-
insights.core.dr.
walk_dependencies
(root, visitor)[source]¶ Call visitor on root and all dependencies reachable from it in breadth first order.
Parameters: - root (component) -- component function or class
- visitor (function) -- signature is func(component, parent). The call on root is visitor(root, None).
-
class
insights.core.dr.
ComponentType
(*deps, **kwargs)[source]¶ ComponentType is the base class for all component type decorators.
For Example:
class my_component_type(ComponentType): pass @my_component_type(SshDConfig, InstalledRpms, [ChkConfig, UnitFiles], optional=[IPTables, IpAddr]) def my_func(sshd_config, installed_rpms, chk_config, unit_files, ip_tables, ip_addr): return installed_rpms.newest("bash")
Notice that the arguments to
my_func
correspond to the dependencies in the@my_component_type
and are in the same order.When used, a
my_component_type
instance is created whose__init__
gets passed dependencies and whose__call__
gets passed the component to run if dependencies are met.Parameters to the decorator have these forms:
Criteria Example Decorator Arguments Description Required SshDConfig, InstalledRpms
A regular argument At Least One [ChkConfig, UnitFiles]
An argument as a list Optional optional=[IPTables, IpAddr]
A list following optional= If a parameter is required, the value provided for it is guaranteed not to be
None
. In the example above,sshd_config
andinstalled_rpms
will not beNone
.At least one of the arguments to parameters of an “at least one” list will not be
None
. In the example, either or both ofchk_config
and unit_files will not beNone
.Any or all arguments for optional parameters may be
None
.The following keyword arguments may be passed to the decorator:
-
requires
¶ a list of components that all components decorated with this type will implicitly require. Additional components passed to the decorator will be appended to this list.
Type: list
-
optional
¶ a list of components that all components decorated with this type will implicitly depend on optionally. Additional components passed as
optional
to the decorator will be appended to this list.Type: list
-
metadata
¶ an arbitrary dictionary of information to associate with the component you’re decorating. It can be retrieved with
get_metadata
.Type: dict
a list of strings that categorize the component. Useful for formatting output or sifting through results for components you care about.
Type: list
-
group
¶ GROUPS.single
orGROUPS.cluster
. Used to organize components into “groups” that run together withinsights.core.dr.run()
.
-
cluster
¶ if
True
will put the component into theGROUPS.cluster
group. Defaults toFalse
. Overridesgroup
ifTrue
.Type: bool
-
get_missing_dependencies
(broker)[source]¶ Gets required and at-least-one dependencies not provided by the broker.
-
insights.core.exceptions¶
-
exception
insights.core.exceptions.
BlacklistedSpec
[source]¶ Bases:
Exception
Exception to be thrown when a blacklisted spec is found.
-
exception
insights.core.exceptions.
CalledProcessError
(returncode, cmd, output=None)[source]¶ Bases:
Exception
Raised if call fails.
Parameters: - returncode (int) -- The return code of the process executing the command.
- cmd (str) -- The command that was executed.
- output (str) -- Any output the command produced.
-
exception
insights.core.exceptions.
ContentException
[source]¶ Bases:
insights.core.exceptions.SkipComponent
Raised whenever a
datasource
fails to get data.
-
exception
insights.core.exceptions.
MissingRequirements
(requirements)[source]¶ Bases:
Exception
Raised during evaluation if a component’s dependencies aren’t met.
-
exception
insights.core.exceptions.
ParseException
[source]¶ Bases:
Exception
Exception that should be thrown from parsers that encounter exceptions they recognize while parsing. When this exception is thrown, the exception message and data are logged and no parser output data is saved.
-
exception
insights.core.exceptions.
SkipComponent
[source]¶ Bases:
Exception
This class should be raised by components that want to be taken out of dependency resolution.
-
exception
insights.core.exceptions.
SkipException
(msg)[source]¶ Bases:
insights.core.exceptions.SkipComponent
Warning
This class is deprecated, please use
insights.core.exceptions.SkipComponent
instead.Exception that should be thrown from parsers that are explicitly written to look for errors in input data. If the expected error is not found then the parser should throw this exception to signal to the infrastructure that the parser’s output should not be retained.
insights.core.filters¶
The filters module allows developers to apply filters to datasources, by adding them directly or through dependent components like parsers and combiners. A filter is a simple string, and it matches if it is contained anywhere within a line.
If a datasource has filters defined, it will return only lines matching at least one of them. If a datasource has no filters, it will return all lines.
Filters can be added to components like parsers and combiners, to apply consistent filtering to multiple underlying datasources that are configured as filterable.
Filters aren’t applicable to “raw” datasources, which are created with
kind=RawFileProvider
and have RegistryPoint
instances with raw=True
.
The addition of a single filter can cause a datasource to change from returning all lines to returning just those that match. Therefore, any filtered datasource should have at least one filter in the commit introducing it so downstream components don’t inadvertently change its behavior.
The benefit of this fragility is the ability to drastically reduce in-memory footprint and archive sizes. An additional benefit is the ability to evaluate only lines known to be free of sensitive information.
Filters added to a RegistryPoint
will be applied to all datasources that
implement it. Filters added to a datasource implementation apply only to that
implementation.
For example, a filter added to Specs.ps_auxww
will apply to
DefaultSpecs.ps_auxww
, InsightsArchiveSpecs.ps_auxww
,
SosSpecs.ps_auxww
, etc. But a filter added to DefaultSpecs.ps_auxww will
only apply to DefaultSpecs.ps_auxww
. See the modules in insights.specs
for those classes.
Filtering can be disabled globally by setting the environment variable
INSIGHTS_FILTERS_ENABLED=False
. This means that no datasources will be
filtered even if filters are defined for them.
-
insights.core.filters.
add_filter
(component, patterns)[source]¶ Add a filter or list of filters to a component. When the component is a datasource, the filter will be directly added to that datasouce. In cases when the component is a parser or combiner, the filter will be added to underlying filterable datasources by traversing dependency graph. A filter is a simple string, and it matches if it is contained anywhere within a line.
Parameters: - component (component) -- The component to filter, can be datasource, parser or combiner.
- patterns (str, [str]) -- A string, list of strings, or set of strings to add to the datasource’s filters.
-
insights.core.filters.
apply_filters
(target, lines)[source]¶ Applys filters to the lines of a datasource. This function is used only in integration tests. Filters are applied in an equivalent but more performant way at run time.
-
insights.core.filters.
dump
(stream=None)[source]¶ Dumps a string representation of FILTERS to a stream, normally an open file. If none is passed, FILTERS is dumped to a default location within the project.
-
insights.core.filters.
dumps
()[source]¶ Returns a string representation of the sorted FILTERS dictionary.
-
insights.core.filters.
get_filters
(component)[source]¶ Get the set of filters for the given datasource.
Filters added to a
RegistryPoint
will be applied to all datasources that implement it. Filters added to a datasource implementation apply only to that implementation.For example, a filter added to
Specs.ps_auxww
will apply toDefaultSpecs.ps_auxww
,InsightsArchiveSpecs.ps_auxww
,SosSpecs.ps_auxww
, etc. But a filter added toDefaultSpecs.ps_auxww
will only apply toDefaultSpecs.ps_auxww
. See the modules ininsights.specs
for those classes.Parameters: component (a datasource) -- The target datasource Returns: The set of filters defined for the datasource Return type: set
insights.core.plugins¶
The plugins module defines the components used by the rest of insights and specializes their interfaces and execution model where required.
This module includes the following CompoentType
subclasses:
It also contains the following Response
subclasses that rules
may return:
make_pass
make_response
(alias for make_fail)make_fail
make_info
make_metadata
make_metadata_key
make_fingerprint
-
class
insights.core.plugins.
PluginType
(*deps, **kwargs)[source]¶ Bases:
insights.core.dr.ComponentType
PluginType is the base class of plugin types like datasource, rule, etc. It provides a default invoke method that catches exceptions we don’t want bubbling to the top of the evaluation loop. These exceptions are commonly raised by datasource components but could be in the context of any component since most datasource runtime errors are lazy.
It’s possible for a datasource to “succeed” and return an object but for an exception to be raised when the parser tries to access the content of that object. For example, when a command datasource is evaluated, it only checks that the command exists and is executable. Invocation of the command itself is delayed until the parser asks for its value. This helps with performance and memory consumption.
-
class
insights.core.plugins.
Response
(key, **kwargs)[source]¶ Bases:
dict
Response is the base class of response types that can be returned from rules.
Subclasses must call __init__ of this class via super() and must provide the response_type class attribute.
The key_name class attribute is optional, but if one is specified, the first argument to __init__ must not be None. If key_name is None, then the first argument to __init__ should be None. It’s best to override __init__ in subclasses so users aren’t required to pass None explicitly.
-
adjust_for_length
(key, r, kwargs)[source]¶ Converts the response to a string and compares its length to a max length specified in settings. If the response is too long, an error is logged, and an abbreviated response is returned instead.
-
get_key
()[source]¶ Helper function that uses the response’s key_name to look up the response identifier. For a rule, this is like response.get(“error_key”).
-
key_name
= None¶ key_name is something like ‘error_key’, ‘fingerprint_key’, etc. It is the key downstream systems use to look up the exact response returned by a rule.
-
response_type
= None¶ response_type is something like ‘rule’, ‘metadata’, ‘fingerprint’, etc. It is how downstream systems identify the type of information returned by a rule.
-
-
class
insights.core.plugins.
combiner
(*deps, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
A decorator for a component that composes or “combines” other components.
A typical use case is hiding slight variations in related parser interfaces. Another use case is to combine several related parsers behind a single, cohesive, higher level interface.
-
class
insights.core.plugins.
condition
(*deps, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
ComponentType used to encapsulate boolean logic you’d like to have analyzed by a rule analysis system. Conditions should return truthy values.
None
is also a valid return type for conditions, sorules
that depend onconditions
that might return None should check their validity.
-
class
insights.core.plugins.
datasource
(*deps, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
Decorates a component that one or more
insights.core.Parser
subclasses will consume.-
filterable
= False¶
-
invoke
(broker)[source]¶ Handles invocation of the component. The default implementation invokes it with positional arguments based on order of dependency declaration.
-
multi_output
= False¶
-
raw
= False¶
-
-
class
insights.core.plugins.
fact
(*deps, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
ComponentType for a component that surfaces a dictionary or list of dictionaries that will be used later by cluster rules. The data from a fact is converted to a pandas Dataframe
-
class
insights.core.plugins.
incident
(*deps, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
ComponentType for a component used by rules that allows automated statistical analysis.
-
class
insights.core.plugins.
make_fail
(key, **kwargs)[source]¶ Bases:
insights.core.plugins.make_response
Returned by a rule to signal that its conditions have been met.
Example:
# completely made up package buggy = InstalledRpms.from_package("bash-3.4.23-1.el7") @rule(InstalledRpms) def report(installed_rpms): bash = installed_rpms.newest("bash") if bash == buggy: return make_fail("BASH_BUG_123", bash=bash) return make_pass("BASH", bash=bash)
-
class
insights.core.plugins.
make_fingerprint
(key, **kwargs)[source]¶ Bases:
insights.core.plugins.Response
-
key_name
= 'fingerprint_key'¶
-
response_type
= 'fingerprint'¶
-
-
class
insights.core.plugins.
make_info
(key, **kwargs)[source]¶ Bases:
insights.core.plugins.Response
Returned by a rule to surface information about a system.
Example:
@rule(InstalledRpms) def report(rpms): bash = rpms.newest("bash") return make_info("BASH_VERSION", bash=bash.nvra)
-
key_name
= 'info_key'¶
-
response_type
= 'info'¶
-
-
class
insights.core.plugins.
make_metadata
(**kwargs)[source]¶ Bases:
insights.core.plugins.Response
Allows a rule to convey addtional metadata about a system to downstream systems. It doesn’t convey success or failure but purely information that may be aggregated with other make_metadata responses. As such, it has no response key.
-
response_type
= 'metadata'¶
-
-
class
insights.core.plugins.
make_metadata_key
(key, value)[source]¶ Bases:
insights.core.plugins.Response
-
adjust_for_length
(key, r, kwargs)[source]¶ Converts the response to a string and compares its length to a max length specified in settings. If the response is too long, an error is logged, and an abbreviated response is returned instead.
-
key_name
= 'key'¶
-
response_type
= 'metadata_key'¶
-
-
class
insights.core.plugins.
make_none
[source]¶ Bases:
insights.core.plugins.Response
Used to create a response for a rule that returns None
This is not intended to be used by plugins, only infrastructure but it not private so that we can easily add it to reporting.
-
key_name
= 'none_key'¶
-
response_type
= 'none'¶
-
-
class
insights.core.plugins.
make_pass
(key, **kwargs)[source]¶ Bases:
insights.core.plugins.Response
Returned by a rule to signal that its conditions explicitly have not been met. In other words, the rule has all of the information it needs to determine that the system it’s analyzing is not in the state the rule was meant to catch.
An example rule might check whether a system is vulnerable to a well defined exploit or has a bug in a specific version of a package. If it can say for sure “the system does not have this exploit” or “the system does not have the buggy version of the package installed”, then it should return an instance of
make_pass
.Example:
# completely made up package buggy = InstalledRpms.from_package("bash-3.4.23-1.el7") @rule(InstalledRpms) def report(installed_rpms): bash = installed_rpms.newest("bash") if bash == buggy: return make_fail("BASH_BUG_123", bash=bash) return make_pass("BASH", bash=bash)
-
key_name
= 'pass_key'¶
-
response_type
= 'pass'¶
-
-
class
insights.core.plugins.
make_response
(key, **kwargs)[source]¶ Bases:
insights.core.plugins.Response
Returned by a rule to signal that its conditions have been met.
Example:
# completely made up package buggy = InstalledRpms.from_package("bash-3.4.23-1.el7") @rule(InstalledRpms) def report(installed_rpms): bash = installed_rpms.newest("bash") if bash == buggy: return make_response("BASH_BUG_123", bash=bash) return make_pass("BASH", bash=bash)
Deprecated since version 1.x: Use
make_fail
instead.-
key_name
= 'error_key'¶
-
response_type
= 'rule'¶
-
-
class
insights.core.plugins.
metadata
(*args, **kwargs)[source]¶ Bases:
insights.core.plugins.parser
Used for old cluster uber-archives.
Deprecated since version 1.x.
Warning
Do not use this component type.
-
requires
= ['metadata.json']¶
-
-
class
insights.core.plugins.
parser
(*args, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
Decorates a component responsible for parsing the output of a
datasource
.@parser
should accept multiple arguments, the first will ALWAYS be the datasource the parser component should handle. Any subsequent argument will be acomponent
used to determine if the parser should fire.@parser
should only decorate subclasses ofinsights.core.Parser
.Warning
If a Parser component handles a datasource that returns a
list
, a Parser instance will be created for each element of the list. Combiners or rules that depend on the Parser will be passed the list of instances and not a single parser instance. By default, if any parser in the list succeeds, those parsers are passed on to dependents, even if others fail. If all parsers should succeed or fail together, passcontinue_on_error=False
.
-
class
insights.core.plugins.
remoteresource
(*deps, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
ComponentType for a component for remote web resources.
-
class
insights.core.plugins.
rule
(*args, **kwargs)[source]¶ Bases:
insights.core.plugins.PluginType
Decorator for components that encapsulate some logic that depends on the data model of a system. Rules can depend on
datasource
instances,parser
instances,combiner
instances, or anything else.For example:
@rule(SshDConfig, InstalledRpms, [ChkConfig, UnitFiles], optional=[IPTables, IpAddr]) def report(sshd_config, installed_rpms, chk_config, unit_files, ip_tables, ip_addr): # ... # ... some complicated logic # ... bash = installed_rpms.newest("bash") return make_pass("BASH", bash=bash)
Notice that the arguments to
report
correspond to the dependencies in the@rule
decorator and are in the same order.Parameters to the decorator have these forms:
Criteria Example Decorator Arguments Description Required SshDConfig, InstalledRpms
Regular arguments At Least One [ChkConfig, UnitFiles]
An argument as a list Optional optional=[IPTables, IpAddr]
A list following optional= If a parameter is required, the value provided for it is guaranteed not to be
None
. In the example above,sshd_config
andinstalled_rpms
will not beNone
.At least one of the arguments to parameters of an “at least one” list will not be
None
. In the example, either or both ofchk_config
andunit_files
will not beNone
.Any or all arguments for optional parameters may be
None
.The following keyword arguments may be passed to the decorator:
Keyword Arguments: - requires (list) -- a list of components that all
components decorated with this type will require. Instead of using
requires=[...]
, just pass dependencies as variable arguments to@rule
as in the example above. - optional (list) -- a list of components that all components decorated with
this type will implicitly depend on optionally. Additional components
passed as
optional
to the decorator will be appended to this list. - metadata (dict) -- an arbitrary dictionary of information to associate
with the component you’re decorating. It can be retrieved with
get_metadata
. - tags (list) -- a list of strings that categorize the component. Useful for formatting output or sifting through results for components you care about.
- group --
GROUPS.single
orGROUPS.cluster
. Used to organize components into “groups” that run together withinsights.core.dr.run()
. - cluster (bool) -- if
True
will put the component into theGROUPS.cluster
group. Defaults toFalse
. Overridesgroup
ifTrue
. - content (string or dict) -- a jinja2 template or dictionary of jinja2
templates. The
Response
subclasses rules can return are dictionaries.make_pass
,make_fail
, andmake_response
all accept first a key and then a list of arbitrary keyword arguments. If content is a dictionary, the key is used to look up the template that the rest of the keyword argments will be interpolated into. If content is a string, then it is used for all return values of the rule. If content isn’t defined but aCONTENT
variable is declared in the module, it will be used for every rule in the module and also can be a string or list of dictionaries - links (dict) -- a dictionary with strings as keys and lists of urls as values. The keys categorize the urls, e.g. “kcs” for kcs urls and “bugzilla” for bugzilla urls.
-
content
= None¶
-
links
= None¶
- requires (list) -- a list of components that all
components decorated with this type will require. Instead of using
insights.core.remote_resource¶
-
class
insights.core.remote_resource.
CachedRemoteResource
[source]¶ Bases:
insights.core.remote_resource.RemoteResource
RemoteResource subclass that sets up caching for subsequent Web resource requests.
Examples
>>> from insights.core.remote_resource import CachedRemoteResource >>> crr = CachedRemoteResource() >>> rtn = crr.get("http://google.com") >>> print (rtn.content)
-
backend
= 'DictCache'¶ Type of storage for cache DictCache1, FileCache or RedisCache
Type: str
-
expire_after
= 180¶ Amount of time in seconds that the cache will expire
Type: float
-
file_cache_path
= '.web_cache'¶ Path to where file cache will be stored if FileCache backend is specified
Type: str
-
redis_host
= 'localhost'¶ Hostname of redis instance if RedisCache backend is specified
Type: str
-
redis_port
= 6379¶ Port used to contact the redis instance if RedisCache backend is specified
Type: int
-
-
class
insights.core.remote_resource.
DefaultHeuristic
(expire_after)[source]¶ Bases:
cachecontrol.heuristics.BaseHeuristic
BaseHeuristic subclass that sets the default caching headers if not supplied by the remote service.
-
default_cache_vars
= 'Remote service caching headers not set correctly, using default caching'¶ Message content warning that the response from the remote server did not return proper HTTP cache headers so we will use default cache settings
Type: str
-
server_cache_headers
= 'Caching being done based on caching headers returned by remote service'¶ Message content warning that we are using cache settings returned by the remote server.
Type: str
-
update_headers
(response)[source]¶ Returns the updated caching headers.
Parameters: response (HttpResponse) -- The response from the remote service Returns: (HttpResponse.Headers): Http caching headers Return type: response
-
warning
(response)[source]¶ Return a valid 1xx warning header value describing the cache adjustments.
The response is provided too allow warnings like 113 http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need to explicitly say response is over 24 hours old.
-
-
class
insights.core.remote_resource.
RemoteResource
(session=None)[source]¶ Bases:
object
RemoteResource class for accessing external Web resources.
Examples
>>> from insights.core.remote_resource import RemoteResource >>> rr = RemoteResource() >>> rtn = rr.get("http://google.com") >>> print (rtn.content)
-
get
(url, params={}, headers={}, auth=(), certificate_path=None)[source]¶ Returns the response payload from the request to the given URL.
Parameters: - url (str) -- The URL for the WEB API that the request is being made too.
- params (dict) -- Dictionary containing the query string parameters.
- headers (dict) -- HTTP Headers that may be needed for the request.
- auth (tuple) -- User ID and password for Basic Auth
- certificate_path (str) -- Path to the ssl certificate.
Returns: (HttpResponse): Response object from requests.get api request
Return type: response
-
timeout
= 10¶ Time in seconds for the requests.get api call to wait before returning a timeout exception
Type: float
-
insights.core.spec_factory¶
-
class
insights.core.spec_factory.
CommandOutputProvider
(cmd, ctx, root='insights_commands', args=None, split=True, keep_rc=False, ds=None, timeout=None, inherit_env=None, override_env=None, signum=None)[source]¶ Bases:
insights.core.spec_factory.ContentProvider
Class used in datasources to return output from commands.
-
class
insights.core.spec_factory.
ContainerCommandProvider
(cmd_path, ctx, image=None, args=None, split=True, keep_rc=False, ds=None, timeout=None, inherit_env=None, override_env=None, signum=None)[source]¶
-
class
insights.core.spec_factory.
ContainerFileProvider
(cmd_path, ctx, image=None, args=None, split=True, keep_rc=False, ds=None, timeout=None, inherit_env=None, override_env=None, signum=None)[source]¶
-
class
insights.core.spec_factory.
ContainerProvider
(cmd_path, ctx, image=None, args=None, split=True, keep_rc=False, ds=None, timeout=None, inherit_env=None, override_env=None, signum=None)[source]¶
-
class
insights.core.spec_factory.
DatasourceProvider
(content, relative_path, root='/', ds=None, ctx=None)[source]¶
-
class
insights.core.spec_factory.
MetadataProvider
(relative_path, root='/', ds=None, ctx=None)[source]¶ Bases:
insights.core.spec_factory.FileProvider
Warning
This Class is deprecated and will be removed from 3.5.0. Please collect built-in file by using datasource spec directly, see
insights.specs.datasources.client_metadata
.Class used for insights-core built-in files. These files should not be filtered, redacted or blocked.
-
class
insights.core.spec_factory.
RawFileProvider
(relative_path, root='/', ds=None, ctx=None)[source]¶ Bases:
insights.core.spec_factory.FileProvider
Class used in datasources that returns the contents of a file a single string. The file is not filtered.
-
class
insights.core.spec_factory.
RegistryPoint
(metadata=None, multi_output=False, raw=False, filterable=False)[source]¶ Bases:
object
-
insights.core.spec_factory.
SAFE_ENV
= {'LANG': 'C.UTF-8', 'LC_ALL': 'C', 'PATH': '/bin:/usr/bin:/sbin:/usr/sbin:/usr/share/Modules/bin'}¶ A minimal set of environment variables for use in subprocess calls
-
class
insights.core.spec_factory.
SerializedOutputProvider
(relative_path, root='/', ds=None, ctx=None)[source]¶
-
class
insights.core.spec_factory.
SerializedRawOutputProvider
(relative_path, root='/', ds=None, ctx=None)[source]¶
-
class
insights.core.spec_factory.
SpecSet
[source]¶ Bases:
object
The base class for all spec declarations. Extend this class and define your datasources directly or with a SpecFactory.
-
context_handlers
= {}¶
-
registry
= {}¶
-
-
class
insights.core.spec_factory.
SpecSetMeta
(name, bases, dct)[source]¶ Bases:
type
The metaclass that converts RegistryPoint markers to registry point datasources and hooks implementations for them into the registry.
-
class
insights.core.spec_factory.
TextFileProvider
(relative_path, root='/', ds=None, ctx=None)[source]¶ Bases:
insights.core.spec_factory.FileProvider
Class used in datasources that returns the contents of a file a list of lines. Each line is filtered if filters are defined for the datasource.
-
class
insights.core.spec_factory.
command_with_args
(cmd, provider, context=<class 'insights.core.context.HostContext'>, deps=None, split=True, keep_rc=False, timeout=None, inherit_env=None, override_env=None, signum=None, **kwargs)[source]¶ Bases:
object
Execute a command that has dynamic arguments
Parameters: - cmd (str) -- the command to execute. Breaking apart a command string that might require arguments.
- provider (str or tuple) -- argument string or a tuple of argument strings.
- context (ExecutionContext) -- the context under which the datasource should run.
- split (bool) -- whether the output of the command should be split into a list of lines
- keep_rc (bool) -- whether to return the error code returned by the process executing the command. If False, any return code other than zero with raise a CalledProcessError. If True, the return code and output are always returned.
- timeout (int) -- Number of seconds to wait for the command to complete. If the timeout is reached before the command returns, a CalledProcessError is raised. If None, timeout is infinite.
- inherit_env (list) -- The list of environment variables to inherit from the calling process when the command is invoked.
- override_env (dict) -- A dict of environment variables to override from the calling process when the command is invoked.
Returns: - A datasource that returns the output of a command that takes
specified arguments passed by the provider.
Return type: function
-
class
insights.core.spec_factory.
container_collect
(provider, path=None, context=<class 'insights.core.context.HostContext'>, deps=None, split=True, keep_rc=False, timeout=None, inherit_env=None, override_env=None, signum=None, **kwargs)[source]¶ Bases:
insights.core.spec_factory.foreach_execute
Collects the files at the resulting path in running containers.
Parameters: - provider (list) -- a list of tuples.
- path (str) -- the file path template with substitution parameters. The path can also be passed via the provider when it’s variable per cases, in that case, the path should be None.
- context (ExecutionContext) -- the context under which the datasource should run.
- keep_rc (bool) -- whether to return the error code returned by the process executing the command. If False, any return code other than zero with raise a CalledProcessError. If True, the return code and output are always returned.
- timeout (int) -- Number of seconds to wait for the command to complete. If the timeout is reached before the command returns, a CalledProcessError is raised. If None, timeout is infinite.
Returns: - A datasource that returns a list of file contents created by
substituting each element of provider into the path template.
Return type: function
-
class
insights.core.spec_factory.
container_execute
(provider, cmd, context=<class 'insights.core.context.HostContext'>, deps=None, split=True, keep_rc=False, timeout=None, inherit_env=None, override_env=None, signum=None, **kwargs)[source]¶ Bases:
insights.core.spec_factory.foreach_execute
Execute a command for each element in provider in container. Provider is the output of a different datasource that returns a list of tuples. In each tuple, the container engine provider (“podman” or “docker”) and the container_id are two required elements, the rest elements if there are, are the arguments being passed to the command.
Parameters: - provider (list) -- a list of tuples, in each tuple, the container engine provider (“podman” or “docker”) and the container_id are two required elements, the rest elements if there are, are the arguments being passed to the cmd.
- cmd (str) -- a command with substitution parameters. Breaking apart a command string that might contain multiple commands separated by a pipe, getting them ready for subproc operations. IE. A command with filters applied
- context (ExecutionContext) -- the context under which the datasource should run.
- split (bool) -- whether the output of the command should be split into a list of lines
- keep_rc (bool) -- whether to return the error code returned by the process executing the command. If False, any return code other than zero with raise a CalledProcessError. If True, the return code and output are always returned.
- timeout (int) -- Number of seconds to wait for the command to complete. If the timeout is reached before the command returns, a CalledProcessError is raised. If None, timeout is infinite.
- inherit_env (list) -- The list of environment variables to inherit from the calling process when the command is invoked.
Returns: - A datasource that returns a list of outputs for each command
created by substituting each element of provider into the cmd template.
Return type: function
-
class
insights.core.spec_factory.
find
(spec, pattern)[source]¶ Bases:
object
Helper class for extracting specific lines from a datasource for direct consumption by a rule.
service_starts = find(Specs.audit_log, "SERVICE_START") @rule(service_starts) def report(starts): return make_info("SERVICE_STARTS", num_starts=len(starts))
Parameters: - spec (datasource) -- some datasource, ideally filterable.
- pattern (string / list) -- a string or list of strings to match (no patterns supported)
Returns: A dict where each key is a command, path, or spec name, and each value is a non-empty list of matching lines. Only paths with matching lines are included.
Raises: SkipComponent
-- if no paths have matching lines.
-
class
insights.core.spec_factory.
first_file
(paths, context=None, deps=[], kind=<class 'insights.core.spec_factory.TextFileProvider'>, **kwargs)[source]¶ Bases:
object
Creates a datasource that returns the first existing and readable file in files.
Parameters: - files (str) -- list of paths to find and read
- context (ExecutionContext) -- the context under which the datasource should run.
- kind (FileProvider) -- One of TextFileProvider or RawFileProvider.
Returns: - A datasource that returns the first file in files that exists
and is readable
Return type: function
-
class
insights.core.spec_factory.
first_of
(deps)[source]¶ Bases:
object
Given a list of dependencies, returns the first of the list that exists in the broker. At least one must be present, or this component won’t fire.
-
class
insights.core.spec_factory.
foreach_collect
(provider, path, ignore=None, context=<class 'insights.core.context.HostContext'>, deps=[], kind=<class 'insights.core.spec_factory.TextFileProvider'>, **kwargs)[source]¶ Bases:
object
Subtitutes each element in provider into path and collects the files at the resulting paths.
Parameters: - provider (list) -- a list of elements or tuples.
- path (str) -- a path template with substitution parameters.
- context (ExecutionContext) -- the context under which the datasource should run.
- kind (FileProvider) -- one of TextFileProvider or RawFileProvider
Returns: - A datasource that returns a list of file contents created by
substituting each element of provider into the path template.
Return type: function
-
class
insights.core.spec_factory.
foreach_execute
(provider, cmd, context=<class 'insights.core.context.HostContext'>, deps=None, split=True, keep_rc=False, timeout=None, inherit_env=None, override_env=None, signum=None, **kwargs)[source]¶ Bases:
object
Execute a command for each element in provider. Provider is the output of a different datasource that returns a list of single elements or a list of tuples. The command should have %s substitution parameters equal to the number of elements in each tuple of the provider.
Parameters: - provider (list) -- a list of elements or tuples.
- cmd (str) -- a command with substitution parameters. Breaking apart a command string that might contain multiple commands separated by a pipe, getting them ready for subproc operations. IE. A command with filters applied
- context (ExecutionContext) -- the context under which the datasource should run.
- split (bool) -- whether the output of the command should be split into a list of lines
- keep_rc (bool) -- whether to return the error code returned by the process executing the command. If False, any return code other than zero with raise a CalledProcessError. If True, the return code and output are always returned.
- timeout (int) -- Number of seconds to wait for the command to complete. If the timeout is reached before the command returns, a CalledProcessError is raised. If None, timeout is infinite.
- inherit_env (list) -- The list of environment variables to inherit from the calling process when the command is invoked.
- override_env (dict) -- A dict of environment variables to override from the calling process when the command is invoked.
Returns: - A datasource that returns a list of outputs for each command
created by substituting each element of provider into the cmd template.
Return type: function
-
class
insights.core.spec_factory.
glob_file
(patterns, ignore=None, context=None, deps=[], kind=<class 'insights.core.spec_factory.TextFileProvider'>, max_files=1000, **kwargs)[source]¶ Bases:
object
Creates a datasource that reads all files matching the glob pattern(s).
Parameters: - patterns (str or [str]) -- glob pattern(s) of paths to read.
- ignore (regex) -- a regular expression that is used to filter the paths matched by pattern(s).
- context (ExecutionContext) -- the context under which the datasource should run.
- kind (FileProvider) -- One of TextFileProvider or RawFileProvider.
- max_files (int) -- Maximum number of glob files to process.
Returns: A datasource that reads all files matching the glob patterns.
Return type: function
-
class
insights.core.spec_factory.
head
(dep, **kwargs)[source]¶ Bases:
object
Return the first element of any datasource that produces a list.
-
class
insights.core.spec_factory.
listdir
(path, context=None, ignore=None, deps=[])[source]¶ Bases:
object
Execute a simple directory listing of all the files and directories in path.
Parameters: - path (str) -- directory to list.
- context (ExecutionContext) -- the context under which the datasource should run.
- ignore (str) -- regular expression defining names to ignore.
Returns: - A datasource that returns a sorted list of file and directory
names in the directory specified by path. The list will be empty when the directory is empty or all names get ignored.
Return type: function
-
class
insights.core.spec_factory.
listglob
(path, context=None, ignore=None, deps=[])[source]¶ Bases:
insights.core.spec_factory.listdir
List paths matching a glob pattern.
Parameters: - pattern (str) -- glob pattern to list.
- context (ExecutionContext) -- the context under which the datasource should run.
- ignore (str) -- regular expression defining paths to ignore.
Returns: - A datasource that returns the list of paths that match
the given glob pattern. The list will be empty when nothing matches.
Return type: function
-
class
insights.core.spec_factory.
simple_command
(cmd, context=<class 'insights.core.context.HostContext'>, deps=None, split=True, keep_rc=False, timeout=None, inherit_env=None, override_env=None, signum=None, **kwargs)[source]¶ Bases:
object
Execute a simple command that has no dynamic arguments
Parameters: - cmd (str) -- the command(s) to execute. Breaking apart a command string that might contain multiple commands separated by a pipe, getting them ready for subproc operations. IE. A command with filters applied
- context (ExecutionContext) -- the context under which the datasource should run.
- split (bool) -- whether the output of the command should be split into a list of lines
- keep_rc (bool) -- whether to return the error code returned by the process executing the command. If False, any return code other than zero with raise a CalledProcessError. If True, the return code and output are always returned.
- timeout (int) -- Number of seconds to wait for the command to complete. If the timeout is reached before the command returns, a CalledProcessError is raised. If None, timeout is infinite.
- inherit_env (list) -- The list of environment variables to inherit from the calling process when the command is invoked.
- override_env (dict) -- A dict of environment variables to override from the calling process when the command is invoked.
Returns: - A datasource that returns the output of a command that takes
no arguments
Return type: function
-
class
insights.core.spec_factory.
simple_file
(path, context=None, deps=[], kind=<class 'insights.core.spec_factory.TextFileProvider'>, **kwargs)[source]¶ Bases:
object
Creates a datasource that reads the file at path when evaluated.
Parameters: - path (str) -- path to the file to read
- context (ExecutionContext) -- the context under which the datasource should run.
- kind (FileProvider) -- One of TextFileProvider or RawFileProvider.
Returns: A datasource that reads all files matching the glob patterns.
Return type: function
insights.core.taglang¶
Simple language for defining predicates against a list or set of strings.
- Operator Precedence:
!
high - opposite truth value of its predicate/
high - starts a regex that continues until whitespace unless quoted&
medium - “and” of two predicates|
low - “or” of two predicates,
low - “or” of two predicates. Synonym for|
.
It supports grouping with parentheses and quoted strings/regexes surrounded with either single or double quotes.
Examples
>>> pred = parse("a | b & !c") # means (a or (b and (not c)))
>>> pred(["a"])
True
>>> pred(["b"])
True
>>> pred(["b", "c"])
False
>>> pred = parse("/net | apache")
>>> pred(["networking"])
True
>>> pred(["mynetwork"])
True
>>> pred(["apache"])
True
>>> pred(["security"])
False
>>> pred = parse("(a | b) & c")
>>> pred(["a", "c"])
True
>>> pred(["b", "c"])
True
>>> pred(["a"])
False
>>> pred(["b"])
False
>>> pred(["c"])
False
Regular expressions start with a forward slash /
and continue until
whitespace unless they are quoted with either single or double quotes. This
means that they can consume what would normally be considered an operator or a
closing parenthesis if you aren’t careful.
- For example, this is a parse error because the regex consumes the comma:
>>> pred = parse("/net, apache") Exception
- Instead, do this:
>>> pred = parse("/net , apache")
- or this:
>>> pred = parse("/net | apache")
- or this:
>>> pred = parse("'/net', apache")
-
class
insights.core.taglang.
And
(left, right)[source]¶ Bases:
insights.core.taglang.Predicate
The values must satisfy both the left and the right condition.
-
class
insights.core.taglang.
Eq
(value)[source]¶ Bases:
insights.core.taglang.Predicate
The value must be in the set of values.
-
class
insights.core.taglang.
Not
(pred)[source]¶ Bases:
insights.core.taglang.Predicate
The values must not satisfy the wrapped condition.
-
class
insights.core.taglang.
Or
(left, right)[source]¶ Bases:
insights.core.taglang.Predicate
The values must satisfy either the left or the right condition.
-
class
insights.core.taglang.
Predicate
[source]¶ Bases:
object
Provides __call__ for invoking the Predicate like a function without having to explictly call its test method.
-
class
insights.core.taglang.
Regex
(value)[source]¶ Bases:
insights.core.taglang.Predicate
The regex must match at least one of the values.
insights.parsers¶
-
insights.parsers.
calc_offset
(lines, target, invert_search=False, require_all=False)[source]¶ Function to search for a line in a list starting with a target string. If target is None or an empty string then 0 is returned. This allows checking target here instead of having to check for an empty target in the calling function. Each line is stripped of leading spaces prior to comparison with each target however target is not stripped. See parse_fixed_table in this module for sample usage.
Parameters: - lines (list) -- List of strings.
- target (list) -- List of strings to search for at the beginning of any line in lines.
- invert_search (boolean) -- If True this flag causes the search to continue until the first line is found not matching anything in target. An empty line is implicitly included in target. Default is False. This would typically be used if trimming trailing lines off of a file by passing reversed(lines) as the lines argument.
- require_all (boolean) -- If True this flag causes the search to also require all the items of the target being in the line. This flag only works with invert_search == False, when invert_search is True, it will be ignored.
Returns: index into the lines indicating the location of target. If target is None or an empty string 0 is returned as the offset. If invert_search is True the index returned will point to the line after the last target was found.
Return type: int
Raises: ValueError
-- Exception is raised if target string is specified and it was not found in the input lines.Examples
>>> lines = [ ... '# ', ... 'Warning line', ... 'Error line', ... ' data 1 line', ... ' data 2 line'] >>> target = ['data', '2', 'line'] >>> calc_offset(lines, target) 3 >>> target = ['#', 'Warning', 'Error'] >>> calc_offset(lines, target, invert_search=True) 3 >>> target = ['data', '2', 'line'] >>> calc_offset(lines, target, require_all=True) 4 >>> target = ['#', 'Warning', 'Error'] >>> calc_offset(lines, target, invert_search=True, require_all=True) # `require_all` doesn't work when `invert_search=True` 3
-
insights.parsers.
get_active_lines
(lines, comment_char='#')[source]¶ Returns lines, or parts of lines, from content that are not commented out or completely empty. The resulting lines are all individually stripped.
This is useful for parsing many config files such as ifcfg.
Parameters: - lines (list) -- List of strings to parse.
- comment_char (str) -- String indicating that all chars following are part of a comment and will be removed from the output.
Returns: List of valid lines remaining in the input.
Return type: list
Examples
>>> lines = [ ... 'First line', ... ' ', ... '# Comment line', ... 'Inline comment # comment', ... ' Whitespace ', ... 'Last line'] >>> get_active_lines(lines) ['First line', 'Inline comment', 'Whitespace', 'Last line']
-
insights.parsers.
keyword_search
(rows, **kwargs)[source]¶ Takes a list of dictionaries and finds all the dictionaries where the keys and values match those found in the keyword arguments.
Keys in the row data have ‘ ‘ and ‘-’ replaced with ‘_’, so they can match the keyword argument parsing. For example, the keyword argument ‘fix_up_path’ will match a key named ‘fix-up path’.
In addition, several suffixes can be added to the key name to do partial matching of values:
- ‘__contains’ will test whether the data value contains the given value.
- ‘__startswith’ tests if the data value starts with the given value
- ‘__lower_value’ compares the lower-case version of the data and given values.
Parameters: - rows (list) -- A list of dictionaries representing the data to be searched.
- **kwargs (dict) -- keyword-value pairs corresponding to the fields that need to be found and their required values in the data rows.
Returns: The list of rows that match the search keywords. If no keyword arguments are given, no rows are returned.
Return type: (list)
Examples
>>> rows = [ ... {'domain': 'oracle', 'type': 'soft', 'item': 'nofile', 'value': 1024}, ... {'domain': 'oracle', 'type': 'hard', 'item': 'nofile', 'value': 65536}, ... {'domain': 'oracle', 'type': 'soft', 'item': 'stack', 'value': 10240}, ... {'domain': 'oracle', 'type': 'hard', 'item': 'stack', 'value': 3276}, ... {'domain': 'root', 'type': 'soft', 'item': 'nproc', 'value': -1}] ... >>> keyword_search(rows, domain='root') [{'domain': 'root', 'type': 'soft', 'item': 'nproc', 'value': -1}] >>> keyword_search(rows, item__contains='c') [{'domain': 'oracle', 'type': 'soft', 'item': 'stack', 'value': 10240}, {'domain': 'oracle', 'type': 'hard', 'item': 'stack', 'value': 3276}, {'domain': 'root', 'type': 'soft', 'item': 'nproc', 'value': -1}] >>> keyword_search(rows, domain__startswith='r') [{'domain': 'root', 'type': 'soft', 'item': 'nproc', 'value': -1}]
-
insights.parsers.
optlist_to_dict
(optlist, opt_sep=', ', kv_sep='=', strip_quotes=False)[source]¶ Parse an option list into a dictionary.
Takes a list of options separated by
opt_sep
and places them into a dictionary with the default value ofTrue
. Ifkv_sep
option is specified then key/value optionskey=value
are parsed. Useful for parsing options such as mount options in the formatrw,ro,rsize=32168,xyz
.Parameters: - optlist (str) -- String of options to parse.
- opt_sep (str) -- Separater used to split options.
- kv_sep (str) -- If not None then optlist includes key=value pairs to be split, and this str is used to split them.
- strip_quotes (bool) -- If set, will remove matching ‘”’ and ‘”’ characters from start and end of line. No quotes are removed from inside the string and mismatched quotes are not removed.
Returns: Returns a dictionary of names present in the list. If kv_sep is not None then the values will be the str on the right-hand side of kv_sep. If kv_sep is None then each key will have a default value of True.
Return type: dict
Examples
>>> optlist = 'rw,ro,rsize=32168,xyz' >>> optlist_to_dict(optlist) {'rw': True, 'ro': True, 'rsize': '32168', 'xyz': True}
-
insights.parsers.
parse_delimited_table
(table_lines, delim=None, max_splits=-1, strip=True, header_delim='same as delimiter', heading_ignore=None, header_substitute=None, trailing_ignore=None, raw_line_key=None)[source]¶ Parses table-like text. Uses the first (non-ignored) row as the list of column names, which cannot contain the delimiter. Fields cannot contain the delimiter but can be blank if a printable delimiter is used.
Parameters: - table_lines (list) -- List of strings with the first line containing column headings separated by spaces, and the remaining lines containing table data.
- delim (str) -- String used in the content to separate fields. If left as None (the default), white space is used as the field separator.
- max_splits (int) -- Maximum number of fields to create by splitting the line. After this number of fields has been found, the rest of the line is left un-split and may contain the delimiter. Lines may contain less than this number of fields.
- strip (bool) -- If set to True, fields and headings will be stripped of leading and trailing space. If set to False, fields and headings will be left as is. The delimiter is always removed, so strip need not be set if delim is set to None (but will not change output in that case).
- header_delim (str) -- When set, uses a different delimiter to the content for splitting the header into keywords. Set to None, this will split on white space. When left at the special value of ‘same as delimiter’, the content delimiter will be used to split the header line as well.
- heading_ignore (list) -- Optional list of strings to search for at beginning of line. All lines before this line will be ignored. If specified then it must be present in the file or ValueError will be raised.
- header_substitute (list) -- Optional list of tuples containing (old_string_value, new_string_value) to be used to modify header values. If whitespace is present in a column it must be replaced with non-whitespace characters in order for the table to be parsed correctly.
- trailing_ignore (list) -- Optional list of strings to look for at the end rows of the content. Lines starting with these strings will be ignored, thereby truncating the rows of data.
- raw_line_key (str) -- Key under which to save the raw line. If None, line is not saved.
Returns: Returns a list of dictionaries for each row of column data, keyed on the column headings in the same case as input.
Return type: list
-
insights.parsers.
parse_fixed_table
(table_lines, heading_ignore=[], header_substitute=[], trailing_ignore=[], empty_exception=False)[source]¶ Function to parse table data containing column headings in the first row and data in fixed positions in each remaining row of table data. Table columns must not contain spaces within the column name. Column headings are assumed to be left justified and the column data width is the width of the heading label plus all whitespace to the right of the label. This function will remove all blank rows in data but it will handle blank columns if some of the columns aren’t empty.
Parameters: - table_lines (list) -- List of strings with the first line containing column headings separated by spaces, and the remaining lines containing table data in left justified format.
- heading_ignore (list) -- Optional list of strings to search for at beginning of line. All lines before this line will be ignored. If specified then it must be present in the file or ValueError will be raised.
- header_substitute (list) -- Optional list of tuples containing (old_string_value, new_string_value) to be used to modify header values. If whitespace is present in a column it must be replaced with non-whitespace characters in order for the table to be parsed correctly.
- trailing_ignore (list) -- Optional list of strings to look for at the end rows of the content. Lines starting with these strings will be ignored, thereby truncating the rows of data.
- empty_exception (bool) -- If True, raise a ParseException when the value if empty. False by default.
Returns: - Returns a list of dict for each row of column data. Dict keys
are the column headings in the same case as input.
Return type: list
Raises: ValueError
-- Raised if heading_ignore is specified and not found in table_lines.ParseException
-- Raised if there are empty values when empty_exception is True
Sample input:
Column1 Column2 Column3 data1 data 2 data 3 data4 data5 data6
Examples
>>> table_data = parse_fixed_table(table_lines) >>> table_data [{'Column1': 'data1', 'Column2': 'data 2', 'Column3': 'data 3'}, {'Column1': 'data4', 'Column2': 'data5', 'Column3': 'data6'}]
-
insights.parsers.
split_kv_pairs
(lines, comment_char='#', filter_string=None, split_on='=', use_partition=False, ordered=False)[source]¶ Split lines of a list into key/value pairs
Use this function to filter and split all lines of a list of strings into a dictionary. Named arguments may be used to control how the line is split, how lines are filtered and the type of output returned. See parameters for more information. When splitting key/value, the first occurence of the split character is used, other occurrences of the split char in the line will be ignored. :
get_active_lines()
is called to strip comments and blank lines from the data.Parameters: - lines (list of str) -- List of the strings to be split.
- comment_char (str) -- Char that when present in the line indicates all following chars are part of a comment. If this is present, all comments and all blank lines are removed from list before further processing. The default comment char is the # character.
- filter_string (str) -- If the filter string is present, then only lines containing the filter will be processed, other lines will be ignored.
- split_on (str) -- Character to use when splitting a line. Only the first occurence of the char is used when splitting, so only one split is performed at the first occurrence of split_on. The default string is =.
- use_partition (bool) -- If this parameter is True then the python partition function will be used to split the line. If False then the pyton split function will be used. The difference is that when False, if the split character is not present in the line then the line is ignored and when True the line will be parsed regardless. Set use_partition to True if you have valid lines that do not contain the split_on character. Set use_partition to False if you want to ignore lines that do not contain the split_on character. The default value is False.
- ordered (bool) -- If this parameter is True then the resulting dictionary will be in the same order as in the original file, a python OrderedDict type is used. If this parameter is False then the resulting dictionary is in no particular order, a base python dict type is used. The default is False.
Returns: Return value is a dictionary of the key/value pairs. If parameter keyword is True then an OrderedDict is returned, otherwise a dict is returned.
Return type: dict
Examples
>>> from .. import split_kv_pairs >>> for line in lines: ... print line # Comment line # Blank lines will also be removed keyword1 = value1 # Inline comments keyword2 = value2a=True, value2b=100M keyword3 # Key with no separator >>> split_kv_pairs(lines) {'keyword2': 'value2a=True, value2b=100M', 'keyword1': 'value1'} >>> split_kv_pairs(lines, comment_char='#') {'keyword2': 'value2a=True, value2b=100M', 'keyword1': 'value1'} >>> split_kv_pairs(lines, filter_string='keyword2') {'keyword2': 'value2a=True, value2b=100M'} >>> split_kv_pairs(lines, use_partition=True) {'keyword3': '', 'keyword2': 'value2a=True, value2b=100M', 'keyword1': 'value1'} >>> split_kv_pairs(lines, use_partition=True, ordered=True) OrderedDict([('keyword1', 'value1'), ('keyword2', 'value2a=True, value2b=100M'), ('keyword3', '')])
-
insights.parsers.
unsplit_lines
(lines, cont_char='\\', keep_cont_char=False)[source]¶ Recombine lines having a continuation character at end.
Generator that recombines lines in the list that have the char cont_char at the end of a line. If cont_char is found in a line then then next line will be appended to the current line, this will continue for multiple continuation lines until the next line is found with no continuation character at the end. All lines found will be combined and returned.
If the keep_cont_char option is set to True, the continuation character will be left on the end of the line. Otherwise, by default, it is removed.
Parameters: - lines (list) -- List of strings to be evaluated.
- cont_char (char) -- Char to search for at end of line. Default is
\
. - keep_cont_char (bool) -- Whether to keep the continuation on the end of the line. Defaults to False, which causes the continuation character to be removed.
Yields: line (str) -- Yields unsplit lines
Examples
>>> lines = ['Line one \', ' line one part 2', 'Line two'] >>> list(unsplit_lines(lines)) ['Line one line one part 2', 'Line two'] >>> list(unsplit_lines(lines, cont_char='2')) ['Line one \', ' line one part Line two'] >>> list(unsplit_lines(lines, keep_cont_char=True) ['Line one \ line one part 2', 'Line two']
insights.parsr¶
parsr is a library for building parsers based on parsing expression grammars or PEGs.
You build a parser by making subparsers to match simple building blocks like numbers, strings, symbols, etc. and then composing them to reflect the higher level structure of your language.
Some means of combination are like those of regular expressions: sequences, alternatives, repetition, optional matching, etc. However, matching is always greedy. parsr also allows recursive definitions and the ability to transform the match of any subparser with a function. The parser can recognize and interpret its input at the same time.
Here’s an example that evaluates arithmetic expressions.
from insights.parsr import EOF, Forward, InSet, Many, Number, WS def op(args): ans, rest = args for op, arg in rest: if op == "+": ans += arg elif op == "-": ans -= arg elif op == "*": ans *= arg else: ans /= arg return ans LP = Char("(") RP = Char(")") expr = Forward() # Forward declarations allow recursive structure factor = WS >> (Number | (LP >> expr << RP)) << WS term = (factor + Many(InSet("*/") + factor)).map(op) # Notice the funny assignment of Forward definitions. expr <= (term + Many(InSet("+-") + term)).map(op) evaluate = expr << EOF
-
exception
insights.parsr.
Backtrack
(msg)[source]¶ Bases:
Exception
Mapped or Lifted functions should Backtrack if they want to fail without causing parsing to fail.
-
class
insights.parsr.
Char
(char)[source]¶ Bases:
insights.parsr.Parser
Char matches a single character.
a = Char("a") # parses a single "a" val = a("a") # produces an "a" from the data. val = a("b") # raises an exception
-
class
insights.parsr.
Choice
(children)[source]¶ Bases:
insights.parsr.Parser
A Choice requires at least one of its children to succeed, and it returns the value of the one that matched. Alternatives in a choice are tried left to right, so they have a definite priority. This a feature of PEGs over context free grammars.
Additional uses of
|
on the parser will cause it to accumulate parsers onto itself instead of creating new Choices. This has the desirable effect of increasing efficiency, but it can also have unintended consequences if a choice is used in multiple parts of a grammar as the initial element of another choice. Use aWrapper
to prevent that from happening.abc = a | b | c # alternation or choice. val = abc("a") # parses a single "a" val = abc("b") # parses a single "b" val = abc("c") # parses a single "c" val = abc("d") # raises an exception
-
class
insights.parsr.
Context
(lines, src=None)[source]¶ Bases:
object
An instance of Context is threaded through the process call to every parser. It stores an indention stack to track hanging indents, a tag stack for grammars like xml or apache configuration, the active parser stack for error reporting, and accumulated errors for the farthest position reached.
-
set
(pos, msg)[source]¶ Every parser that encounters an error calls set with the current position and a message. If the error is at the farthest position reached by any other parser, the active parser stack and message are accumulated onto a list of errors for that position. If the position is beyond any previous errors, the error list is cleared before the active stack and new error are recorded. This is the “farthest failure heurstic.”
-
-
class
insights.parsr.
EmptyQuotedString
(chars)[source]¶ Bases:
insights.parsr.Parser
-
class
insights.parsr.
EnclosedComment
(s, e)[source]¶ Bases:
insights.parsr.Parser
EnclosedComment matches a start literal, an end literal, and all characters between. It returns the content between the start and end.
Comment = EnclosedComment("/*", "*/")
-
class
insights.parsr.
EndTagName
(parser, ignore_case=False)[source]¶ Bases:
insights.parsr.Wrapper
Wraps a parser that represents an end tag for grammars like xml, html, etc. The result is captured and compared to the last tag on the tag stack in the
Context
object. The tags must match for the parse to be successful.
-
class
insights.parsr.
FollowedBy
(child, follow)[source]¶ Bases:
insights.parsr.Parser
FollowedBy takes a parser and a predicate parser. The initial parser matches only if the predicate matches the input after it. On success, input for the predicate is left unread, and the result of the first parser is returned.
ab = Char("a") & Char("b") # matches an "a" followed by a "b", but # the "b" isn't consumed from the input. val = ab("ab") # returns "a" and leaves "b" to be # consumed. val = ab("ac") # raises an exception and doesn't # consume "a".
-
class
insights.parsr.
Forward
[source]¶ Bases:
insights.parsr.Parser
Forward allows recursive grammars where a nonterminal’s definition includes itself directly or indirectly. You initially create a Forward nonterminal with regular assignment.
expr = Forward()
You later give it its real definition with the
<=
operator.expr <= (term + Many(LowOps + term)).map(op)
-
class
insights.parsr.
HangingString
(chars, echars=None, min_length=1)[source]¶ Bases:
insights.parsr.Parser
HangingString matches lines with indented continuations like in ini files.
Key = WS >> PosMarker(String(key_chars)) << WS Sep = InSet(sep_chars, "Sep") Value = WS >> (Boolean | HangingString(value_chars)) KVPair = WithIndent(Key + Opt(Sep >> Value))
-
class
insights.parsr.
InSet
(s, name=None)[source]¶ Bases:
insights.parsr.Parser
InSet matches any single character from a set.
vowel = InSet("aeiou") # or InSet(set("aeiou")) val = vowel("a") # okay val = vowel("e") # okay val = vowel("i") # okay val = vowel("o") # okay val = vowel("u") # okay val = vowel("y") # raises an exception
-
class
insights.parsr.
KeepLeft
(left, right)[source]¶ Bases:
insights.parsr.Parser
KeepLeft takes two parsers. It requires them both to succeed but only returns results for the first one. It consumes input for both.
a = Char("a") q = Char('"') aq = a << q # like a + q except only the result of a is # returned val = aq('a"') # returns "a". Keeps the thing on the left of the # <<
-
class
insights.parsr.
KeepRight
(left, right)[source]¶ Bases:
insights.parsr.Parser
KeepRight takes two parsers. It requires them both to succeed but only returns results for the second one. It consumes input for both.
q = Char('"') a = Char("a") qa = q >> a # like q + a except only the result of a is # returned val = qa('"a') # returns "a". Keeps the thing on the right of the # >>
-
class
insights.parsr.
Lift
(func)[source]¶ Bases:
insights.parsr.Parser
Lift wraps a function of multiple arguments. Use it with the multiplication operator on as many parsers as function arguments, and the results of those parsers will be passed to the function. The result of a Lift parser is the result of the wrapped function.
Example:
.. code-block:: python def comb(a, b, c): return "".join([a, b, c]) # You'd normally invoke comb like comb("x", "y", "z"), but you can # "lift" it for use with parsers like this: x = Char("x") y = Char("y") z = Char("z") p = Lift(comb) * x * y * z # The * operator separates parsers whose results will go into the # arguments of the lifted function. I've used Char above, but x, y, # and z can be arbitrarily complex. val = p("xyz") # would return "xyz" val = p("xyx") # raises an exception. nothing would be consumed
-
class
insights.parsr.
Literal
(chars, value=<object object>, ignore_case=False)[source]¶ Bases:
insights.parsr.Parser
Match a literal string. The
value
keyword lets you return a python value instead of the matched input. Theignore_case
keyword makes the match case insensitive.lit = Literal("true") val = lit("true") # returns "true" val = lit("True") # raises an exception val = lit("one") # raises an exception lit = Literal("true", ignore_case=True) val = lit("true") # returns "true" val = lit("TRUE") # returns "TRUE" val = lit("one") # raises an exception t = Literal("true", value=True) f = Literal("false", value=False) val = t("true") # returns the boolean True val = t("True") # raises an exception val = f("false") # returns the boolean False val = f("False") # raises and exception t = Literal("true", value=True, ignore_case=True) f = Literal("false", value=False, ignore_case=True) val = t("true") # returns the boolean True val = t("True") # returns the boolean True val = f("false") # returns the boolean False val = f("False") # returns the boolean False
-
class
insights.parsr.
Many
(parser, lower=0)[source]¶ Bases:
insights.parsr.Parser
Many wraps another parser and requires it to match a certain number of times.
When Many matches zero occurences (
lower=0
), it always succeeds. Keep this in mind when using it in a list of alternatives or withFollowedBy
orNotFollowedBy
.The results are returned as a list.
x = Char("x") xs = Many(x) # parses many (or no) x's in a row val = xs("") # returns [] val = xs("a") # returns [] val = xs("x") # returns ["x"] val = xs("xxxxx") # returns ["x", "x", "x", "x", "x"] val = xs("xxxxb") # returns ["x", "x", "x", "x"] ab = Many(a + b) # parses "abab..." val = ab("") # produces [] val = ab("ab") # produces [["a", b"]] val = ab("ba") # produces [] val = ab("ababab")# produces [["a", b"], ["a", "b"], ["a", "b"]] ab = Many(a | b) # parses any combination of "a" and "b" like # "aababbaba..." val = ab("aababb")# produces ["a", "a", "b", "a", "b", "b"] bs = Many(Char("b"), lower=1) # requires at least one "b"
-
class
insights.parsr.
Map
(child, func)[source]¶ Bases:
insights.parsr.Parser
Map wraps a parser and a function. It returns the result of using the function to transform the wrapped parser’s result.
Example:
.. code-block:: python Digit = InSet("0123456789") Digits = Many(Digit, lower=1) Number = Digits.map(lambda x: int("".join(x)))
-
class
insights.parsr.
Mark
(lineno, col, value)[source]¶ Bases:
object
An object created by
PosMarker
to capture a value at a position in the input. Marks can give more context to a value transformed by mapped functions.
-
class
insights.parsr.
Node
[source]¶ Bases:
object
Node is the base class of all parsers. It’s a generic tree structure with each instance containing a list of its children. Its main purpose is to simplify pretty printing.
-
class
insights.parsr.
NotFollowedBy
(child, follow)[source]¶ Bases:
insights.parsr.Parser
NotFollowedBy takes a parser and a predicate parser. The initial parser matches only if the predicate parser fails to match the input after it. On success, input for the predicate is left unread, and the result of the first parser is returned.
anb = Char("a") / Char("b") # matches an "a" not followed by a "b". val = anb("ac") # returns "a" and leaves "c" to be # consumed val = anb("ab") # raises an exception and doesn't # consume "a".
-
class
insights.parsr.
OneLineComment
(s)[source]¶ Bases:
insights.parsr.Parser
OneLineComment matches everything from a literal to the end of a line, excluding the end of line characters themselves. It returns the content between the start literal and the end of the line.
Comment = OneLineComment("#") | OneLineComment("//")
-
class
insights.parsr.
Opt
(p, default=None)[source]¶ Bases:
insights.parsr.Parser
Opt wraps a single parser and returns its value if it succeeds. It returns a default value otherwise. The input pointer is advanced only if the wrapped parser succeeds.
a = Char("a") o = Opt(a) # matches an "a" if its available. Still succeeds # otherwise but doesn't advance the read pointer. val = o("a") # returns "a" val = o("b") # returns None. Read pointer is not advanced. o = Opt(a, default="x") # matches an "a" if its available. Returns # "x" otherwise. val = o("a") # returns "a" val = o("b") # returns "x". Read pointer is not advanced.
-
class
insights.parsr.
Parser
[source]¶ Bases:
insights.parsr.Node
Parser is the common base class of all Parsers.
-
debug
(d=True)[source]¶ Set to
True
to enable diagnostic messages before and after the parser is invoked.
-
map
(func)[source]¶ Return a
Map
parser that transforms the results of the current parser with the function func.
-
-
class
insights.parsr.
PosMarker
(parser)[source]¶ Bases:
insights.parsr.Wrapper
Save the line number and column of a subparser by wrapping it in a PosMarker. The value of the parser that handled the input as well as the initial input position will be returned as a
Mark
.
-
class
insights.parsr.
Sequence
(children)[source]¶ Bases:
insights.parsr.Parser
A Sequence requires all of its children to succeed. It returns a list of the values they matched.
Additional uses of
+
on the parser will cause it to accumulate parsers onto itself instead of creating new Sequences. This has the desirable effect of causing sequence results to be represented as flat lists instead of trees, but it can also have unintended consequences if a sequence is used in multiple parts of a grammar as the initial element of another sequence. Use aWrapper
to prevent that from happening.a = Char("a") # parses a single "a" b = Char("b") # parses a single "b" c = Char("c") # parses a single "c" ab = a + b # parses a single "a" followed by a single "b" # (a + b) creates a "Sequence" object. Using `ab` # as an element in a later sequence would modify # its original definition. abc = a + b + c # parses "abc" # (a + b) creates a "Sequence" object to which c # is appended val = ab("ab") # produces a list ["a", "b"] val = ab("a") # raises an exception val = ab("b") # raises an exception val = ab("ac") # raises an exception val = ab("cb") # raises an exception val = abc("abc") # produces ["a", "b", "c"]
-
class
insights.parsr.
StartTagName
(parser)[source]¶ Bases:
insights.parsr.Wrapper
Wraps a parser that represents a starting tag for grammars like xml, html, etc. The tag result is captured and put onto a tag stack in the
Context
object.
-
class
insights.parsr.
String
(chars, echars=None, min_length=1)[source]¶ Bases:
insights.parsr.Parser
Match one or more characters in a set. Matching is greedy.
vowels = String("aeiou") val = vowels("a") # returns "a" val = vowels("u") # returns "u" val = vowels("aaeiouuoui") # returns "aaeiouuoui" val = vowels("uoiea") # returns "uoiea" val = vowels("oouieaaea") # returns "oouieaaea" val = vowels("ga") # raises an exception
-
class
insights.parsr.
Until
(parser, predicate)[source]¶ Bases:
insights.parsr.Parser
Until wraps a parser and a terminal parser. It accumulates matches of the first parser until the terminal parser succeeds. Input for the terminal parser is left unread, and the results of the first parser are returned as a list.
Since Until can match zero occurences, it always succeeds. Keep this in mind when using it in a list of alternatives or with
FollowedBy
orNotFollowedBy
.cs = AnyChar.until(Char("y")) # parses many (or no) characters # until a "y" is encountered. val = cs("") # returns [] val = cs("a") # returns ["a"] val = cs("x") # returns ["x"] val = cs("ccccc") # returns ["c", "c", "c", "c", "c"] val = cs("abcdycc") # returns ["a", "b", "c", "d"]
-
class
insights.parsr.
WithIndent
(parser)[source]¶ Bases:
insights.parsr.Wrapper
Consumes whitespace until a non-whitespace character is encountered, pushes the column position onto an indentation stack in the
Context
, and then calls the parser it’s wrapping. The wrapped parser and any of its children can make use of the saved indentation. Returns the value of the wrapped parser.WithIndent allows
HangingString
to work by giving a way to mark how indented following lines must be to count as continuations.Key = WS >> PosMarker(String(key_chars)) << WS Sep = InSet(sep_chars, "Sep") Value = WS >> (Boolean | HangingString(value_chars)) KVPair = WithIndent(Key + Opt(Sep >> Value))
-
class
insights.parsr.
Wrapper
(parser)[source]¶ Bases:
insights.parsr.Parser
Parser that wraps another parser. This can be used to prevent sequences and choices from accidentally accumulating other parsers when used in multiple parts of a grammar.
insights.parsr.query¶
insights.parsr.query defines a common data model and query language for parsers
created with insights.parsr
to target.
The model allows duplicate keys, and it allows values with unnamed attributes and recursive substructure. This is a common model for many kinds of configuration.
Simple key/value pairs can be represented as a key with a value that has a single attribute. Most dictionary shapes used to represent configuration are made of keys with simple values (key/single attr), lists of simple values (key/multiple attrs), or nested dictionaries (key/substructure).
Something like XML allows duplicate keys, and it allows values to have named attributes and substructure. This module doesn’t cover that case.
Entry
, Directive
, Section
, and
Result
have overloaded __getitem__
functions that respond to
queries. This allows their instances to be accessed like simple dictionaries,
but the key passed to []
is converted to a query of immediate child
instances instead of a simple lookup.
-
class
insights.parsr.query.
ChildQuery
(expr)[source]¶ Bases:
insights.parsr.query._EntryQuery
Returns True if any child entry passes the query.
-
class
insights.parsr.query.
Directive
(name=None, attrs=None, children=None, lineno=None, src=None, set_parents=True)[source]¶ Bases:
insights.parsr.query.Entry
A Directive is an
Entry
that represents a single option or named value. They are normally found inSection
instances.-
section
¶
-
section_name
¶
-
-
class
insights.parsr.query.
Entry
(name=None, attrs=None, children=None, lineno=None, src=None, set_parents=True)[source]¶ Bases:
object
Entry is the base class for the data model, which is a tree of Entry instances. Each instance has a name, attributes, a parent, and children.
-
attrs
¶
-
children
¶
-
choose
(chooser)[source]¶ Run a selector function on each node. It should return a tuple, each element of which is some query using the node. This lets you select parts of each tree in a result.
If you want to rename a field, make the element a dictionary whose key is the name you want and whose value is the query.
If you want to get all the children of a particular node instead of specifying them individually, use the * operator in python 3.5+ or return the query with “.grandchildren” appended otherwise.
Example: >>> from insights.parsr.query import make_child_query as q >>> from insights.parsr.query import from_dict
>>> conf = from_dict(load_config()) >>> p = (q("restartCount", gt(2)) & q("ready", False))
>>> # get the name, the restartCount renamed to restart, the podIP >>> # from the node's parent, and all of the children from >>> # n.lastState.terminated.
>>> # for python 3.5+ >>> sel = lambda n: (n["name"], {"restart": n.restartCount}, n.parent.podIP, *n.lastState.terminated)
>>> # for python 2 >>> sel = lambda n: (n["name"], {"restart": n.restartCount}, n.parent.podIP, n.lastState.terminated.grandchildren)
>>> conf.find(ANY).where(p).choose(sel)
-
crumbs
(down=False)¶ Get the unique paths from the current entry up to the root or down to all of the leaves.
-
find
(*queries, **kwargs)[source]¶ Finds matching results anywhere in the configuration. The arguments are the same as those accepted by
compile_queries()
, and it accepts a keyword calledroots
that will return the ultimate root nodes of any results.
-
get_crumbs
(down=False)[source]¶ Get the unique paths from the current entry up to the root or down to all of the leaves.
-
grandchildren
¶ Returns a flattened list of all grandchildren.
-
keys
()¶ Returns the unique names of all the children as a list.
-
line
¶ Returns the original first line of text that generated the
Entry
.None
if the model wasn’t generated by an insights parser.
-
lineno
¶
-
parent
¶
-
root
¶ Returns the furthest ancestor
Entry
. If the node is already the furthest ancestor,None
is returned.
-
section
¶
-
section_name
¶
-
select
(*queries, **kwargs)[source]¶ select uses
compile_queries()
to compilequeries
into a query function and then passes the function, the currentEntry
instances children, andkwargs
on toselect()
.
-
source
¶
-
src
¶
-
string_value
¶ Returns the string representation of all attributes separated by a single whilespace.
-
value
¶ Returns
None
if no attributes exist, the first attribute if only one exists, or thestring_value
if more than one exists.
-
where
(name, value=None)[source]¶ Selects current nodes based on name and value queries of child nodes. If any immediate children match the queries, the parent is included in the results. The :py:func:
make_child_query
function can be used to construct queries that act on the children as a whole instead of one at a time.Example: >>> from insights.parsr.query import make_child_query as q >>> from insights.parsr.query import from_dict >>> r = from_dict(load_config()) >>> r = conf.status.conditions.where(q(“status”, “False”) | q(“type”, “Progressing”)) >>> r.message >>> r = conf.status.conditions.where(q(“status”, “False”) | q(“type”, “Progressing”)) >>> r.message >>> r.lastTransitionTime.values [‘2019-08-04T23:17:08Z’, ‘2019-08-04T23:32:14Z’]
-
-
class
insights.parsr.query.
Result
(children=None)[source]¶ Bases:
insights.parsr.query.Entry
Result is an Entry whose children are the results of a query.
-
crumbs
(down=False)¶ Get the unique names from the current locations to the roots.
-
keys
()¶ Returns the unique names of all the grandchildren as a list.
-
line
¶ Returns the line of the child if only one child exists. This helps queries behave more like dictionaries when you know only one result should exist.
-
most_common
(top=None)[source]¶ Returns the distribution of values returned by queries that return a single value for each node.
-
nth
(n)[source]¶ If the results are from a list beneath a node, get the nth element of the results for each unique parent.
Example:
conf.status.conditions.nth(0)
will get the 0th condition of each status.
-
parents
¶ Returns all of the deduplicated parents as a list. If a child has no parent, the child itself is treated as the parent.
-
roots
¶ Returns the furthest ancestor
Entry
instances of all children. If a child has no furthest ancestor, the child itself is treated as a root.
-
select
(*queries, **kwargs)[source]¶ select uses
compile_queries()
to compilequeries
into a query function and then passes the function, the currentEntry
instances children, andkwargs
on toselect()
.
-
sources
¶
-
string_value
¶ Returns the string value of the child if only one child exists. This helps queries behave more like dictionaries when you know only one result should exist.
-
unique_values
¶ Returns the unique values of all the children as a list.
-
value
¶ Returns the value of the child if only one child exists. This helps queries behave more like dictionaries when you know only one result should exist.
-
values
¶ Returns the values of all the children as a list.
-
where
(name, value=None)[source]¶ Selects current nodes based on name and value queries of child nodes. If any immediate children match the queries, the parent is included in the results. The :py:func:
make_child_query
function can be used to construct queries that act on the children as a whole instead of one at a time.Example: >>> from insights.parsr.query import make_child_query as q >>> from insights.parsr.query import from_dict >>> r = from_dict(load_config()) >>> r = conf.status.conditions.where(q(“status”, “False”) | q(“type”, “Progressing”)) >>> r.message >>> r = conf.status.conditions.where(q(“status”, “False”) | q(“type”, “Progressing”)) >>> r.message >>> r.lastTransitionTime.values [‘2019-08-04T23:17:08Z’, ‘2019-08-04T23:32:14Z’]
-
-
class
insights.parsr.query.
Section
(name=None, attrs=None, children=None, lineno=None, src=None, set_parents=True)[source]¶ Bases:
insights.parsr.query.Entry
A Section is an
Entry
composed of other Sections andDirective
instances.-
section
¶ Returns the name of the section.
-
section_name
¶ Returns the value of the section.
-
-
insights.parsr.query.
all_
(expr)[source]¶ Use to express that
expr
must succeed on all attributes for the query to be successful. Only works againstEntry
attributes.
-
insights.parsr.query.
any_
(expr)[source]¶ Use to express that
expr
can succeed on any attribute for the query to be successful. Only works againstEntry
attributes.
-
insights.parsr.query.
child_query
(name, value=None)[source]¶ Converts a query into a ChildQuery that works on all child entries at once to determine if the current entry is accepted.
-
insights.parsr.query.
compile_queries
(*queries)[source]¶ compile_queries returns a function that will execute a list of query expressions against an
Entry
. The first query is run against the current entry’s children, the second query is run against the children of the children remaining from the first query, and so on.If a query is a single object, it matches against the name of an Entry. If it’s a tuple, the first element matches against the name, and subsequent elements are tried against each individual attribute. The attribute results are or’d together and that result is anded with the name query. Any query that raises an exception is treated as
False
.
-
insights.parsr.query.
from_dict
(orig, src=None)[source]¶ from_dict is a helper function that does its best to convert a python dict into a tree of
Entry
instances that can be queried.
-
insights.parsr.query.
make_child_query
(name, value=None)¶ Converts a query into a ChildQuery that works on all child entries at once to determine if the current entry is accepted.
-
insights.parsr.query.
pretty_format
(root, indent=4)[source]¶ pretty_format generates a text representation of a model as a list of lines.
-
insights.parsr.query.
select
(query, nodes, deep=False, roots=False)[source]¶ select runs query, a function returned by
compile_queries()
, against a list ofEntry
instances. If you passdeep=True
, select recursively walks each entry in the list and accumulates the results of running the query against it. If you passroots=True
, select returns the deduplicated set of final ancestors of all successful queries. Otherwise, it returns the matching entries.
insights.parsr.query.boolean¶
The boolean module allows delayed evaluation of boolean expressions. You wrap
predicates in objects that have overloaded operators so they can be connected
symbolically to express and
, or
, and not
. This is useful if you
want to build up a complicated predicate and pass it to something else for
evaluation, in particular insights.parsr.query.Entry
instances.
def is_even(n): return (n % 2) == 0 def is_positive(n): return n > 0 even_and_positive = pred(is_even) & pred(is_positive) even_and_positive(6) == True even_and_positive(-2) == False even_and_positive(3) == False
You can also convert two parameter functions to which you want to partially apply an argument. The arguments partially applied will be those after the first argument. The first argument is the value the function should evaluate when it’s fully applied.
import operator lt = pred2(operator.lt) # operator.lt is lt(a, b) == (a < b) gt = pred2(operator.gt) # operator.gt is gt(a, b) == (a > b) gt_five = gt(5) # creates a function of one argument that when called # returns operator.gt(x, 5) lt_ten = lt(10) # creates a function of one argument that when called # returns operator.lt(x, 5) gt_five_and_lt_10 = gt(5) & lt(10)
-
insights.parsr.query.boolean.
And
¶ alias of
insights.parsr.query.boolean.All
-
insights.parsr.query.boolean.
Or
¶ alias of
insights.parsr.query.boolean.Any
insights.specs¶
-
class
insights.specs.
Specs
[source]¶ Bases:
insights.core.spec_factory.SpecSet
-
abrt_ccpp_conf
= insights.specs.Specs.abrt_ccpp_conf¶
-
abrt_status_bare
= insights.specs.Specs.abrt_status_bare¶
-
alternatives_display_python
= insights.specs.Specs.alternatives_display_python¶
-
amq_broker
= insights.specs.Specs.amq_broker¶
-
ansible_host
= insights.specs.Specs.ansible_host¶
-
audispd_conf
= insights.specs.Specs.audispd_conf¶
-
audit_log
= insights.specs.Specs.audit_log¶
-
auditctl_rules
= insights.specs.Specs.auditctl_rules¶
-
auditctl_status
= insights.specs.Specs.auditctl_status¶
-
auditd_conf
= insights.specs.Specs.auditd_conf¶
-
authselect_current
= insights.specs.Specs.authselect_current¶
-
autofs_conf
= insights.specs.Specs.autofs_conf¶
-
avc_cache_threshold
= insights.specs.Specs.avc_cache_threshold¶
-
avc_hash_stats
= insights.specs.Specs.avc_hash_stats¶
-
aws_instance_id_doc
= insights.specs.Specs.aws_instance_id_doc¶
-
aws_instance_id_pkcs7
= insights.specs.Specs.aws_instance_id_pkcs7¶
-
aws_public_hostnames
= insights.specs.Specs.aws_public_hostnames¶
-
aws_public_ipv4_addresses
= insights.specs.Specs.aws_public_ipv4_addresses¶
-
awx_manage_check_license
= insights.specs.Specs.awx_manage_check_license¶
-
awx_manage_check_license_data
= insights.specs.Specs.awx_manage_check_license_data¶
-
awx_manage_print_settings
= insights.specs.Specs.awx_manage_print_settings¶
-
azure_instance_id
= insights.specs.Specs.azure_instance_id¶
-
azure_instance_plan
= insights.specs.Specs.azure_instance_plan¶
-
azure_instance_type
= insights.specs.Specs.azure_instance_type¶
-
azure_load_balancer
= insights.specs.Specs.azure_load_balancer¶
-
bdi_read_ahead_kb
= insights.specs.Specs.bdi_read_ahead_kb¶
-
bios_uuid
= insights.specs.Specs.bios_uuid¶
-
blacklist_report
= insights.specs.Specs.blacklist_report¶
-
blacklisted_specs
= insights.specs.Specs.blacklisted_specs¶
-
blkid
= insights.specs.Specs.blkid¶
-
bond
= insights.specs.Specs.bond¶
-
bond_dynamic_lb
= insights.specs.Specs.bond_dynamic_lb¶
-
boot_loader_entries
= insights.specs.Specs.boot_loader_entries¶
-
branch_info
= insights.specs.Specs.branch_info¶
-
brctl_show
= insights.specs.Specs.brctl_show¶
-
buddyinfo
= insights.specs.Specs.buddyinfo¶
-
candlepin_broker
= insights.specs.Specs.candlepin_broker¶
-
candlepin_error_log
= insights.specs.Specs.candlepin_error_log¶
-
candlepin_log
= insights.specs.Specs.candlepin_log¶
-
catalina_out
= insights.specs.Specs.catalina_out¶
-
catalina_server_log
= insights.specs.Specs.catalina_server_log¶
-
cciss
= insights.specs.Specs.cciss¶
-
cdc_wdm
= insights.specs.Specs.cdc_wdm¶
-
ceilometer_central_log
= insights.specs.Specs.ceilometer_central_log¶
-
ceilometer_collector_log
= insights.specs.Specs.ceilometer_collector_log¶
-
ceilometer_compute_log
= insights.specs.Specs.ceilometer_compute_log¶
-
ceilometer_conf
= insights.specs.Specs.ceilometer_conf¶
-
ceph_conf
= insights.specs.Specs.ceph_conf¶
-
ceph_config_show
= insights.specs.Specs.ceph_config_show¶
-
ceph_df_detail
= insights.specs.Specs.ceph_df_detail¶
-
ceph_health_detail
= insights.specs.Specs.ceph_health_detail¶
-
ceph_insights
= insights.specs.Specs.ceph_insights¶
-
ceph_log
= insights.specs.Specs.ceph_log¶
-
ceph_osd_df
= insights.specs.Specs.ceph_osd_df¶
-
ceph_osd_dump
= insights.specs.Specs.ceph_osd_dump¶
-
ceph_osd_ec_profile_get
= insights.specs.Specs.ceph_osd_ec_profile_get¶
-
ceph_osd_ec_profile_ls
= insights.specs.Specs.ceph_osd_ec_profile_ls¶
-
ceph_osd_log
= insights.specs.Specs.ceph_osd_log¶
-
ceph_osd_tree
= insights.specs.Specs.ceph_osd_tree¶
-
ceph_osd_tree_text
= insights.specs.Specs.ceph_osd_tree_text¶
-
ceph_report
= insights.specs.Specs.ceph_report¶
-
ceph_s
= insights.specs.Specs.ceph_s¶
-
ceph_v
= insights.specs.Specs.ceph_v¶
-
certificates_enddate
= insights.specs.Specs.certificates_enddate¶
-
cgroups
= insights.specs.Specs.cgroups¶
-
checkin_conf
= insights.specs.Specs.checkin_conf¶
-
chkconfig
= insights.specs.Specs.chkconfig¶
-
chrony_conf
= insights.specs.Specs.chrony_conf¶
-
chronyc_sources
= insights.specs.Specs.chronyc_sources¶
-
cib_xml
= insights.specs.Specs.cib_xml¶
-
cinder_api_log
= insights.specs.Specs.cinder_api_log¶
-
cinder_conf
= insights.specs.Specs.cinder_conf¶
-
cinder_volume_log
= insights.specs.Specs.cinder_volume_log¶
-
cloud_cfg
= insights.specs.Specs.cloud_cfg¶
-
cloud_cfg_filtered
= insights.specs.Specs.cloud_cfg_filtered¶
-
cloud_init_custom_network
= insights.specs.Specs.cloud_init_custom_network¶
-
cloud_init_log
= insights.specs.Specs.cloud_init_log¶
-
cluster_conf
= insights.specs.Specs.cluster_conf¶
-
cmdline
= insights.specs.Specs.cmdline¶
-
cni_podman_bridge_conf
= insights.specs.Specs.cni_podman_bridge_conf¶
-
cobbler_modules_conf
= insights.specs.Specs.cobbler_modules_conf¶
-
cobbler_settings
= insights.specs.Specs.cobbler_settings¶
-
container_cpu_online
= insights.specs.Specs.container_cpu_online¶
-
container_cpuset_cpus
= insights.specs.Specs.container_cpuset_cpus¶
-
container_dotnet_version
= insights.specs.Specs.container_dotnet_version¶
-
container_inspect_keys
= insights.specs.Specs.container_inspect_keys¶
-
container_installed_rpms
= insights.specs.Specs.container_installed_rpms¶
-
container_mssql_api_assessment
= insights.specs.Specs.container_mssql_api_assessment¶
-
container_nginx_conf
= insights.specs.Specs.container_nginx_conf¶
-
container_nginx_error_log
= insights.specs.Specs.container_nginx_error_log¶
-
container_ps_aux
= insights.specs.Specs.container_ps_aux¶
-
container_redhat_release
= insights.specs.Specs.container_redhat_release¶
-
container_vsftpd_conf
= insights.specs.Specs.container_vsftpd_conf¶
-
containers_inspect
= insights.specs.Specs.containers_inspect¶
-
containers_policy
= insights.specs.Specs.containers_policy¶
-
corosync
= insights.specs.Specs.corosync¶
-
corosync_cmapctl
= insights.specs.Specs.corosync_cmapctl¶
-
corosync_conf
= insights.specs.Specs.corosync_conf¶
-
cpe
= insights.specs.Specs.cpe¶
-
cpu_cores
= insights.specs.Specs.cpu_cores¶
-
cpu_siblings
= insights.specs.Specs.cpu_siblings¶
-
cpu_smt_active
= insights.specs.Specs.cpu_smt_active¶
-
cpu_smt_control
= insights.specs.Specs.cpu_smt_control¶
-
cpu_vulns
= insights.specs.Specs.cpu_vulns¶
-
cpuinfo
= insights.specs.Specs.cpuinfo¶
-
cpuinfo_max_freq
= insights.specs.Specs.cpuinfo_max_freq¶
-
cpupower_frequency_info
= insights.specs.Specs.cpupower_frequency_info¶
-
cpuset_cpus
= insights.specs.Specs.cpuset_cpus¶
-
crictl_logs
= insights.specs.Specs.crictl_logs¶
-
crio_conf
= insights.specs.Specs.crio_conf¶
-
cron_daily_rhsmd
= insights.specs.Specs.cron_daily_rhsmd¶
-
cron_foreman
= insights.specs.Specs.cron_foreman¶
-
crt
= insights.specs.Specs.crt¶
-
crypto_policies_bind
= insights.specs.Specs.crypto_policies_bind¶
-
crypto_policies_config
= insights.specs.Specs.crypto_policies_config¶
-
crypto_policies_opensshserver
= insights.specs.Specs.crypto_policies_opensshserver¶
-
crypto_policies_state_current
= insights.specs.Specs.crypto_policies_state_current¶
-
cryptsetup_luksDump
= insights.specs.Specs.cryptsetup_luksDump¶
-
cups_files_conf
= insights.specs.Specs.cups_files_conf¶
-
cups_ppd
= insights.specs.Specs.cups_ppd¶
-
cupsd_conf
= insights.specs.Specs.cupsd_conf¶
-
current_clocksource
= insights.specs.Specs.current_clocksource¶
-
date
= insights.specs.Specs.date¶
-
date_iso
= insights.specs.Specs.date_iso¶
-
date_utc
= insights.specs.Specs.date_utc¶
-
db2ls_a_c
= insights.specs.Specs.db2ls_a_c¶
-
dcbtool_gc_dcb
= insights.specs.Specs.dcbtool_gc_dcb¶
-
designate_conf
= insights.specs.Specs.designate_conf¶
-
df__al
= insights.specs.Specs.df__al¶
-
df__alP
= insights.specs.Specs.df__alP¶
-
df__li
= insights.specs.Specs.df__li¶
-
dig
= insights.specs.Specs.dig¶
-
dig_dnssec
= insights.specs.Specs.dig_dnssec¶
-
dig_edns
= insights.specs.Specs.dig_edns¶
-
dig_noedns
= insights.specs.Specs.dig_noedns¶
-
dirsrv
= insights.specs.Specs.dirsrv¶
-
dirsrv_access
= insights.specs.Specs.dirsrv_access¶
-
dirsrv_errors
= insights.specs.Specs.dirsrv_errors¶
-
display_java
= insights.specs.Specs.display_java¶
-
display_name
= insights.specs.Specs.display_name¶
-
dm_mod_use_blk_mq
= insights.specs.Specs.dm_mod_use_blk_mq¶
-
dmesg
= insights.specs.Specs.dmesg¶
-
dmesg_log
= insights.specs.Specs.dmesg_log¶
-
dmidecode
= insights.specs.Specs.dmidecode¶
-
dmsetup_info
= insights.specs.Specs.dmsetup_info¶
-
dmsetup_status
= insights.specs.Specs.dmsetup_status¶
-
dnf_conf
= insights.specs.Specs.dnf_conf¶
-
dnf_module_info
= insights.specs.Specs.dnf_module_info¶
-
dnf_module_list
= insights.specs.Specs.dnf_module_list¶
-
dnf_modules
= insights.specs.Specs.dnf_modules¶
-
dnsmasq_config
= insights.specs.Specs.dnsmasq_config¶
-
docker_container_inspect
= insights.specs.Specs.docker_container_inspect¶
-
docker_host_machine_id
= insights.specs.Specs.docker_host_machine_id¶
-
docker_image_inspect
= insights.specs.Specs.docker_image_inspect¶
-
docker_info
= insights.specs.Specs.docker_info¶
-
docker_list_containers
= insights.specs.Specs.docker_list_containers¶
-
docker_list_images
= insights.specs.Specs.docker_list_images¶
-
docker_network
= insights.specs.Specs.docker_network¶
-
docker_storage
= insights.specs.Specs.docker_storage¶
-
docker_storage_setup
= insights.specs.Specs.docker_storage_setup¶
-
docker_sysconfig
= insights.specs.Specs.docker_sysconfig¶
-
dotnet_version
= insights.specs.Specs.dotnet_version¶
-
doveconf
= insights.specs.Specs.doveconf¶
-
dracut_kdump_capture_service
= insights.specs.Specs.dracut_kdump_capture_service¶
-
dse_ldif
= insights.specs.Specs.dse_ldif¶
-
du_dirs
= insights.specs.Specs.du_dirs¶
-
dumpe2fs_h
= insights.specs.Specs.dumpe2fs_h¶
-
duplicate_machine_id
= insights.specs.Specs.duplicate_machine_id¶
-
eap_json_reports
= insights.specs.Specs.eap_json_reports¶
-
egg_release
= insights.specs.Specs.egg_release¶
-
engine_config_all
= insights.specs.Specs.engine_config_all¶
-
engine_db_query_vdsm_version
= insights.specs.Specs.engine_db_query_vdsm_version¶
-
engine_log
= insights.specs.Specs.engine_log¶
-
etc_journald_conf
= insights.specs.Specs.etc_journald_conf¶
-
etc_journald_conf_d
= insights.specs.Specs.etc_journald_conf_d¶
-
etc_machine_id
= insights.specs.Specs.etc_machine_id¶
-
etc_udev_40_redhat_rules
= insights.specs.Specs.etc_udev_40_redhat_rules¶
-
etc_udev_oracle_asm_rules
= insights.specs.Specs.etc_udev_oracle_asm_rules¶
-
etcd_conf
= insights.specs.Specs.etcd_conf¶
-
ethtool
= insights.specs.Specs.ethtool¶
-
ethtool_S
= insights.specs.Specs.ethtool_S¶
-
ethtool_T
= insights.specs.Specs.ethtool_T¶
-
ethtool_a
= insights.specs.Specs.ethtool_a¶
-
ethtool_c
= insights.specs.Specs.ethtool_c¶
-
ethtool_g
= insights.specs.Specs.ethtool_g¶
-
ethtool_i
= insights.specs.Specs.ethtool_i¶
-
ethtool_k
= insights.specs.Specs.ethtool_k¶
-
exim_conf
= insights.specs.Specs.exim_conf¶
-
facter
= insights.specs.Specs.facter¶
-
fapolicyd_rules
= insights.specs.Specs.fapolicyd_rules¶
-
fc_match
= insights.specs.Specs.fc_match¶
-
fcoeadm_i
= insights.specs.Specs.fcoeadm_i¶
-
fdisk_l
= insights.specs.Specs.fdisk_l¶
-
fdisk_l_sos
= insights.specs.Specs.fdisk_l_sos¶
-
findmnt_lo_propagation
= insights.specs.Specs.findmnt_lo_propagation¶
-
firewall_cmd_list_all_zones
= insights.specs.Specs.firewall_cmd_list_all_zones¶
-
firewalld_conf
= insights.specs.Specs.firewalld_conf¶
-
foreman_production_log
= insights.specs.Specs.foreman_production_log¶
-
foreman_proxy_conf
= insights.specs.Specs.foreman_proxy_conf¶
-
foreman_proxy_log
= insights.specs.Specs.foreman_proxy_log¶
-
foreman_rake_db_migrate_status
= insights.specs.Specs.foreman_rake_db_migrate_status¶
-
foreman_satellite_log
= insights.specs.Specs.foreman_satellite_log¶
-
foreman_ssl_access_ssl_log
= insights.specs.Specs.foreman_ssl_access_ssl_log¶
-
foreman_ssl_error_ssl_log
= insights.specs.Specs.foreman_ssl_error_ssl_log¶
-
foreman_tasks_config
= insights.specs.Specs.foreman_tasks_config¶
-
freeipa_healthcheck_log
= insights.specs.Specs.freeipa_healthcheck_log¶
-
fstab
= insights.specs.Specs.fstab¶
-
fw_devices
= insights.specs.Specs.fw_devices¶
-
fw_security
= insights.specs.Specs.fw_security¶
-
galera_cnf
= insights.specs.Specs.galera_cnf¶
-
gcp_instance_type
= insights.specs.Specs.gcp_instance_type¶
-
gcp_license_codes
= insights.specs.Specs.gcp_license_codes¶
-
gcp_network_interfaces
= insights.specs.Specs.gcp_network_interfaces¶
-
getcert_list
= insights.specs.Specs.getcert_list¶
-
getconf_page_size
= insights.specs.Specs.getconf_page_size¶
-
getenforce
= insights.specs.Specs.getenforce¶
-
getsebool
= insights.specs.Specs.getsebool¶
-
gfs2_file_system_block_size
= insights.specs.Specs.gfs2_file_system_block_size¶
-
glance_api_conf
= insights.specs.Specs.glance_api_conf¶
-
glance_api_log
= insights.specs.Specs.glance_api_log¶
-
glance_cache_conf
= insights.specs.Specs.glance_cache_conf¶
-
glance_registry_conf
= insights.specs.Specs.glance_registry_conf¶
-
gluster_peer_status
= insights.specs.Specs.gluster_peer_status¶
-
gluster_v_info
= insights.specs.Specs.gluster_v_info¶
-
gluster_v_status
= insights.specs.Specs.gluster_v_status¶
-
gnocchi_conf
= insights.specs.Specs.gnocchi_conf¶
-
gnocchi_metricd_log
= insights.specs.Specs.gnocchi_metricd_log¶
-
greenboot_status
= insights.specs.Specs.greenboot_status¶
-
group_info
= insights.specs.Specs.group_info¶
-
grub1_config_perms
= insights.specs.Specs.grub1_config_perms¶
-
grub2_cfg
= insights.specs.Specs.grub2_cfg¶
-
grub2_efi_cfg
= insights.specs.Specs.grub2_efi_cfg¶
-
grub_conf
= insights.specs.Specs.grub_conf¶
-
grub_config_perms
= insights.specs.Specs.grub_config_perms¶
-
grub_efi_conf
= insights.specs.Specs.grub_efi_conf¶
-
grubby_default_index
= insights.specs.Specs.grubby_default_index¶
-
grubby_default_kernel
= insights.specs.Specs.grubby_default_kernel¶
-
grubenv
= insights.specs.Specs.grubenv¶
-
hammer_ping
= insights.specs.Specs.hammer_ping¶
-
hammer_task_list
= insights.specs.Specs.hammer_task_list¶
-
haproxy_cfg
= insights.specs.Specs.haproxy_cfg¶
-
haproxy_cfg_scl
= insights.specs.Specs.haproxy_cfg_scl¶
-
heat_api_log
= insights.specs.Specs.heat_api_log¶
-
heat_conf
= insights.specs.Specs.heat_conf¶
-
heat_crontab
= insights.specs.Specs.heat_crontab¶
-
heat_crontab_container
= insights.specs.Specs.heat_crontab_container¶
-
heat_engine_log
= insights.specs.Specs.heat_engine_log¶
-
hostname
= insights.specs.Specs.hostname¶
-
hostname_default
= insights.specs.Specs.hostname_default¶
-
hostname_short
= insights.specs.Specs.hostname_short¶
-
hosts
= insights.specs.Specs.hosts¶
-
hponcfg_g
= insights.specs.Specs.hponcfg_g¶
-
httpd24_httpd_error_log
= insights.specs.Specs.httpd24_httpd_error_log¶
-
httpd_M
= insights.specs.Specs.httpd_M¶
-
httpd_V
= insights.specs.Specs.httpd_V¶
-
httpd_access_log
= insights.specs.Specs.httpd_access_log¶
-
httpd_cert_info_in_nss
= insights.specs.Specs.httpd_cert_info_in_nss¶
-
httpd_conf
= insights.specs.Specs.httpd_conf¶
-
httpd_conf_scl_httpd24
= insights.specs.Specs.httpd_conf_scl_httpd24¶
-
httpd_conf_scl_jbcs_httpd24
= insights.specs.Specs.httpd_conf_scl_jbcs_httpd24¶
-
httpd_error_log
= insights.specs.Specs.httpd_error_log¶
-
httpd_limits
= insights.specs.Specs.httpd_limits¶
-
httpd_on_nfs
= insights.specs.Specs.httpd_on_nfs¶
-
httpd_ssl_access_log
= insights.specs.Specs.httpd_ssl_access_log¶
-
httpd_ssl_cert_enddate
= insights.specs.Specs.httpd_ssl_cert_enddate¶
-
httpd_ssl_error_log
= insights.specs.Specs.httpd_ssl_error_log¶
-
ibm_fw_vernum_encoded
= insights.specs.Specs.ibm_fw_vernum_encoded¶
-
ibm_lparcfg
= insights.specs.Specs.ibm_lparcfg¶
-
ifcfg
= insights.specs.Specs.ifcfg¶
-
ifcfg_static_route
= insights.specs.Specs.ifcfg_static_route¶
-
ifconfig
= insights.specs.Specs.ifconfig¶
-
imagemagick_policy
= insights.specs.Specs.imagemagick_policy¶
-
init_ora
= insights.specs.Specs.init_ora¶
-
init_process_cgroup
= insights.specs.Specs.init_process_cgroup¶
-
initctl_lst
= insights.specs.Specs.initctl_lst¶
-
initscript
= insights.specs.Specs.initscript¶
-
insights_client_conf
= insights.specs.Specs.insights_client_conf¶
-
installed_rpms
= insights.specs.Specs.installed_rpms¶
-
interrupts
= insights.specs.Specs.interrupts¶
-
ip6tables
= insights.specs.Specs.ip6tables¶
-
ip6tables_permanent
= insights.specs.Specs.ip6tables_permanent¶
-
ip_addr
= insights.specs.Specs.ip_addr¶
-
ip_addresses
= insights.specs.Specs.ip_addresses¶
-
ip_neigh_show
= insights.specs.Specs.ip_neigh_show¶
-
ip_netns_exec_namespace_lsof
= insights.specs.Specs.ip_netns_exec_namespace_lsof¶
-
ip_route_show_table_all
= insights.specs.Specs.ip_route_show_table_all¶
-
ip_s_link
= insights.specs.Specs.ip_s_link¶
-
ipa_default_conf
= insights.specs.Specs.ipa_default_conf¶
-
ipaupgrade_log
= insights.specs.Specs.ipaupgrade_log¶
-
ipcs_m
= insights.specs.Specs.ipcs_m¶
-
ipcs_m_p
= insights.specs.Specs.ipcs_m_p¶
-
ipcs_s
= insights.specs.Specs.ipcs_s¶
-
ipcs_s_i
= insights.specs.Specs.ipcs_s_i¶
-
ipsec_conf
= insights.specs.Specs.ipsec_conf¶
-
iptables
= insights.specs.Specs.iptables¶
-
iptables_permanent
= insights.specs.Specs.iptables_permanent¶
-
ipv4_neigh
= insights.specs.Specs.ipv4_neigh¶
-
ipv6_neigh
= insights.specs.Specs.ipv6_neigh¶
-
iris_cpf
= insights.specs.Specs.iris_cpf¶
-
iris_list
= insights.specs.Specs.iris_list¶
-
iris_messages_log
= insights.specs.Specs.iris_messages_log¶
-
ironic_conf
= insights.specs.Specs.ironic_conf¶
-
ironic_inspector_log
= insights.specs.Specs.ironic_inspector_log¶
-
iscsiadm_m_session
= insights.specs.Specs.iscsiadm_m_session¶
-
jbcs_httpd24_httpd_error_log
= insights.specs.Specs.jbcs_httpd24_httpd_error_log¶
-
jboss_domain_server_log
= insights.specs.Specs.jboss_domain_server_log¶
-
jboss_runtime_versions
= insights.specs.Specs.jboss_runtime_versions¶
-
jboss_standalone_main_config
= insights.specs.Specs.jboss_standalone_main_config¶
-
jboss_standalone_server_log
= insights.specs.Specs.jboss_standalone_server_log¶
-
jboss_version
= insights.specs.Specs.jboss_version¶
-
journal_all
= insights.specs.Specs.journal_all¶
-
journal_header
= insights.specs.Specs.journal_header¶
-
journal_since_boot
= insights.specs.Specs.journal_since_boot¶
-
katello_service_status
= insights.specs.Specs.katello_service_status¶
-
kdump_conf
= insights.specs.Specs.kdump_conf¶
-
kerberos_kdc_log
= insights.specs.Specs.kerberos_kdc_log¶
-
kernel_config
= insights.specs.Specs.kernel_config¶
-
kernel_crash_kexec_post_notifiers
= insights.specs.Specs.kernel_crash_kexec_post_notifiers¶
-
kexec_crash_loaded
= insights.specs.Specs.kexec_crash_loaded¶
-
kexec_crash_size
= insights.specs.Specs.kexec_crash_size¶
-
keystone_conf
= insights.specs.Specs.keystone_conf¶
-
keystone_crontab
= insights.specs.Specs.keystone_crontab¶
-
keystone_crontab_container
= insights.specs.Specs.keystone_crontab_container¶
-
keystone_log
= insights.specs.Specs.keystone_log¶
-
kpatch_list
= insights.specs.Specs.kpatch_list¶
-
krb5
= insights.specs.Specs.krb5¶
-
ksmstate
= insights.specs.Specs.ksmstate¶
-
ktimer_lockless
= insights.specs.Specs.ktimer_lockless¶
-
kubepods_cpu_quota
= insights.specs.Specs.kubepods_cpu_quota¶
-
lastupload
= insights.specs.Specs.lastupload¶
-
ld_library_path_of_user
= insights.specs.Specs.ld_library_path_of_user¶
-
ldif_config
= insights.specs.Specs.ldif_config¶
-
leapp_migration_results
= insights.specs.Specs.leapp_migration_results¶
-
leapp_report
= insights.specs.Specs.leapp_report¶
-
libssh_client_config
= insights.specs.Specs.libssh_client_config¶
-
libssh_server_config
= insights.specs.Specs.libssh_server_config¶
-
libvirtd_log
= insights.specs.Specs.libvirtd_log¶
-
libvirtd_qemu_log
= insights.specs.Specs.libvirtd_qemu_log¶
-
limits_conf
= insights.specs.Specs.limits_conf¶
-
locale
= insights.specs.Specs.locale¶
-
localtime
= insights.specs.Specs.localtime¶
-
logrotate_conf
= insights.specs.Specs.logrotate_conf¶
-
losetup
= insights.specs.Specs.losetup¶
-
lpfc_max_luns
= insights.specs.Specs.lpfc_max_luns¶
-
lpstat_p
= insights.specs.Specs.lpstat_p¶
-
lpstat_protocol_printers
= insights.specs.Specs.lpstat_protocol_printers¶
-
lpstat_queued_jobs_count
= insights.specs.Specs.lpstat_queued_jobs_count¶
-
ls_R_var_lib_nova_instances
= insights.specs.Specs.ls_R_var_lib_nova_instances¶
-
ls_boot
= insights.specs.Specs.ls_boot¶
-
ls_dev
= insights.specs.Specs.ls_dev¶
-
ls_disk
= insights.specs.Specs.ls_disk¶
-
ls_docker_volumes
= insights.specs.Specs.ls_docker_volumes¶
-
ls_edac_mc
= insights.specs.Specs.ls_edac_mc¶
-
ls_etc
= insights.specs.Specs.ls_etc¶
-
ls_etc_ssh
= insights.specs.Specs.ls_etc_ssh¶
-
ls_ipa_idoverride_memberof
= insights.specs.Specs.ls_ipa_idoverride_memberof¶
-
ls_krb5_sssd
= insights.specs.Specs.ls_krb5_sssd¶
-
ls_la
= insights.specs.Specs.ls_la¶
-
ls_la_dirs
= insights.specs.Specs.ls_la_dirs¶
-
ls_la_filtered
= insights.specs.Specs.ls_la_filtered¶
-
ls_la_filtered_dirs
= insights.specs.Specs.ls_la_filtered_dirs¶
-
ls_lan
= insights.specs.Specs.ls_lan¶
-
ls_lanL
= insights.specs.Specs.ls_lanL¶
-
ls_lanL_dirs
= insights.specs.Specs.ls_lanL_dirs¶
-
ls_lanR
= insights.specs.Specs.ls_lanR¶
-
ls_lanRL
= insights.specs.Specs.ls_lanRL¶
-
ls_lanRL_dirs
= insights.specs.Specs.ls_lanRL_dirs¶
-
ls_lanRZ
= insights.specs.Specs.ls_lanRZ¶
-
ls_lanRZ_dirs
= insights.specs.Specs.ls_lanRZ_dirs¶
-
ls_lanR_dirs
= insights.specs.Specs.ls_lanR_dirs¶
-
ls_lanZ
= insights.specs.Specs.ls_lanZ¶
-
ls_lanZ_dirs
= insights.specs.Specs.ls_lanZ_dirs¶
-
ls_lan_dirs
= insights.specs.Specs.ls_lan_dirs¶
-
ls_lan_filtered
= insights.specs.Specs.ls_lan_filtered¶
-
ls_lan_filtered_dirs
= insights.specs.Specs.ls_lan_filtered_dirs¶
-
ls_lib_firmware
= insights.specs.Specs.ls_lib_firmware¶
-
ls_ocp_cni_openshift_sdn
= insights.specs.Specs.ls_ocp_cni_openshift_sdn¶
-
ls_origin_local_volumes_pods
= insights.specs.Specs.ls_origin_local_volumes_pods¶
-
ls_osroot
= insights.specs.Specs.ls_osroot¶
-
ls_rsyslog_errorfile
= insights.specs.Specs.ls_rsyslog_errorfile¶
-
ls_sys_firmware
= insights.specs.Specs.ls_sys_firmware¶
-
ls_systemd_units
= insights.specs.Specs.ls_systemd_units¶
-
ls_tmp
= insights.specs.Specs.ls_tmp¶
-
ls_usr_bin
= insights.specs.Specs.ls_usr_bin¶
-
ls_usr_lib64
= insights.specs.Specs.ls_usr_lib64¶
-
ls_usr_sbin
= insights.specs.Specs.ls_usr_sbin¶
-
ls_var_cache_pulp
= insights.specs.Specs.ls_var_cache_pulp¶
-
ls_var_lib_mongodb
= insights.specs.Specs.ls_var_lib_mongodb¶
-
ls_var_lib_nova_instances
= insights.specs.Specs.ls_var_lib_nova_instances¶
-
ls_var_lib_pcp
= insights.specs.Specs.ls_var_lib_pcp¶
-
ls_var_lib_rpm
= insights.specs.Specs.ls_var_lib_rpm¶
-
ls_var_lib_rsyslog
= insights.specs.Specs.ls_var_lib_rsyslog¶
-
ls_var_log
= insights.specs.Specs.ls_var_log¶
-
ls_var_opt_mssql
= insights.specs.Specs.ls_var_opt_mssql¶
-
ls_var_opt_mssql_log
= insights.specs.Specs.ls_var_opt_mssql_log¶
-
ls_var_run
= insights.specs.Specs.ls_var_run¶
-
ls_var_spool_clientmq
= insights.specs.Specs.ls_var_spool_clientmq¶
-
ls_var_spool_postfix_maildrop
= insights.specs.Specs.ls_var_spool_postfix_maildrop¶
-
ls_var_tmp
= insights.specs.Specs.ls_var_tmp¶
-
ls_var_www
= insights.specs.Specs.ls_var_www¶
-
lsblk
= insights.specs.Specs.lsblk¶
-
lsblk_pairs
= insights.specs.Specs.lsblk_pairs¶
-
lscpu
= insights.specs.Specs.lscpu¶
-
lsinitrd
= insights.specs.Specs.lsinitrd¶
-
lsinitrd_kdump_image
= insights.specs.Specs.lsinitrd_kdump_image¶
-
lsinitrd_lvm_conf
= insights.specs.Specs.lsinitrd_lvm_conf¶
-
lsmod
= insights.specs.Specs.lsmod¶
-
lsof
= insights.specs.Specs.lsof¶
-
lspci
= insights.specs.Specs.lspci¶
-
lspci_vmmkn
= insights.specs.Specs.lspci_vmmkn¶
-
lssap
= insights.specs.Specs.lssap¶
-
lsscsi
= insights.specs.Specs.lsscsi¶
-
luksmeta
= insights.specs.Specs.luksmeta¶
-
lvdisplay
= insights.specs.Specs.lvdisplay¶
-
lvm_conf
= insights.specs.Specs.lvm_conf¶
-
lvm_fullreport
= insights.specs.Specs.lvm_fullreport¶
-
lvm_system_devices
= insights.specs.Specs.lvm_system_devices¶
-
lvmconfig
= insights.specs.Specs.lvmconfig¶
-
lvs_headings
= insights.specs.Specs.lvs_headings¶
-
lvs_noheadings
= insights.specs.Specs.lvs_noheadings¶
-
lvs_noheadings_all
= insights.specs.Specs.lvs_noheadings_all¶
-
mac_addresses
= insights.specs.Specs.mac_addresses¶
-
machine_id
= insights.specs.Specs.machine_id¶
-
malware_detection
= insights.specs.Specs.malware_detection¶
-
manila_conf
= insights.specs.Specs.manila_conf¶
-
mariadb_log
= insights.specs.Specs.mariadb_log¶
-
max_uid
= insights.specs.Specs.max_uid¶
-
md5chk_files
= insights.specs.Specs.md5chk_files¶
-
mdadm_D
= insights.specs.Specs.mdadm_D¶
-
mdadm_E
= insights.specs.Specs.mdadm_E¶
-
mdstat
= insights.specs.Specs.mdstat¶
-
meminfo
= insights.specs.Specs.meminfo¶
-
messages
= insights.specs.Specs.messages¶
-
metadata_json
= insights.specs.Specs.metadata_json¶
-
mistral_executor_log
= insights.specs.Specs.mistral_executor_log¶
-
mlx4_port
= insights.specs.Specs.mlx4_port¶
-
modinfo_filtered_modules
= insights.specs.Specs.modinfo_filtered_modules¶
-
modinfo_modules
= insights.specs.Specs.modinfo_modules¶
-
modprobe
= insights.specs.Specs.modprobe¶
-
mokutil_sbstate
= insights.specs.Specs.mokutil_sbstate¶
-
mongod_conf
= insights.specs.Specs.mongod_conf¶
-
mount
= insights.specs.Specs.mount¶
-
mountinfo
= insights.specs.Specs.mountinfo¶
-
mounts
= insights.specs.Specs.mounts¶
-
mpirun_version
= insights.specs.Specs.mpirun_version¶
-
mssql_api_assessment
= insights.specs.Specs.mssql_api_assessment¶
-
mssql_conf
= insights.specs.Specs.mssql_conf¶
-
mssql_tls_cert_enddate
= insights.specs.Specs.mssql_tls_cert_enddate¶
-
multicast_querier
= insights.specs.Specs.multicast_querier¶
-
multipath__v4__ll
= insights.specs.Specs.multipath__v4__ll¶
-
multipath_conf
= insights.specs.Specs.multipath_conf¶
-
multipath_conf_initramfs
= insights.specs.Specs.multipath_conf_initramfs¶
-
mysql_log
= insights.specs.Specs.mysql_log¶
-
mysqladmin_status
= insights.specs.Specs.mysqladmin_status¶
-
mysqladmin_vars
= insights.specs.Specs.mysqladmin_vars¶
-
mysqld_limits
= insights.specs.Specs.mysqld_limits¶
-
named_checkconf_p
= insights.specs.Specs.named_checkconf_p¶
-
named_conf
= insights.specs.Specs.named_conf¶
-
namespace
= insights.specs.Specs.namespace¶
-
ndctl_list_Ni
= insights.specs.Specs.ndctl_list_Ni¶
-
netconsole
= insights.specs.Specs.netconsole¶
-
netstat
= insights.specs.Specs.netstat¶
-
netstat_agn
= insights.specs.Specs.netstat_agn¶
-
netstat_i
= insights.specs.Specs.netstat_i¶
-
netstat_s
= insights.specs.Specs.netstat_s¶
-
networkmanager_conf
= insights.specs.Specs.networkmanager_conf¶
-
networkmanager_dispatcher_d
= insights.specs.Specs.networkmanager_dispatcher_d¶
-
neutron_conf
= insights.specs.Specs.neutron_conf¶
-
neutron_dhcp_agent_ini
= insights.specs.Specs.neutron_dhcp_agent_ini¶
-
neutron_l3_agent_ini
= insights.specs.Specs.neutron_l3_agent_ini¶
-
neutron_l3_agent_log
= insights.specs.Specs.neutron_l3_agent_log¶
-
neutron_metadata_agent_ini
= insights.specs.Specs.neutron_metadata_agent_ini¶
-
neutron_metadata_agent_log
= insights.specs.Specs.neutron_metadata_agent_log¶
-
neutron_ml2_conf
= insights.specs.Specs.neutron_ml2_conf¶
-
neutron_ovs_agent_log
= insights.specs.Specs.neutron_ovs_agent_log¶
-
neutron_plugin_ini
= insights.specs.Specs.neutron_plugin_ini¶
-
neutron_server_log
= insights.specs.Specs.neutron_server_log¶
-
neutron_sriov_agent
= insights.specs.Specs.neutron_sriov_agent¶
-
nfnetlink_queue
= insights.specs.Specs.nfnetlink_queue¶
-
nfs_conf
= insights.specs.Specs.nfs_conf¶
-
nfs_exports
= insights.specs.Specs.nfs_exports¶
-
nfs_exports_d
= insights.specs.Specs.nfs_exports_d¶
-
nginx_conf
= insights.specs.Specs.nginx_conf¶
-
nginx_error_log
= insights.specs.Specs.nginx_error_log¶
-
nginx_ssl_cert_enddate
= insights.specs.Specs.nginx_ssl_cert_enddate¶
-
nmcli_conn_show
= insights.specs.Specs.nmcli_conn_show¶
-
nmcli_dev_show
= insights.specs.Specs.nmcli_dev_show¶
-
nmcli_dev_show_sos
= insights.specs.Specs.nmcli_dev_show_sos¶
-
nova_api_log
= insights.specs.Specs.nova_api_log¶
-
nova_compute_log
= insights.specs.Specs.nova_compute_log¶
-
nova_conf
= insights.specs.Specs.nova_conf¶
-
nova_crontab
= insights.specs.Specs.nova_crontab¶
-
nova_crontab_container
= insights.specs.Specs.nova_crontab_container¶
-
nova_migration_uid
= insights.specs.Specs.nova_migration_uid¶
-
nova_uid
= insights.specs.Specs.nova_uid¶
-
nscd_conf
= insights.specs.Specs.nscd_conf¶
-
nss_rhel7
= insights.specs.Specs.nss_rhel7¶
-
nsswitch_conf
= insights.specs.Specs.nsswitch_conf¶
-
ntp_conf
= insights.specs.Specs.ntp_conf¶
-
ntpq_leap
= insights.specs.Specs.ntpq_leap¶
-
ntpq_pn
= insights.specs.Specs.ntpq_pn¶
-
ntptime
= insights.specs.Specs.ntptime¶
-
numa_cpus
= insights.specs.Specs.numa_cpus¶
-
numeric_user_group_name
= insights.specs.Specs.numeric_user_group_name¶
-
nvme_core_io_timeout
= insights.specs.Specs.nvme_core_io_timeout¶
-
oc_get_bc
= insights.specs.Specs.oc_get_bc¶
-
oc_get_build
= insights.specs.Specs.oc_get_build¶
-
oc_get_clusterrole_with_config
= insights.specs.Specs.oc_get_clusterrole_with_config¶
-
oc_get_clusterrolebinding_with_config
= insights.specs.Specs.oc_get_clusterrolebinding_with_config¶
-
oc_get_configmap
= insights.specs.Specs.oc_get_configmap¶
-
oc_get_dc
= insights.specs.Specs.oc_get_dc¶
-
oc_get_egressnetworkpolicy
= insights.specs.Specs.oc_get_egressnetworkpolicy¶
-
oc_get_endpoints
= insights.specs.Specs.oc_get_endpoints¶
-
oc_get_event
= insights.specs.Specs.oc_get_event¶
-
oc_get_node
= insights.specs.Specs.oc_get_node¶
-
oc_get_pod
= insights.specs.Specs.oc_get_pod¶
-
oc_get_project
= insights.specs.Specs.oc_get_project¶
-
oc_get_pv
= insights.specs.Specs.oc_get_pv¶
-
oc_get_pvc
= insights.specs.Specs.oc_get_pvc¶
-
oc_get_rc
= insights.specs.Specs.oc_get_rc¶
-
oc_get_role
= insights.specs.Specs.oc_get_role¶
-
oc_get_rolebinding
= insights.specs.Specs.oc_get_rolebinding¶
-
oc_get_route
= insights.specs.Specs.oc_get_route¶
-
oc_get_service
= insights.specs.Specs.oc_get_service¶
-
octavia_conf
= insights.specs.Specs.octavia_conf¶
-
od_cpu_dma_latency
= insights.specs.Specs.od_cpu_dma_latency¶
-
odbc_ini
= insights.specs.Specs.odbc_ini¶
-
odbcinst_ini
= insights.specs.Specs.odbcinst_ini¶
-
open_vm_tools_stat_raw_text_session
= insights.specs.Specs.open_vm_tools_stat_raw_text_session¶
-
openshift_certificates
= insights.specs.Specs.openshift_certificates¶
-
openshift_fluentd_environ
= insights.specs.Specs.openshift_fluentd_environ¶
-
openshift_hosts
= insights.specs.Specs.openshift_hosts¶
-
openshift_router_environ
= insights.specs.Specs.openshift_router_environ¶
-
openvswitch_daemon_log
= insights.specs.Specs.openvswitch_daemon_log¶
-
openvswitch_other_config
= insights.specs.Specs.openvswitch_other_config¶
-
openvswitch_server_log
= insights.specs.Specs.openvswitch_server_log¶
-
os_release
= insights.specs.Specs.os_release¶
-
osa_dispatcher_log
= insights.specs.Specs.osa_dispatcher_log¶
-
ose_master_config
= insights.specs.Specs.ose_master_config¶
-
ose_node_config
= insights.specs.Specs.ose_node_config¶
-
ovirt_engine_boot_log
= insights.specs.Specs.ovirt_engine_boot_log¶
-
ovirt_engine_confd
= insights.specs.Specs.ovirt_engine_confd¶
-
ovirt_engine_console_log
= insights.specs.Specs.ovirt_engine_console_log¶
-
ovirt_engine_server_log
= insights.specs.Specs.ovirt_engine_server_log¶
-
ovirt_engine_ui_log
= insights.specs.Specs.ovirt_engine_ui_log¶
-
ovs_appctl_fdb_show_bridge
= insights.specs.Specs.ovs_appctl_fdb_show_bridge¶
-
ovs_ofctl_dump_flows
= insights.specs.Specs.ovs_ofctl_dump_flows¶
-
ovs_vsctl_list_bridge
= insights.specs.Specs.ovs_vsctl_list_bridge¶
-
ovs_vsctl_show
= insights.specs.Specs.ovs_vsctl_show¶
-
ovs_vswitchd_limits
= insights.specs.Specs.ovs_vswitchd_limits¶
-
pacemaker_log
= insights.specs.Specs.pacemaker_log¶
-
package_provides_command
= insights.specs.Specs.package_provides_command¶
-
pam_conf
= insights.specs.Specs.pam_conf¶
-
parted__l
= insights.specs.Specs.parted__l¶
-
partitions
= insights.specs.Specs.partitions¶
-
passenger_status
= insights.specs.Specs.passenger_status¶
-
password_auth
= insights.specs.Specs.password_auth¶
-
pci_rport_target_disk_paths
= insights.specs.Specs.pci_rport_target_disk_paths¶
-
pcp_metrics
= insights.specs.Specs.pcp_metrics¶
-
pcp_openmetrics_log
= insights.specs.Specs.pcp_openmetrics_log¶
-
pcs_config
= insights.specs.Specs.pcs_config¶
-
pcs_quorum_status
= insights.specs.Specs.pcs_quorum_status¶
-
pcs_status
= insights.specs.Specs.pcs_status¶
-
php_ini
= insights.specs.Specs.php_ini¶
-
pluginconf_d
= insights.specs.Specs.pluginconf_d¶
-
pmlog_summary
= insights.specs.Specs.pmlog_summary¶
-
pmrep_metrics
= insights.specs.Specs.pmrep_metrics¶
-
podman_container_inspect
= insights.specs.Specs.podman_container_inspect¶
-
podman_image_inspect
= insights.specs.Specs.podman_image_inspect¶
-
podman_list_containers
= insights.specs.Specs.podman_list_containers¶
-
podman_list_images
= insights.specs.Specs.podman_list_images¶
-
postconf
= insights.specs.Specs.postconf¶
-
postconf_builtin
= insights.specs.Specs.postconf_builtin¶
-
postfix_master
= insights.specs.Specs.postfix_master¶
-
postgresql_conf
= insights.specs.Specs.postgresql_conf¶
-
postgresql_log
= insights.specs.Specs.postgresql_log¶
-
prev_uploader_log
= insights.specs.Specs.prev_uploader_log¶
-
proc_keys
= insights.specs.Specs.proc_keys¶
-
proc_keyusers
= insights.specs.Specs.proc_keyusers¶
-
proc_netstat
= insights.specs.Specs.proc_netstat¶
-
proc_slabinfo
= insights.specs.Specs.proc_slabinfo¶
-
proc_snmp_ipv4
= insights.specs.Specs.proc_snmp_ipv4¶
-
proc_snmp_ipv6
= insights.specs.Specs.proc_snmp_ipv6¶
-
proc_stat
= insights.specs.Specs.proc_stat¶
-
ps_alxwww
= insights.specs.Specs.ps_alxwww¶
-
ps_aux
= insights.specs.Specs.ps_aux¶
-
ps_auxcww
= insights.specs.Specs.ps_auxcww¶
-
ps_auxww
= insights.specs.Specs.ps_auxww¶
-
ps_ef
= insights.specs.Specs.ps_ef¶
-
ps_eo
= insights.specs.Specs.ps_eo¶
-
ps_eo_cmd
= insights.specs.Specs.ps_eo_cmd¶
-
pulp_worker_defaults
= insights.specs.Specs.pulp_worker_defaults¶
-
puppet_ca_cert_expire_date
= insights.specs.Specs.puppet_ca_cert_expire_date¶
-
puppet_ssl_cert_ca_pem
= insights.specs.Specs.puppet_ssl_cert_ca_pem¶
-
puppetserver_config
= insights.specs.Specs.puppetserver_config¶
-
pvs_headings
= insights.specs.Specs.pvs_headings¶
-
pvs_noheadings
= insights.specs.Specs.pvs_noheadings¶
-
pvs_noheadings_all
= insights.specs.Specs.pvs_noheadings_all¶
-
qemu_conf
= insights.specs.Specs.qemu_conf¶
-
qemu_xml
= insights.specs.Specs.qemu_xml¶
-
ql2xmaxlun
= insights.specs.Specs.ql2xmaxlun¶
-
ql2xmqsupport
= insights.specs.Specs.ql2xmqsupport¶
-
qpid_stat_g
= insights.specs.Specs.qpid_stat_g¶
-
qpid_stat_q
= insights.specs.Specs.qpid_stat_q¶
-
qpid_stat_u
= insights.specs.Specs.qpid_stat_u¶
-
qpidd_conf
= insights.specs.Specs.qpidd_conf¶
-
rabbitmq_env
= insights.specs.Specs.rabbitmq_env¶
-
rabbitmq_logs
= insights.specs.Specs.rabbitmq_logs¶
-
rabbitmq_policies
= insights.specs.Specs.rabbitmq_policies¶
-
rabbitmq_queues
= insights.specs.Specs.rabbitmq_queues¶
-
rabbitmq_report
= insights.specs.Specs.rabbitmq_report¶
-
rabbitmq_report_of_containers
= insights.specs.Specs.rabbitmq_report_of_containers¶
-
rabbitmq_startup_err
= insights.specs.Specs.rabbitmq_startup_err¶
-
rabbitmq_startup_log
= insights.specs.Specs.rabbitmq_startup_log¶
-
rabbitmq_users
= insights.specs.Specs.rabbitmq_users¶
-
random_entropy_avail
= insights.specs.Specs.random_entropy_avail¶
-
rc_local
= insights.specs.Specs.rc_local¶
-
rdma_conf
= insights.specs.Specs.rdma_conf¶
-
readlink_e_etc_mtab
= insights.specs.Specs.readlink_e_etc_mtab¶
-
readlink_e_shift_cert_client
= insights.specs.Specs.readlink_e_shift_cert_client¶
-
readlink_e_shift_cert_server
= insights.specs.Specs.readlink_e_shift_cert_server¶
-
recvq_socket_buffer
= insights.specs.Specs.recvq_socket_buffer¶
-
redhat_release
= insights.specs.Specs.redhat_release¶
-
repquota_agnpuv
= insights.specs.Specs.repquota_agnpuv¶
-
resolv_conf
= insights.specs.Specs.resolv_conf¶
-
rhev_data_center
= insights.specs.Specs.rhev_data_center¶
-
rhn_charsets
= insights.specs.Specs.rhn_charsets¶
-
rhn_conf
= insights.specs.Specs.rhn_conf¶
-
rhn_entitlement_cert_xml
= insights.specs.Specs.rhn_entitlement_cert_xml¶
-
rhn_hibernate_conf
= insights.specs.Specs.rhn_hibernate_conf¶
-
rhn_schema_stats
= insights.specs.Specs.rhn_schema_stats¶
-
rhn_schema_version
= insights.specs.Specs.rhn_schema_version¶
-
rhn_search_daemon_log
= insights.specs.Specs.rhn_search_daemon_log¶
-
rhn_server_satellite_log
= insights.specs.Specs.rhn_server_satellite_log¶
-
rhn_server_xmlrpc_log
= insights.specs.Specs.rhn_server_xmlrpc_log¶
-
rhn_taskomatic_daemon_log
= insights.specs.Specs.rhn_taskomatic_daemon_log¶
-
rhosp_release
= insights.specs.Specs.rhosp_release¶
-
rhsm_conf
= insights.specs.Specs.rhsm_conf¶
-
rhsm_katello_default_ca_cert
= insights.specs.Specs.rhsm_katello_default_ca_cert¶
-
rhsm_log
= insights.specs.Specs.rhsm_log¶
-
rhsm_releasever
= insights.specs.Specs.rhsm_releasever¶
-
rhv_log_collector_analyzer
= insights.specs.Specs.rhv_log_collector_analyzer¶
-
rndc_status
= insights.specs.Specs.rndc_status¶
-
root_crontab
= insights.specs.Specs.root_crontab¶
-
ros_config
= insights.specs.Specs.ros_config¶
-
route
= insights.specs.Specs.route¶
-
rpm_V_package
= insights.specs.Specs.rpm_V_package¶
-
rpm_V_package_list
= insights.specs.Specs.rpm_V_package_list¶
-
rpm_V_packages
= insights.specs.Specs.rpm_V_packages¶
-
rpm_ostree_status
= insights.specs.Specs.rpm_ostree_status¶
-
rpm_pkgs
= insights.specs.Specs.rpm_pkgs¶
-
rsyslog_conf
= insights.specs.Specs.rsyslog_conf¶
-
samba
= insights.specs.Specs.samba¶
-
samba_logs
= insights.specs.Specs.samba_logs¶
-
sap_dev_disp
= insights.specs.Specs.sap_dev_disp¶
-
sap_dev_rd
= insights.specs.Specs.sap_dev_rd¶
-
sap_hana_landscape
= insights.specs.Specs.sap_hana_landscape¶
-
sap_hdb_version
= insights.specs.Specs.sap_hdb_version¶
-
sap_host_profile
= insights.specs.Specs.sap_host_profile¶
-
sapcontrol_getsystemupdatelist
= insights.specs.Specs.sapcontrol_getsystemupdatelist¶
-
saphostctl_getcimobject_sapinstance
= insights.specs.Specs.saphostctl_getcimobject_sapinstance¶
-
saphostexec_status
= insights.specs.Specs.saphostexec_status¶
-
saphostexec_version
= insights.specs.Specs.saphostexec_version¶
-
sat5_insights_properties
= insights.specs.Specs.sat5_insights_properties¶
-
satellite_compute_resources
= insights.specs.Specs.satellite_compute_resources¶
-
satellite_content_hosts_count
= insights.specs.Specs.satellite_content_hosts_count¶
-
satellite_core_taskreservedresource_count
= insights.specs.Specs.satellite_core_taskreservedresource_count¶
-
satellite_custom_ca_chain
= insights.specs.Specs.satellite_custom_ca_chain¶
-
satellite_custom_hiera
= insights.specs.Specs.satellite_custom_hiera¶
-
satellite_enabled_features
= insights.specs.Specs.satellite_enabled_features¶
-
satellite_ignore_source_rpms_repos
= insights.specs.Specs.satellite_ignore_source_rpms_repos¶
-
satellite_katello_repos_with_muliple_ref
= insights.specs.Specs.satellite_katello_repos_with_muliple_ref¶
-
satellite_logs_table_size
= insights.specs.Specs.satellite_logs_table_size¶
-
satellite_missed_pulp_agent_queues
= insights.specs.Specs.satellite_missed_pulp_agent_queues¶
-
satellite_mongodb_storage_engine
= insights.specs.Specs.satellite_mongodb_storage_engine¶
-
satellite_non_yum_type_repos
= insights.specs.Specs.satellite_non_yum_type_repos¶
-
satellite_provision_param_settings
= insights.specs.Specs.satellite_provision_param_settings¶
-
satellite_qualified_capsules
= insights.specs.Specs.satellite_qualified_capsules¶
-
satellite_qualified_katello_repos
= insights.specs.Specs.satellite_qualified_katello_repos¶
-
satellite_rhv_hosts_count
= insights.specs.Specs.satellite_rhv_hosts_count¶
-
satellite_sca_status
= insights.specs.Specs.satellite_sca_status¶
-
satellite_settings
= insights.specs.Specs.satellite_settings¶
-
satellite_version_rb
= insights.specs.Specs.satellite_version_rb¶
-
satellite_yaml
= insights.specs.Specs.satellite_yaml¶
-
sched_rt_runtime_us
= insights.specs.Specs.sched_rt_runtime_us¶
-
scheduler
= insights.specs.Specs.scheduler¶
-
scsi
= insights.specs.Specs.scsi¶
-
scsi_eh_deadline
= insights.specs.Specs.scsi_eh_deadline¶
-
scsi_fwver
= insights.specs.Specs.scsi_fwver¶
-
scsi_mod_max_report_luns
= insights.specs.Specs.scsi_mod_max_report_luns¶
-
scsi_mod_use_blk_mq
= insights.specs.Specs.scsi_mod_use_blk_mq¶
-
sctp_asc
= insights.specs.Specs.sctp_asc¶
-
sctp_eps
= insights.specs.Specs.sctp_eps¶
-
sctp_snmp
= insights.specs.Specs.sctp_snmp¶
-
sealert
= insights.specs.Specs.sealert¶
-
secure
= insights.specs.Specs.secure¶
-
selinux_config
= insights.specs.Specs.selinux_config¶
-
selinux_users
= insights.specs.Specs.selinux_users¶
-
sendmail_mc
= insights.specs.Specs.sendmail_mc¶
-
sendq_socket_buffer
= insights.specs.Specs.sendq_socket_buffer¶
-
sestatus
= insights.specs.Specs.sestatus¶
-
setup_named_chroot
= insights.specs.Specs.setup_named_chroot¶
-
smartctl
= insights.specs.Specs.smartctl¶
-
smartpdc_settings
= insights.specs.Specs.smartpdc_settings¶
-
smbstatus_S
= insights.specs.Specs.smbstatus_S¶
-
smbstatus_p
= insights.specs.Specs.smbstatus_p¶
-
sockstat
= insights.specs.Specs.sockstat¶
-
softnet_stat
= insights.specs.Specs.softnet_stat¶
-
software_collections_list
= insights.specs.Specs.software_collections_list¶
-
sos_conf
= insights.specs.Specs.sos_conf¶
-
spamassassin_channels
= insights.specs.Specs.spamassassin_channels¶
-
spfile_ora
= insights.specs.Specs.spfile_ora¶
-
ss
= insights.specs.Specs.ss¶
-
ssh_config
= insights.specs.Specs.ssh_config¶
-
ssh_config_d
= insights.specs.Specs.ssh_config_d¶
-
ssh_foreman_config
= insights.specs.Specs.ssh_foreman_config¶
-
ssh_foreman_proxy_config
= insights.specs.Specs.ssh_foreman_proxy_config¶
-
sshd_config
= insights.specs.Specs.sshd_config¶
-
sshd_config_perms
= insights.specs.Specs.sshd_config_perms¶
-
sssd_config
= insights.specs.Specs.sssd_config¶
-
sssd_logs
= insights.specs.Specs.sssd_logs¶
-
subscription_manager_facts
= insights.specs.Specs.subscription_manager_facts¶
-
subscription_manager_id
= insights.specs.Specs.subscription_manager_id¶
-
subscription_manager_installed_product_ids
= insights.specs.Specs.subscription_manager_installed_product_ids¶
-
subscription_manager_list_consumed
= insights.specs.Specs.subscription_manager_list_consumed¶
-
subscription_manager_list_installed
= insights.specs.Specs.subscription_manager_list_installed¶
-
subscription_manager_release_show
= insights.specs.Specs.subscription_manager_release_show¶
-
sudoers
= insights.specs.Specs.sudoers¶
-
swift_conf
= insights.specs.Specs.swift_conf¶
-
swift_log
= insights.specs.Specs.swift_log¶
-
swift_object_expirer_conf
= insights.specs.Specs.swift_object_expirer_conf¶
-
swift_proxy_server_conf
= insights.specs.Specs.swift_proxy_server_conf¶
-
sys_block_queue_stable_writes
= insights.specs.Specs.sys_block_queue_stable_writes¶
-
sys_fs_cgroup_memory_tasks_number
= insights.specs.Specs.sys_fs_cgroup_memory_tasks_number¶
-
sys_fs_cgroup_uniq_memory_swappiness
= insights.specs.Specs.sys_fs_cgroup_uniq_memory_swappiness¶
-
sys_kernel_sched_features
= insights.specs.Specs.sys_kernel_sched_features¶
-
sys_vmbus_class_id
= insights.specs.Specs.sys_vmbus_class_id¶
-
sys_vmbus_device_id
= insights.specs.Specs.sys_vmbus_device_id¶
-
sysconfig_chronyd
= insights.specs.Specs.sysconfig_chronyd¶
-
sysconfig_grub
= insights.specs.Specs.sysconfig_grub¶
-
sysconfig_httpd
= insights.specs.Specs.sysconfig_httpd¶
-
sysconfig_irqbalance
= insights.specs.Specs.sysconfig_irqbalance¶
-
sysconfig_kdump
= insights.specs.Specs.sysconfig_kdump¶
-
sysconfig_libvirt_guests
= insights.specs.Specs.sysconfig_libvirt_guests¶
-
sysconfig_memcached
= insights.specs.Specs.sysconfig_memcached¶
-
sysconfig_mongod
= insights.specs.Specs.sysconfig_mongod¶
-
sysconfig_network
= insights.specs.Specs.sysconfig_network¶
-
sysconfig_nfs
= insights.specs.Specs.sysconfig_nfs¶
-
sysconfig_ntpd
= insights.specs.Specs.sysconfig_ntpd¶
-
sysconfig_oracleasm
= insights.specs.Specs.sysconfig_oracleasm¶
-
sysconfig_prelink
= insights.specs.Specs.sysconfig_prelink¶
-
sysconfig_sshd
= insights.specs.Specs.sysconfig_sshd¶
-
sysconfig_stonith
= insights.specs.Specs.sysconfig_stonith¶
-
sysconfig_virt_who
= insights.specs.Specs.sysconfig_virt_who¶
-
sysctl
= insights.specs.Specs.sysctl¶
-
sysctl_conf
= insights.specs.Specs.sysctl_conf¶
-
sysctl_conf_initramfs
= insights.specs.Specs.sysctl_conf_initramfs¶
-
sysctl_d_conf_etc
= insights.specs.Specs.sysctl_d_conf_etc¶
-
sysctl_d_conf_usr
= insights.specs.Specs.sysctl_d_conf_usr¶
-
systemctl_cat_dnsmasq_service
= insights.specs.Specs.systemctl_cat_dnsmasq_service¶
-
systemctl_cat_rpcbind_socket
= insights.specs.Specs.systemctl_cat_rpcbind_socket¶
-
systemctl_list_unit_files
= insights.specs.Specs.systemctl_list_unit_files¶
-
systemctl_list_units
= insights.specs.Specs.systemctl_list_units¶
-
systemctl_show_all_services
= insights.specs.Specs.systemctl_show_all_services¶
-
systemctl_show_all_services_with_limited_properties
= insights.specs.Specs.systemctl_show_all_services_with_limited_properties¶
-
systemctl_show_target
= insights.specs.Specs.systemctl_show_target¶
-
systemctl_status_all
= insights.specs.Specs.systemctl_status_all¶
-
systemd_analyze_blame
= insights.specs.Specs.systemd_analyze_blame¶
-
systemd_docker
= insights.specs.Specs.systemd_docker¶
-
systemd_logind_conf
= insights.specs.Specs.systemd_logind_conf¶
-
systemd_openshift_node
= insights.specs.Specs.systemd_openshift_node¶
-
systemd_system_conf
= insights.specs.Specs.systemd_system_conf¶
-
systemd_system_origin_accounting
= insights.specs.Specs.systemd_system_origin_accounting¶
-
systemid
= insights.specs.Specs.systemid¶
-
systool_b_scsi_v
= insights.specs.Specs.systool_b_scsi_v¶
-
teamdctl_config_dump
= insights.specs.Specs.teamdctl_config_dump¶
-
teamdctl_state_dump
= insights.specs.Specs.teamdctl_state_dump¶
-
testparm_s
= insights.specs.Specs.testparm_s¶
-
testparm_v_s
= insights.specs.Specs.testparm_v_s¶
-
thp_enabled
= insights.specs.Specs.thp_enabled¶
-
thp_use_zero_page
= insights.specs.Specs.thp_use_zero_page¶
-
timedatectl_status
= insights.specs.Specs.timedatectl_status¶
-
tmpfilesd
= insights.specs.Specs.tmpfilesd¶
-
tomcat_server_xml
= insights.specs.Specs.tomcat_server_xml¶
-
tomcat_vdc_fallback
= insights.specs.Specs.tomcat_vdc_fallback¶
-
tomcat_vdc_targeted
= insights.specs.Specs.tomcat_vdc_targeted¶
-
tomcat_web_xml
= insights.specs.Specs.tomcat_web_xml¶
-
tuned_adm
= insights.specs.Specs.tuned_adm¶
-
tuned_conf
= insights.specs.Specs.tuned_conf¶
-
udev_66_md_rules
= insights.specs.Specs.udev_66_md_rules¶
-
udev_fc_wwpn_id_rules
= insights.specs.Specs.udev_fc_wwpn_id_rules¶
-
udev_persistent_net_rules
= insights.specs.Specs.udev_persistent_net_rules¶
-
uname
= insights.specs.Specs.uname¶
-
up2date
= insights.specs.Specs.up2date¶
-
up2date_log
= insights.specs.Specs.up2date_log¶
-
uploader_log
= insights.specs.Specs.uploader_log¶
-
uptime
= insights.specs.Specs.uptime¶
-
users_count_map_selinux_user
= insights.specs.Specs.users_count_map_selinux_user¶
-
usr_journald_conf_d
= insights.specs.Specs.usr_journald_conf_d¶
-
var_qemu_xml
= insights.specs.Specs.var_qemu_xml¶
-
vdo_status
= insights.specs.Specs.vdo_status¶
-
vdsm_conf
= insights.specs.Specs.vdsm_conf¶
-
vdsm_id
= insights.specs.Specs.vdsm_id¶
-
vdsm_import_log
= insights.specs.Specs.vdsm_import_log¶
-
vdsm_log
= insights.specs.Specs.vdsm_log¶
-
vdsm_logger_conf
= insights.specs.Specs.vdsm_logger_conf¶
-
version_info
= insights.specs.Specs.version_info¶
-
vgdisplay
= insights.specs.Specs.vgdisplay¶
-
vgs_headings
= insights.specs.Specs.vgs_headings¶
-
vgs_noheadings
= insights.specs.Specs.vgs_noheadings¶
-
vgs_noheadings_all
= insights.specs.Specs.vgs_noheadings_all¶
-
vhost_net_zero_copy_tx
= insights.specs.Specs.vhost_net_zero_copy_tx¶
-
virsh_list_all
= insights.specs.Specs.virsh_list_all¶
-
virt_uuid_facts
= insights.specs.Specs.virt_uuid_facts¶
-
virt_what
= insights.specs.Specs.virt_what¶
-
virt_who_conf
= insights.specs.Specs.virt_who_conf¶
-
virtlogd_conf
= insights.specs.Specs.virtlogd_conf¶
-
vma_ra_enabled
= insights.specs.Specs.vma_ra_enabled¶
-
vmcore_dmesg
= insights.specs.Specs.vmcore_dmesg¶
-
vmware_tools_conf
= insights.specs.Specs.vmware_tools_conf¶
-
vsftpd
= insights.specs.Specs.vsftpd¶
-
vsftpd_conf
= insights.specs.Specs.vsftpd_conf¶
-
watchdog_logs
= insights.specs.Specs.watchdog_logs¶
-
wc_proc_1_mountinfo
= insights.specs.Specs.wc_proc_1_mountinfo¶
-
x86_ibpb_enabled
= insights.specs.Specs.x86_ibpb_enabled¶
-
x86_ibrs_enabled
= insights.specs.Specs.x86_ibrs_enabled¶
-
x86_pti_enabled
= insights.specs.Specs.x86_pti_enabled¶
-
x86_retp_enabled
= insights.specs.Specs.x86_retp_enabled¶
-
xfs_info
= insights.specs.Specs.xfs_info¶
-
xfs_quota_state
= insights.specs.Specs.xfs_quota_state¶
-
xinetd_conf
= insights.specs.Specs.xinetd_conf¶
-
yum_conf
= insights.specs.Specs.yum_conf¶
-
yum_list_available
= insights.specs.Specs.yum_list_available¶
-
yum_list_installed
= insights.specs.Specs.yum_list_installed¶
-
yum_log
= insights.specs.Specs.yum_log¶
-
yum_repolist
= insights.specs.Specs.yum_repolist¶
-
yum_repos_d
= insights.specs.Specs.yum_repos_d¶
-
yum_updateinfo
= insights.specs.Specs.yum_updateinfo¶
-
yum_updates
= insights.specs.Specs.yum_updates¶
-
zdump_v
= insights.specs.Specs.zdump_v¶
-
zipl_conf
= insights.specs.Specs.zipl_conf¶
-
insights.specs.default¶
This module defines all datasources used by standard Red Hat Insight components.
To define data sources that override the components in this file, create a insights.core.spec_factory.SpecFactory with “insights.specs” as the constructor argument. Data sources created with that factory will override components in this file with the same name keyword argument. This allows overriding the data sources that standard Insights Parsers resolve against.
-
class
insights.specs.default.
DefaultSpecs
[source]¶ Bases:
insights.specs.Specs
-
abrt_ccpp_conf
= <insights.core.spec_factory.simple_file object>¶
-
abrt_status_bare
= <insights.core.spec_factory.simple_command object>¶
-
alternatives_display_python
= <insights.core.spec_factory.simple_command object>¶
-
amq_broker
= <insights.core.spec_factory.glob_file object>¶
-
ansible_host
= <insights.core.spec_factory.first_of object>¶
-
audispd_conf
= <insights.core.spec_factory.simple_file object>¶
-
audit_log
= <insights.core.spec_factory.simple_file object>¶
-
auditctl_rules
= <insights.core.spec_factory.simple_command object>¶
-
auditctl_status
= <insights.core.spec_factory.simple_command object>¶
-
auditd_conf
= <insights.core.spec_factory.simple_file object>¶
-
aws_instance_id_doc
= <insights.core.spec_factory.command_with_args object>¶
-
aws_instance_id_pkcs7
= <insights.core.spec_factory.command_with_args object>¶
-
aws_public_hostnames
= <insights.core.spec_factory.command_with_args object>¶
-
aws_public_ipv4_addresses
= <insights.core.spec_factory.command_with_args object>¶
-
awx_manage_check_license
= <insights.core.spec_factory.simple_command object>¶
-
awx_manage_check_license_data
()¶ This datasource provides the not-sensitive information collected from
/usr/bin/awx-manage check_license --data
.Typical content of
/usr/bin/awx-manage check_license --data
file is:{"contact_email": "test@redhat.com", "company_name": "test Inc", "instance_count": 100, "license_date": 1655092799, "license_type": "enterprise", "subscription_name": "Red Hat Ansible Automation, Standard (100 Managed Nodes)", "sku": "MCT3691", "support_level": "Standard", "product_name": "Red Hat Ansible Automation Platform", "valid_key": true, "satellite": null, "pool_id": "2c92808179803e530179ea5989a157a4", "current_instances": 1, "available_instances": 100, "free_instances": 99, "time_remaining": 29885220, "trial": false, "grace_period_remaining": 32477220, "compliant": true, "date_warning": false, "date_expired": false}
Returns: JSON string containing non-sensitive information. Return type: str Raises: SkipComponent
-- When the filter/path does not exist or any exception occurs.
-
awx_manage_print_settings
= <insights.core.spec_factory.simple_command object>¶
-
azure_instance_id
= <insights.core.spec_factory.simple_command object>¶
-
azure_instance_plan
= <insights.core.spec_factory.simple_command object>¶
-
azure_instance_type
= <insights.core.spec_factory.simple_command object>¶
-
azure_load_balancer
= <insights.core.spec_factory.simple_command object>¶
-
bdi_read_ahead_kb
= <insights.core.spec_factory.glob_file object>¶
-
bios_uuid
= <insights.core.spec_factory.simple_command object>¶
-
blacklist_report
()¶ Custom datasource for
blacklist_report
getting from insights-client configuration.Raises: SkipComponent
-- When there is no file-redaction is configured.Returns: The JSON strings Return type: str
-
blacklisted_specs
= <insights.core.spec_factory.first_of object>¶
-
blkid
= <insights.core.spec_factory.simple_command object>¶
-
block_devices_by_uuid
= <insights.core.spec_factory.listdir object>¶
-
bond
= <insights.core.spec_factory.glob_file object>¶
-
bond_dynamic_lb
= <insights.core.spec_factory.glob_file object>¶
-
boot_loader_entries
= <insights.core.spec_factory.glob_file object>¶
-
branch_info
= <insights.core.spec_factory.first_of object>¶
-
brctl_show
= <insights.core.spec_factory.simple_command object>¶
-
buddyinfo
= <insights.core.spec_factory.simple_file object>¶
-
candlepin_broker
()¶ This datasource provides the candlepn broker configuration information collected from
/etc/candlepin/broker.xml
.Typical content of
/etc/candlepin/broker.xml
file is:<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd"> <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq:core "> <acceptors> <acceptor name="in-vm">vm://0</acceptor> <acceptor name="stomp">tcp://localhost:61613?protocols=STOMP;useEpoll=false;sslEnabled=true;trustStorePath=/etc/candlepin/certs/truststore;trustStorePassword=CDX9i3K5uPPBzcNtzz5tcycVf5PuXA5w;keyStorePath=/etc/candlepin/certs/keystore;keyStorePassword=4iBpTS45VZjFmVdNzRhRKNXtxbsH5Dij;needClientAuth=true</acceptor> </acceptors> <security-enabled>true</security-enabled> </core> </configuration>
Note
This datasource may be executed using the following command:
insights cat --no-header candlepin_broker
Returns: XML string after removeing sensitive information. Return type: str Raises: SkipComponent
-- When the path does not exist or any exception occurs.
-
cciss
= <insights.core.spec_factory.glob_file object>¶
-
cdc_wdm
= <insights.core.spec_factory.simple_file object>¶
-
ceilometer_compute_log
= <insights.core.spec_factory.first_file object>¶
-
ceph_conf
= <insights.core.spec_factory.first_file object>¶
-
ceph_df_detail
= <insights.core.spec_factory.simple_command object>¶
-
ceph_health_detail
= <insights.core.spec_factory.simple_command object>¶
-
ceph_insights
= <insights.core.spec_factory.simple_command object>¶
-
ceph_log
= <insights.core.spec_factory.glob_file object>¶
-
ceph_osd_dump
= <insights.core.spec_factory.simple_command object>¶
-
ceph_osd_ec_profile_ls
= <insights.core.spec_factory.simple_command object>¶
-
ceph_osd_tree
= <insights.core.spec_factory.simple_command object>¶
-
ceph_v
= <insights.core.spec_factory.simple_command object>¶
-
certificates_enddate
= <insights.core.spec_factory.simple_command object>¶
-
cgroups
= <insights.core.spec_factory.simple_file object>¶
-
chkconfig
= <insights.core.spec_factory.simple_command object>¶
-
chrony_conf
= <insights.core.spec_factory.simple_file object>¶
-
chronyc_sources
= <insights.core.spec_factory.simple_command object>¶
-
cib_xml
= <insights.core.spec_factory.simple_file object>¶
-
cinder_api_log
= <insights.core.spec_factory.first_file object>¶
-
cinder_conf
= <insights.core.spec_factory.first_file object>¶
-
cinder_volume_log
= <insights.core.spec_factory.first_file object>¶
-
cloud_cfg_filtered
()¶ This datasource provides configuration of
/etc/cloud/cloud.cfg
file.Note
Since this file may contain sensitive information, it should be filtered before the Insights collecting it. The filters will be added via the
insights.specs.Specs.cloud_cfg
Spec. If nothing is added to the filter, nothing will be collected.Typical content of
/etc/cloud/cloud.cfg
file is:#cloud-config users: - name: demo ssh-authorized-keys: - key_one - key_two passwd: $6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7 ssh_deletekeys: 1 network: version: 1 config: - type: physical name: eth0 subnets: - type: dhcp - type: dhcp6 system_info: default_user: name: user2 plain_text_passwd: 'someP@assword' home: /home/user2 debug: output: /var/log/cloud-init-debug.log verbose: true
Returns: YAML string after removing the sensitive information. Return type: str Raises: SkipComponent
-- When the path does not exist, nothing is collected, or any exception occurs.
-
cloud_init_custom_network
= <insights.core.spec_factory.simple_file object>¶
-
cloud_init_log
= <insights.core.spec_factory.simple_file object>¶
-
cluster_conf
= <insights.core.spec_factory.simple_file object>¶
-
cmdline
= <insights.core.spec_factory.simple_file object>¶
-
cni_podman_bridge_conf
= <insights.core.spec_factory.simple_file object>¶
-
container_cpu_online
= <insights.core.spec_factory.container_collect object>¶
-
container_cpuset_cpus
= <insights.core.spec_factory.container_collect object>¶
-
container_dotnet_version
= <insights.core.spec_factory.container_execute object>¶
-
container_installed_rpms
= <insights.core.spec_factory.container_execute object>¶
-
container_mssql_api_assessment
= <insights.core.spec_factory.container_collect object>¶
-
container_nginx_conf
= <insights.core.spec_factory.container_collect object>¶
-
container_nginx_error_log
= <insights.core.spec_factory.container_collect object>¶
-
container_ps_aux
= <insights.core.spec_factory.container_execute object>¶
-
container_redhat_release
= <insights.core.spec_factory.container_collect object>¶
-
container_vsftpd_conf
= <insights.core.spec_factory.container_collect object>¶
-
containers_inspect
()¶ This datasource provides the filtered information collected from
/usr/bin/docker|podman inspect <container ID>
.Note
The path of the target key is like raw_data[key1][key2][target_key], then the filter pattern is like “key1|key2|target_key”. If the value type of raw_data[key1][key2] is list, although the target_key is in the list, the filter pattern must be “key1|key2”, this datasource returns the whole value of the list. The value of “Id” and “Image” are checked from raw data directly, no need filter these items.
Typical content of
/usr/bin/docker|podman inspect <container ID>
file is:[ { "Id": "aeaea3ead52724bb525bb2b5c619d67836250756920f0cb9884431ba53b476d8", "Created": "2022-10-21T23:47:24.506159696-04:00", "Path": "sleep" ... } ... ]
Returns: item is JSON string containing filtered information. Return type: list Raises: SkipComponent
-- When the filter/path does not exist or any exception occurs.
-
corosync
= <insights.core.spec_factory.simple_file object>¶
-
corosync_cmapctl
= <insights.core.spec_factory.foreach_execute object>¶
-
corosync_conf
= <insights.core.spec_factory.simple_file object>¶
-
cpu_cores
= <insights.core.spec_factory.glob_file object>¶
-
cpu_siblings
= <insights.core.spec_factory.glob_file object>¶
-
cpu_smt_active
= <insights.core.spec_factory.simple_file object>¶
-
cpu_smt_control
= <insights.core.spec_factory.simple_file object>¶
-
cpu_vulns
= <insights.core.spec_factory.glob_file object>¶
-
cpuinfo
= <insights.core.spec_factory.simple_file object>¶
-
cpupower_frequency_info
= <insights.core.spec_factory.simple_command object>¶
-
cpuset_cpus
= <insights.core.spec_factory.simple_file object>¶
-
cron_daily_rhsmd
= <insights.core.spec_factory.simple_file object>¶
-
cron_foreman
= <insights.core.spec_factory.simple_file object>¶
-
crypto_policies_bind
= <insights.core.spec_factory.simple_file object>¶
-
crypto_policies_config
= <insights.core.spec_factory.simple_file object>¶
-
crypto_policies_opensshserver
= <insights.core.spec_factory.simple_file object>¶
-
crypto_policies_state_current
= <insights.core.spec_factory.simple_file object>¶
-
cryptsetup_luksDump
()¶ This datasource provides the output of ‘cryptsetup luksDump’ command for every LUKS encrypted device on the system. The digest and salt fields are filtered out as they can be potentially sensitive.
Returns: List of outputs of the cryptsetup luksDump command.
Return type: list
Raises: SkipComponent
-- When there is not any LUKS encrypted block device on thesystem.
-
cups_files_conf
= <insights.core.spec_factory.simple_file object>¶
-
cups_ppd
= <insights.core.spec_factory.glob_file object>¶
-
cupsd_conf
= <insights.core.spec_factory.simple_file object>¶
-
current_clocksource
= <insights.core.spec_factory.simple_file object>¶
-
date
= <insights.core.spec_factory.simple_command object>¶
-
date_utc
= <insights.core.spec_factory.simple_command object>¶
-
db2ls_a_c
= <insights.core.spec_factory.simple_command object>¶
-
designate_conf
= <insights.core.spec_factory.first_file object>¶
-
df__al
= <insights.core.spec_factory.simple_command object>¶
-
df__alP
= <insights.core.spec_factory.simple_command object>¶
-
df__li
= <insights.core.spec_factory.simple_command object>¶
-
dig_dnssec
= <insights.core.spec_factory.simple_command object>¶
-
dig_edns
= <insights.core.spec_factory.simple_command object>¶
-
dig_noedns
= <insights.core.spec_factory.simple_command object>¶
-
dirsrv_errors
= <insights.core.spec_factory.glob_file object>¶
-
display_name
= <insights.core.spec_factory.first_of object>¶
-
dm_mod_use_blk_mq
= <insights.core.spec_factory.simple_file object>¶
-
dmesg
= <insights.core.spec_factory.simple_command object>¶
-
dmesg_log
= <insights.core.spec_factory.simple_file object>¶
-
dmidecode
= <insights.core.spec_factory.simple_command object>¶
-
dmsetup_info
= <insights.core.spec_factory.simple_command object>¶
-
dmsetup_status
= <insights.core.spec_factory.simple_command object>¶
-
dnf_conf
= <insights.core.spec_factory.simple_file object>¶
-
dnf_module_list
= <insights.core.spec_factory.simple_command object>¶
-
dnf_modules
= <insights.core.spec_factory.glob_file object>¶
-
docker_info
= <insights.core.spec_factory.simple_command object>¶
-
docker_list_containers
= <insights.core.spec_factory.simple_command object>¶
-
docker_list_images
= <insights.core.spec_factory.simple_command object>¶
-
docker_storage_setup
= <insights.core.spec_factory.simple_file object>¶
-
docker_sysconfig
= <insights.core.spec_factory.simple_file object>¶
-
dotnet_version
= <insights.core.spec_factory.simple_command object>¶
-
doveconf
= <insights.core.spec_factory.simple_command object>¶
-
dracut_kdump_capture_service
= <insights.core.spec_factory.simple_file object>¶
-
dse_ldif
= <insights.core.spec_factory.glob_file object>¶
-
du_dirs
= <insights.core.spec_factory.foreach_execute object>¶
-
duplicate_machine_id
()¶ This datasource provides the duplicate machine info.
Sample Output:
dc194312-8cdd-4e75-8cf1-2094bf666f45 hostname1,hostname2
Returns: a string containing the machine id and the hostnames with the same machine id Return type: str Raises: SkipComponent
-- When the filters does not exist or the machine id is not in the filters or the machine id is not duplicate or any exception occurs.
-
eap_json_reports
= <insights.core.spec_factory.glob_file object>¶
-
egg_release
()¶ Custom datasource for
display_name
getting from insights-client configuration.Raises: SkipComponent
-- When cannot get the egg_release.Returns: The JSON strings Return type: str
-
engine_log
= <insights.core.spec_factory.simple_file object>¶
-
etc_journald_conf
= <insights.core.spec_factory.simple_file object>¶
-
etc_journald_conf_d
= <insights.core.spec_factory.glob_file object>¶
-
etc_machine_id
= <insights.core.spec_factory.simple_file object>¶
-
etc_udev_40_redhat_rules
= <insights.core.spec_factory.first_file object>¶
-
etc_udev_oracle_asm_rules
= <insights.core.spec_factory.glob_file object>¶
-
etcd_conf
= <insights.core.spec_factory.simple_file object>¶
-
ethtool
= <insights.core.spec_factory.foreach_execute object>¶
-
ethtool_S
= <insights.core.spec_factory.foreach_execute object>¶
-
ethtool_T
= <insights.core.spec_factory.foreach_execute object>¶
-
ethtool_c
= <insights.core.spec_factory.foreach_execute object>¶
-
ethtool_g
= <insights.core.spec_factory.foreach_execute object>¶
-
ethtool_i
= <insights.core.spec_factory.foreach_execute object>¶
-
ethtool_k
= <insights.core.spec_factory.foreach_execute object>¶
-
fapolicyd_rules
= <insights.core.spec_factory.glob_file object>¶
-
fcoeadm_i
= <insights.core.spec_factory.simple_command object>¶
-
findmnt_lo_propagation
= <insights.core.spec_factory.simple_command object>¶
-
firewall_cmd_list_all_zones
= <insights.core.spec_factory.simple_command object>¶
-
firewalld_conf
= <insights.core.spec_factory.simple_file object>¶
-
foreman_production_log
= <insights.core.spec_factory.simple_file object>¶
-
fstab
= <insights.core.spec_factory.simple_file object>¶
-
fw_devices
= <insights.core.spec_factory.simple_command object>¶
-
fw_security
= <insights.core.spec_factory.simple_command object>¶
-
galera_cnf
= <insights.core.spec_factory.first_file object>¶
-
gcp_instance_type
= <insights.core.spec_factory.simple_command object>¶
-
gcp_license_codes
= <insights.core.spec_factory.simple_command object>¶
-
gcp_network_interfaces
= <insights.core.spec_factory.simple_command object>¶
-
getcert_list
= <insights.core.spec_factory.simple_command object>¶
-
getconf_page_size
= <insights.core.spec_factory.simple_command object>¶
-
getenforce
= <insights.core.spec_factory.simple_command object>¶
-
getsebool
= <insights.core.spec_factory.simple_command object>¶
-
gluster_v_info
= <insights.core.spec_factory.simple_command object>¶
-
gnocchi_conf
= <insights.core.spec_factory.first_file object>¶
-
gnocchi_metricd_log
= <insights.core.spec_factory.first_file object>¶
-
greenboot_status
= <insights.core.spec_factory.simple_command object>¶
-
group_info
= <insights.core.spec_factory.command_with_args object>¶
-
grub1_config_perms
= <insights.core.spec_factory.simple_command object>¶
-
grub2_cfg
= <insights.core.spec_factory.simple_file object>¶
-
grub2_efi_cfg
= <insights.core.spec_factory.simple_file object>¶
-
grub_conf
= <insights.core.spec_factory.simple_file object>¶
-
grub_config_perms
= <insights.core.spec_factory.simple_command object>¶
-
grub_efi_conf
= <insights.core.spec_factory.simple_file object>¶
-
grubby_default_index
= <insights.core.spec_factory.simple_command object>¶
-
grubby_default_kernel
= <insights.core.spec_factory.simple_command object>¶
-
grubenv
= <insights.core.spec_factory.simple_command object>¶
-
haproxy_cfg
= <insights.core.spec_factory.first_file object>¶
-
haproxy_cfg_scl
= <insights.core.spec_factory.simple_file object>¶
-
heat_conf
= <insights.core.spec_factory.first_file object>¶
-
hostname
= <insights.core.spec_factory.simple_command object>¶
-
hostname_default
= <insights.core.spec_factory.simple_command object>¶
-
hostname_short
= <insights.core.spec_factory.simple_command object>¶
-
hosts
= <insights.core.spec_factory.simple_file object>¶
-
httpd24_httpd_error_log
= <insights.core.spec_factory.simple_file object>¶
-
httpd_M
= <insights.core.spec_factory.foreach_execute object>¶
-
httpd_V
= <insights.core.spec_factory.foreach_execute object>¶
-
httpd_cert_info_in_nss
= <insights.core.spec_factory.foreach_execute object>¶
-
httpd_conf
= <insights.core.spec_factory.glob_file object>¶
-
httpd_conf_scl_httpd24
= <insights.core.spec_factory.glob_file object>¶
-
httpd_conf_scl_jbcs_httpd24
= <insights.core.spec_factory.glob_file object>¶
-
httpd_error_log
= <insights.core.spec_factory.simple_file object>¶
-
httpd_limits
= <insights.core.spec_factory.foreach_collect object>¶
-
httpd_on_nfs
()¶ Function to get the count of httpd opened file on nfs v4
Returns: JSON string with keys: “httpd_ids”, “nfs_mounts”, “open_nfs_files” Return type: str
-
httpd_pid
= <insights.core.spec_factory.simple_command object>¶
-
httpd_ssl_cert_enddate
= <insights.core.spec_factory.foreach_execute object>¶
-
ibm_fw_vernum_encoded
= <insights.core.spec_factory.simple_file object>¶
-
ibm_lparcfg
= <insights.core.spec_factory.simple_file object>¶
-
ifcfg
= <insights.core.spec_factory.glob_file object>¶
-
ifcfg_static_route
= <insights.core.spec_factory.glob_file object>¶
-
imagemagick_policy
= <insights.core.spec_factory.glob_file object>¶
-
init_process_cgroup
= <insights.core.spec_factory.simple_file object>¶
-
initctl_lst
= <insights.core.spec_factory.simple_command object>¶
-
insights_client_conf
= <insights.core.spec_factory.simple_file object>¶
-
installed_rpms
= <insights.core.spec_factory.simple_command object>¶
-
interrupts
= <insights.core.spec_factory.simple_file object>¶
-
ip6tables
= <insights.core.spec_factory.simple_command object>¶
-
ip_addr
= <insights.core.spec_factory.simple_command object>¶
-
ip_addresses
= <insights.core.spec_factory.simple_command object>¶
-
ip_route_show_table_all
= <insights.core.spec_factory.simple_command object>¶
-
ip_s_link
= <insights.core.spec_factory.simple_command object>¶
-
ipa_default_conf
= <insights.core.spec_factory.simple_file object>¶
-
ipaupgrade_log
= <insights.core.spec_factory.simple_file object>¶
-
ipcs_m
= <insights.core.spec_factory.simple_command object>¶
-
ipcs_m_p
= <insights.core.spec_factory.simple_command object>¶
-
ipcs_s
= <insights.core.spec_factory.simple_command object>¶
-
ipcs_s_i
= <insights.core.spec_factory.foreach_execute object>¶
-
ipsec_conf
= <insights.core.spec_factory.simple_file object>¶
-
iptables
= <insights.core.spec_factory.simple_command object>¶
-
iptables_permanent
= <insights.core.spec_factory.simple_file object>¶
-
ipv4_neigh
= <insights.core.spec_factory.simple_command object>¶
-
ipv6_neigh
= <insights.core.spec_factory.simple_command object>¶
-
iris_cpf
= <insights.core.spec_factory.foreach_collect object>¶
-
iris_list
= <insights.core.spec_factory.simple_command object>¶
-
iris_messages_log
= <insights.core.spec_factory.foreach_collect object>¶
-
ironic_inspector_log
= <insights.core.spec_factory.first_file object>¶
-
iscsiadm_m_session
= <insights.core.spec_factory.simple_command object>¶
-
jbcs_httpd24_httpd_error_log
= <insights.core.spec_factory.simple_file object>¶
-
jboss_runtime_versions
()¶ Custom datasource to collect the <JBOSS_HOME>/version.txt.
Sample output from the
ps -ewwo pid, args
command:PID COMMAND 1 /usr/lib/systemd/systemd --switched-root --system --deserialize 31 2 [kthreadd] 3 [rcu_gp] 4 [rcu_par_gp] 6 [kworker/0:0H-events_highpri] 8686 java -D[Standalone] -server -verbose:gc -Xms64m -Xmx512m -Djboss.home.dir=/opt/jboss-datagrid-7.3.0-server -Djboss.server.base.dir=/opt/jboss-datagrid-7.3.0-server/standalone
Get the Jboss home directory and read the version.txt:
-Djboss.home.dir=/opt/jboss-datagrid-7.3.0-server /opt/jboss-datagrid-7.3.0-server/version.txt
Returns: string of dict {<jboss_home>: <content of version.txt>} Return type: str Raises: SkipComponent
-- Raised if no data is available
-
journal_header
= <insights.core.spec_factory.simple_command object>¶
-
kdump_conf
= <insights.core.spec_factory.simple_file object>¶
-
kernel_config
= <insights.core.spec_factory.glob_file object>¶
-
kernel_crash_kexec_post_notifiers
= <insights.core.spec_factory.simple_file object>¶
-
kexec_crash_size
= <insights.core.spec_factory.simple_file object>¶
-
keystone_crontab
= <insights.core.spec_factory.simple_file object>¶
-
kpatch_list
= <insights.core.spec_factory.simple_command object>¶
-
krb5
= <insights.core.spec_factory.glob_file object>¶
-
ksmstate
= <insights.core.spec_factory.simple_file object>¶
-
lastupload
= <insights.core.spec_factory.glob_file object>¶
-
ld_library_path_of_user
()¶ list: The list of “Username LD_LIBRARY_PATH”, e.g.:
[ 'sr1adm /usr/sap/RH1/SYS/exe/run:/usr/lib/', 'sr2adm /usr/sap/RH2/SYS/exe/run', ]
Note
Currently, only Sap users are supported.
-
ldif_config
= <insights.core.spec_factory.glob_file object>¶
-
leapp_migration_results
()¶ This datasource get useful information from
/etc/migration-results
.Note
Since this file may contain sensitive information, this datasource does filter and only keep required data.
Returns: JSON string after get the required data.
Return type: str
Raises: SkipComponent
-- When the file does not exist or nothing need to collectContentException
-- When any exception occurs.
-
leapp_report
()¶ This datasource get useful information from
leapp-report.json
.Note
Since this file may contain sensitive information, this datasource does filter and only keep required data.
Returns: JSON string after get the required data.
Return type: str
Raises: SkipComponent
-- When the file does not exist or nothing need to collectContentException
-- When any exception occurs.
-
libssh_client_config
= <insights.core.spec_factory.simple_file object>¶
-
libssh_server_config
= <insights.core.spec_factory.simple_file object>¶
-
libvirtd_log
= <insights.core.spec_factory.simple_file object>¶
-
limits_conf
= <insights.core.spec_factory.glob_file object>¶
-
localtime
= <insights.core.spec_factory.simple_command object>¶
-
logrotate_conf
= <insights.core.spec_factory.glob_file object>¶
-
losetup
= <insights.core.spec_factory.simple_command object>¶
-
lpfc_max_luns
= <insights.core.spec_factory.simple_file object>¶
-
lpstat_p
= <insights.core.spec_factory.simple_command object>¶
-
lpstat_protocol_printers
()¶ This datasource provides the not-sensitive information collected from
/usr/bin/lpstat -v
.Typical content of
/usr/bin/lpstat -v
file is:"device for test_printer1: ipp://cups.test.com/printers/test_printer1"
Returns: Returns the collected content containing non-sensitive information Return type: DatasourceProvider Raises: SkipComponent
-- When the filter/path does not exist or any exception occurs.
-
lpstat_queued_jobs_count
()¶ This datasource provides the count of all queued job.
Typical content of
/usr/bin/lpstat -o
file is:Cups-PDF-1802 root 265443328 Tue 05 Sep 2023 02:21:19 PM CST Cups-PDF-1803 root 265443328 Tue 05 Sep 2023 02:21:21 PM CST Cups-PDF-1804 root 265443328 Tue 05 Sep 2023 02:21:22 PM CST
Sample data returned:
3
Returns: Returns the collected content containing the count of all queued jobs. Return type: DatasourceProvider Raises: SkipComponent
-- When there is not any content.
-
ls_R_var_lib_nova_instances
= <insights.core.spec_factory.simple_command object>¶
-
ls_boot
= <insights.core.spec_factory.simple_command object>¶
-
ls_dev
= <insights.core.spec_factory.simple_command object>¶
-
ls_disk
= <insights.core.spec_factory.simple_command object>¶
-
ls_edac_mc
= <insights.core.spec_factory.simple_command object>¶
-
ls_etc
= <insights.core.spec_factory.simple_command object>¶
-
ls_etc_ssh
= <insights.core.spec_factory.simple_command object>¶
-
ls_ipa_idoverride_memberof
= <insights.core.spec_factory.simple_command object>¶
-
ls_krb5_sssd
= <insights.core.spec_factory.simple_command object>¶
-
ls_la
= <insights.core.spec_factory.command_with_args object>¶
-
ls_la_filtered
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lan
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lanL
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lanR
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lanRL
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lanRZ
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lanZ
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lan_filtered
= <insights.core.spec_factory.command_with_args object>¶
-
ls_lib_firmware
= <insights.core.spec_factory.simple_command object>¶
-
ls_osroot
= <insights.core.spec_factory.simple_command object>¶
-
ls_sys_firmware
= <insights.core.spec_factory.simple_command object>¶
-
ls_systemd_units
= <insights.core.spec_factory.simple_command object>¶
-
ls_tmp
= <insights.core.spec_factory.simple_command object>¶
-
ls_usr_bin
= <insights.core.spec_factory.simple_command object>¶
-
ls_usr_lib64
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_cache_pulp
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_lib_mongodb
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_lib_nova_instances
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_lib_pcp
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_lib_rpm
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_lib_rsyslog
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_log
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_opt_mssql
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_opt_mssql_log
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_run
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_spool_clientmq
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_spool_postfix_maildrop
= <insights.core.spec_factory.simple_command object>¶
-
ls_var_www
= <insights.core.spec_factory.simple_command object>¶
-
lsblk
= <insights.core.spec_factory.simple_command object>¶
-
lsblk_pairs
= <insights.core.spec_factory.simple_command object>¶
-
lscpu
= <insights.core.spec_factory.simple_command object>¶
-
lsinitrd_kdump_image
= <insights.core.spec_factory.command_with_args object>¶
-
lsmod
= <insights.core.spec_factory.simple_command object>¶
-
lsof
= <insights.core.spec_factory.first_of object>¶
-
lspci
= <insights.core.spec_factory.simple_command object>¶
-
lspci_vmmkn
= <insights.core.spec_factory.simple_command object>¶
-
lsscsi
= <insights.core.spec_factory.simple_command object>¶
-
luksmeta
= <insights.core.spec_factory.foreach_execute object>¶
-
lvm_fullreport
= <insights.core.spec_factory.simple_command object>¶
-
lvm_system_devices
= <insights.core.spec_factory.simple_file object>¶
-
lvmconfig
= <insights.core.spec_factory.first_of object>¶
-
lvs_noheadings
= <insights.core.spec_factory.simple_command object>¶
-
mac_addresses
= <insights.core.spec_factory.glob_file object>¶
-
machine_id
= <insights.core.spec_factory.first_file object>¶
-
malware_detection
()¶ Custom datasource to collects content for malware scanner if a scanner is present on the system
-
mariadb_log
= <insights.core.spec_factory.simple_file object>¶
-
max_uid
= <insights.core.spec_factory.simple_command object>¶
-
md5chk_files
= <insights.core.spec_factory.foreach_execute object>¶
-
mdadm_D
= <insights.core.spec_factory.simple_command object>¶
-
mdstat
= <insights.core.spec_factory.simple_file object>¶
-
meminfo
= <insights.core.spec_factory.first_file object>¶
-
messages
= <insights.core.spec_factory.simple_file object>¶
-
modinfo_filtered_modules
= <insights.core.spec_factory.command_with_args object>¶
-
modprobe
= <insights.core.spec_factory.glob_file object>¶
-
mokutil_sbstate
= <insights.core.spec_factory.simple_command object>¶
-
mongod_conf
= <insights.core.spec_factory.glob_file object>¶
-
mount
= <insights.core.spec_factory.simple_command object>¶
-
mountinfo
= <insights.core.spec_factory.simple_file object>¶
-
mounts
= <insights.core.spec_factory.simple_file object>¶
-
mpirun_version
= <insights.core.spec_factory.simple_command object>¶
-
mssql_api_assessment
= <insights.core.spec_factory.simple_file object>¶
-
mssql_conf
= <insights.core.spec_factory.simple_file object>¶
-
mssql_tls_cert_enddate
= <insights.core.spec_factory.command_with_args object>¶
-
multicast_querier
= <insights.core.spec_factory.simple_command object>¶
-
multipath__v4__ll
= <insights.core.spec_factory.simple_command object>¶
-
multipath_conf
= <insights.core.spec_factory.simple_file object>¶
-
multipath_conf_initramfs
= <insights.core.spec_factory.simple_command object>¶
-
mysql_log
= <insights.core.spec_factory.glob_file object>¶
-
mysqladmin_vars
= <insights.core.spec_factory.simple_command object>¶
-
named_checkconf_p
= <insights.core.spec_factory.simple_command object>¶
-
named_conf
= <insights.core.spec_factory.simple_file object>¶
-
ndctl_list_Ni
= <insights.core.spec_factory.simple_command object>¶
-
netconsole
= <insights.core.spec_factory.simple_file object>¶
-
netstat
= <insights.core.spec_factory.simple_command object>¶
-
netstat_i
= <insights.core.spec_factory.simple_command object>¶
-
netstat_s
= <insights.core.spec_factory.simple_command object>¶
-
networkmanager_conf
= <insights.core.spec_factory.simple_file object>¶
-
networkmanager_dispatcher_d
= <insights.core.spec_factory.glob_file object>¶
-
neutron_conf
= <insights.core.spec_factory.first_file object>¶
-
neutron_dhcp_agent_ini
= <insights.core.spec_factory.first_file object>¶
-
neutron_l3_agent_ini
= <insights.core.spec_factory.first_file object>¶
-
neutron_l3_agent_log
= <insights.core.spec_factory.first_file object>¶
-
neutron_ovs_agent_log
= <insights.core.spec_factory.first_file object>¶
-
neutron_plugin_ini
= <insights.core.spec_factory.first_file object>¶
-
nfnetlink_queue
= <insights.core.spec_factory.simple_file object>¶
-
nfs_conf
= <insights.core.spec_factory.simple_file object>¶
-
nfs_exports
= <insights.core.spec_factory.simple_file object>¶
-
nfs_exports_d
= <insights.core.spec_factory.glob_file object>¶
-
nginx_conf
= <insights.core.spec_factory.glob_file object>¶
-
nginx_error_log
= <insights.core.spec_factory.first_of object>¶
-
nginx_ssl_cert_enddate
= <insights.core.spec_factory.foreach_execute object>¶
-
nmcli_conn_show
= <insights.core.spec_factory.simple_command object>¶
-
nmcli_dev_show
= <insights.core.spec_factory.simple_command object>¶
-
nova_api_log
= <insights.core.spec_factory.first_file object>¶
-
nova_compute_log
= <insights.core.spec_factory.first_file object>¶
-
nova_conf
= <insights.core.spec_factory.first_file object>¶
-
nova_uid
= <insights.core.spec_factory.simple_command object>¶
-
nscd_conf
= <insights.core.spec_factory.simple_file object>¶
-
nss_rhel7
= <insights.core.spec_factory.simple_file object>¶
-
nsswitch_conf
= <insights.core.spec_factory.simple_file object>¶
-
ntp_conf
= <insights.core.spec_factory.simple_file object>¶
-
ntpq_pn
= <insights.core.spec_factory.simple_command object>¶
-
numa_cpus
= <insights.core.spec_factory.glob_file object>¶
-
numeric_user_group_name
= <insights.core.spec_factory.simple_command object>¶
-
nvme_core_io_timeout
= <insights.core.spec_factory.simple_file object>¶
-
od_cpu_dma_latency
= <insights.core.spec_factory.simple_command object>¶
-
odbc_ini
= <insights.core.spec_factory.simple_file object>¶
-
odbcinst_ini
= <insights.core.spec_factory.simple_file object>¶
-
openshift_router_environ
= <insights.core.spec_factory.foreach_collect object>¶
-
openshift_router_pid
= <insights.core.spec_factory.simple_command object>¶
-
openvswitch_other_config
= <insights.core.spec_factory.simple_command object>¶
-
os_release
= <insights.core.spec_factory.simple_file object>¶
-
ose_master_config
= <insights.core.spec_factory.simple_file object>¶
-
ose_node_config
= <insights.core.spec_factory.simple_file object>¶
-
ovirt_engine_server_log
= <insights.core.spec_factory.simple_file object>¶
-
ovirt_engine_ui_log
= <insights.core.spec_factory.simple_file object>¶
-
ovs_appctl_fdb_show_bridge
= <insights.core.spec_factory.foreach_execute object>¶
-
ovs_vsctl_list_br
= <insights.core.spec_factory.simple_command object>¶
-
ovs_vsctl_list_bridge
= <insights.core.spec_factory.simple_command object>¶
-
ovs_vsctl_show
= <insights.core.spec_factory.simple_command object>¶
-
pacemaker_log
= <insights.core.spec_factory.first_file object>¶
-
package_provides_command
()¶ Collect a list of running commands and the associated RPM package providing those commands. The commands are based on filters so rules must add the desired commands as filters to enable collection. If a command is not provided by an RPM then it will not be included in the output.
In order for the full command line to be present in the Ps combiner a filter must be added to the spec
ps_auxww
. A filter must also be added topackage_provides_command
so this datasource will look for the command in Ps.Parameters: broker -- the broker object for the current session Returns: Returns the collected information as a file with 1 line per command Return type: DatasourceProvider Raises: SkipComponent
-- Raised if no data is collected
-
parted__l
= <insights.core.spec_factory.simple_command object>¶
-
password_auth
= <insights.core.spec_factory.simple_file object>¶
-
pci_rport_target_disk_paths
= <insights.core.spec_factory.simple_command object>¶
-
pcp_metrics
= <insights.core.spec_factory.simple_command object>¶
-
pcp_openmetrics_log
= <insights.core.spec_factory.simple_file object>¶
-
pcs_quorum_status
= <insights.core.spec_factory.simple_command object>¶
-
pcs_status
= <insights.core.spec_factory.simple_command object>¶
-
php_ini
= <insights.core.spec_factory.first_file object>¶
-
pluginconf_d
= <insights.core.spec_factory.glob_file object>¶
-
pmlog_summary
= <insights.core.spec_factory.command_with_args object>¶
-
pmrep_metrics
= <insights.core.spec_factory.simple_command object>¶
-
podman_list_containers
= <insights.core.spec_factory.simple_command object>¶
-
podman_list_images
= <insights.core.spec_factory.simple_command object>¶
-
postconf
= <insights.core.spec_factory.simple_command object>¶
-
postconf_builtin
= <insights.core.spec_factory.simple_command object>¶
-
postfix_master
= <insights.core.spec_factory.simple_file object>¶
-
postgresql_conf
= <insights.core.spec_factory.first_file object>¶
-
postgresql_log
= <insights.core.spec_factory.first_of object>¶
-
proc_keys
= <insights.core.spec_factory.simple_file object>¶
-
proc_keyusers
= <insights.core.spec_factory.simple_file object>¶
-
proc_netstat
= <insights.core.spec_factory.simple_file object>¶
-
proc_slabinfo
= <insights.core.spec_factory.simple_file object>¶
-
proc_snmp_ipv4
= <insights.core.spec_factory.simple_file object>¶
-
proc_snmp_ipv6
= <insights.core.spec_factory.simple_file object>¶
-
proc_stat
= <insights.core.spec_factory.simple_file object>¶
-
ps_alxwww
= <insights.core.spec_factory.simple_command object>¶
-
ps_aux
= <insights.core.spec_factory.simple_command object>¶
-
ps_auxcww
= <insights.core.spec_factory.simple_command object>¶
-
ps_auxww
= <insights.core.spec_factory.simple_command object>¶
-
ps_ef
= <insights.core.spec_factory.simple_command object>¶
-
ps_eo
= <insights.core.spec_factory.simple_command object>¶
-
ps_eo_cmd
()¶ Custom datasource to collect the full paths to all running commands on the system provided by the
ps -ewwo pid,args
command. After collecting the data, all of the args are trimmed to leave only the command including full path.Sample output from the
ps -ewwo pid, args
command:PID COMMAND 1 /usr/lib/systemd/systemd --switched-root --system --deserialize 31 2 [kthreadd] 3 [rcu_gp] 4 [rcu_par_gp] 6 [kworker/0:0H-events_highpri] 9 [mm_percpu_wq] 10 [rcu_tasks_kthre] 11 /usr/bin/python3 /home/user1/python_app.py 12 [kworker/u16:0-kcryptd/253:0]
This datasource trims off the args to minimize possible PII and sensitive information. After trimming the data looks like this:
PID COMMAND 1 /usr/lib/systemd/systemd 2 [kthreadd] 3 [rcu_gp] 4 [rcu_par_gp] 6 [kworker/0:0H-events_highpri] 9 [mm_percpu_wq] 10 [rcu_tasks_kthre] 11 /usr/bin/python3 12 [kworker/u16:0-kcryptd/253:0]
Returns: Returns a multiline string in the same format as ps
outputReturn type: str Raises: SkipComponent
-- Raised if no data is available
-
pulp_worker_defaults
= <insights.core.spec_factory.simple_file object>¶
-
puppet_ca_cert_expire_date
= <insights.core.spec_factory.simple_command object>¶
-
pvs_noheadings
= <insights.core.spec_factory.simple_command object>¶
-
qemu_xml
= <insights.core.spec_factory.glob_file object>¶
-
ql2xmaxlun
= <insights.core.spec_factory.simple_file object>¶
-
ql2xmqsupport
= <insights.core.spec_factory.simple_file object>¶
-
rabbitmq_env
= <insights.core.spec_factory.simple_file object>¶
-
rabbitmq_report
= <insights.core.spec_factory.simple_command object>¶
-
random_entropy_avail
= <insights.core.spec_factory.simple_file object>¶
-
rc_local
= <insights.core.spec_factory.simple_file object>¶
-
readlink_e_etc_mtab
= <insights.core.spec_factory.simple_command object>¶
-
readlink_e_shift_cert_client
= <insights.core.spec_factory.simple_command object>¶
-
readlink_e_shift_cert_server
= <insights.core.spec_factory.simple_command object>¶
-
redhat_release
= <insights.core.spec_factory.simple_file object>¶
-
repquota_agnpuv
= <insights.core.spec_factory.simple_command object>¶
-
resolv_conf
= <insights.core.spec_factory.simple_file object>¶
-
rhsm_conf
= <insights.core.spec_factory.simple_file object>¶
-
rhsm_katello_default_ca_cert
= <insights.core.spec_factory.simple_command object>¶
-
rhsm_releasever
= <insights.core.spec_factory.simple_file object>¶
-
rndc_status
= <insights.core.spec_factory.simple_command object>¶
-
ros_config
= <insights.core.spec_factory.simple_file object>¶
-
rpm_V_package
= <insights.core.spec_factory.foreach_execute object>¶
-
rpm_V_packages
= <insights.core.spec_factory.simple_command object>¶
-
rpm_ostree_status
= <insights.core.spec_factory.simple_command object>¶
-
rpm_pkgs
()¶ Custom datasource for CVE-2021-35937, CVE-2021-35938, and CVE-2021-35939.
It collects packages from the
rpm -qa --nosignature --qf="[%{=NAME}; %{=NEVRA}; %{FILENAMES}; %{FILEMODES:perms}; %{FILEUSERNAME}; %{FILEGROUPNAME}; %{=VENDOR}\n]" command
.The output is a sorted list of all packages, which have at least one directory with files inside, and this directory is writable by a specific user/group or the others.
Raises: SkipComponent
-- Raised if no data is availableReturns: Sorted list of strings, where every string contains name, nevra and vendor for a given package, and the pipe is used as a separator. E.g. [“httpd-core|httpd-core-2.4.53-7.el9.x86_64|Red Hat, Inc.”] Return type: List[str]
-
rsyslog_conf
= <insights.core.spec_factory.glob_file object>¶
-
samba
= <insights.core.spec_factory.simple_file object>¶
-
sap_hana_landscape
= <insights.core.spec_factory.foreach_execute object>¶
-
sap_hdb_version
= <insights.core.spec_factory.foreach_execute object>¶
-
saphostctl_getcimobject_sapinstance
= <insights.core.spec_factory.simple_command object>¶
-
saphostexec_status
= <insights.core.spec_factory.simple_command object>¶
-
saphostexec_version
= <insights.core.spec_factory.simple_command object>¶
-
satellite_compute_resources
-