NginxConfTree - Combiner for nginx configuration

This module models nginx configuration as a tree. It correctly handles include directives by splicing individual document trees into their parents until one document tree is left.

A DSL is provided to query the tree through a select function or brackets []. The brackets allow a more conventional lookup feel but aren’t quite as powerful as using select directly.

class insights.combiners.nginx_conf.EmptyQuotedString(chars)[source]

Bases: insights.parsr.Parser

class insights.combiners.nginx_conf.NginxConfTree(confs)[source]

Bases: insights.core.ConfigCombiner

Exposes nginx configuration through the parsr query interface.

See the insights.core.ConfigComponent class for example usage.

insights.combiners.nginx_conf.get_tree(root=None)[source]

This is a helper function to get an nginx configuration component for your local machine or an archive. It’s for use in interactive sessions.