Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
H
 hex, Rx
 home, Passwd
 host
 host_alias, Sudoers
 Host_Conf
 host_flags, Chrony
 host_list, Chrony
 host_options, Chrony
 hostname
 Hostname
 Hostname maching, Syslog
 hostnames, Syslog
 Hosts_Access
 hour, Cron
 Htpasswd
 http_check, Test_Keepalived
 http_check_field, Keepalived
 http_url_check_field, Keepalived
 hwcap, Keepalived
I
 identifier
 identifier_re, Access
 ignore, Xymon_Alerting
 Import provided expressions, Chrony
 include
 include_dir, Nrpe
 includedir, Sudoers
 includes, Xinetd
 indent
 indented_entry, IniFile
 indented_title, IniFile
 indented_title_label, IniFile
 INI File settings
 IniFile
 input_device, Xorg
 input1, Test_Xml
 Inputrc
 install_remove, Modprobe
 int, Xorg
 integer
 Internal primitives, IniFile
 ip
 ip_port, Keepalived
 ip6_dotint, Resolv
 ipaddr
 ipaddr_or_hostname, Pg_Hba
 ipdev, Keepalived
 IPs, Rx
 Iptables
 ipv4
 ipv6, Rx
 Iscsid
 iso_8601, Rx
 istepslew, Chrony
 item, Nrpe
 item_re, Nrpe
J
 JettyRealm
 JMXAccess
 JMXPassword
 job_identifier, Anacron
 json, OpenShift_Quickstarts
let hex = /0x[0-9a-fA-F]+/
A hex value
let home = [ label "home" . sto_to_col? . colon ]
pw_dir
let host = /[^:# \n\t]+/
let host = kw_word /(EX)?HOST/
The (ex)?host filter definition
let host_alias = alias_entry "Host_Alias" "host" sto_to_com
Host_Alias, see alias_field
Parses /etc/host.conf
let host_flags = [ space . key cmd_flags ]
let host_list = [ Util.indent . key server_peer . space . store address_re . ( host_flags | host_options )* . eol ]
Find all ntp servers/peers and their flags/options
let host_options = [ space . key cmd_options . space . store integer ]
let hostname = /[^-:#\(\), \n\t][^:#\(\), \n\t]*/
let hostname = /\.?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/
Hostname, FQDN or part of an FQDN possibly starting with a dot.
let hostname = /(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*( [A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])/
A valid RFC 1123 hostname
let hostname = [ label "hostname" . opt_hash . ( plus | [ Build.xchgs "-" "reverse" ] ) . hostnames . eol . entries ]
a program begins with an optional hash, and a + or -
Parses /etc/hostname and /etc/mailname
let hostnames = label_opt_list_or "hostname" (store Rx.word) comma "*"
a list of hostnames
Parses /etc/hosts.{allow,deny}
let hour = [ label "hour" . store num ]
Parses htpasswd and rsyncd.secrets files
let http_check = "virtual_server 192.168.1.11 22 { real_server 10.20.40.10 22 { HTTP_GET { url { path /mrtg2/ digest 9b3a0c85a887a256d6939da88aabd8cd status_code 200 } connect_timeout 3 connect_port 8080 nb_get_retry 5 delay_before_retry 10 } SSL_GET { connect_port 8443 } } } " test Keepalived.lns get http_check = { "virtual_server" { "ip" = "192.168.1.11" } { "port" = "22" } { "real_server" { "ip" = "10.20.40.10" } { "port" = "22" } { "HTTP_GET" { "url" { "path" = "/mrtg2/" } { "digest" = "9b3a0c85a887a256d6939da88aabd8cd" } { "status_code" = "200" } } { "connect_timeout" = "3" } { "connect_port" = "8080" } { "nb_get_retry" = "5" } { "delay_before_retry" = "10" } } { "SSL_GET" { "connect_port" = "8443" } } } }
An example of an HTTP health checker
let http_check_field = let num_re = /connect_(timeout|port)/ | "nb_get_retry" | "delay_before_retry" in field num_re sto_num | block "url" http_url_check_field
let http_url_check_field = let word_re = "digest" in let num_re = "status_code" in let to_eol_re = "path" in field word_re sto_word | field num_re sto_num | field to_eol_re sto_to_eol
let hwcap = let hwcap_val = [ label "bit" . store Rx.integer ] . Sep.space . [ label "name" . store Rx.word ] in Build.key_value_line "hwcap" Sep.space hwcap_val
let identifier = /[a-zA-Z0-9_-]+/
The left hand side of a definition
let identifier = entry_str "Identifier" /[iI]dentifier/
let identifier_re = /[A-Za-z0-9_.\\-]+/
Regex for user/group identifiers
let ignore = flag_filters_opt "IGNORE"
The ignore recipient definition
let include = [ indent . key "#include" . Sep.space . store Rx.fspath . eol ]
A file inclusion /!\ The manpage is not clear on the syntax
let include = [ seq "entry" . store "+" . Util.del_opt_ws "" . [ label "map" . store map_name ] . Util.eol ]
An include line starting with a “+” and a map name
let include = Build.key_value_line "include" Sep.space (store Rx.fspath)
let include = [ key "include" . [ label "file" . eq . store word . eol ] ]
An include entry.
let include = [ key ".include" . Util.del_ws_spc . sto_value . (eol_comment|eol) ]
Includes another file at this position
let include = [ key "include" . ws . store_word . eol ]
let include_dir = [ key "include_dir" . [ label "dir" . eq . store word . eol ] ]
include_dir=/path/to/dir/
let includedir = [ key /#include(dir)?/ . Sep.space . store Rx.fspath . eol ]
let includes = Build.key_value_line /include(dir)?/ Sep.space (store Rx.no_spaces)
It would be nice if we could use the directories given in include and includedir directives to parse additional files instead of hardcoding all the places where xinetd config files can be found; but that is currently not possible, and implementing that has a good amount of hairy corner cases to consider.
let indent = Util.indent
An Util.indent
let indent = Util.indent
An indentation
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = del /[ \t]*/ ""
Delete indentation, including leading whitespace
let indent = Util.indent
let indented_entry (kw:regexp) (sep:lens) (comment:lens) = entry_generic (Util.indent . key kw) sep comment_re comment
Generic INI File entry that might be indented with an arbitrary amount of whitespace
let indented_title (kw:regexp) = Util.indent . title kw
Title for record.
let indented_title_label (name:string) (kw:regexp) = Util.indent . title_label name kw
Title for record.
avahi-daemon.conf only supports “# as commentary and “=” as separator
subversion only supports comments starting with “#”
Generic module to create INI files lenses
let input_device = [ indent . del /[iI]nput[dD]evice/ "InputDevice" . label "InputDevice" . sep_spc . quoted_string_val . [ label "option" . sep_spc . quoted_string_val ]* . eol ]
let input1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <html>\r <head> <title>Wiki</title> </head> <body> <h1>Augeas</h1> <p class=\"main\">Augeas is now able to parse XML files!</p> <ul> <li>Translate from XML to a tree syntax</li> <li>Translate from the tree back to XML</li> <!-- this is some comment --> <li>this</li> </ul> </body> </html> "
Parses /etc/inputrc
let int = /[0-9]+/
let integer = Rx.integer
let integer = store Rx.integer
Store a Rx.integer
let integer = /[0-9]+/
One or more digits
let ip = Rx.ip
let ip = ipv4 | ipv6
An ipv4 or ipv6
let ip_port = [ label "ip" . sto_word ] . sep_spc . [ label "port" . sto_num ]
An IP space port pair
let ip6_dotint = let negate = [ del "no-" "no-" . label "negate" ] in [ negate? . key "ip6-dotint" ]
ip6-dotint option, which supports negation
let ipaddr = label "ipaddr" . store /[0-9.-]+/ . prefixlen?
An IP address or range with an optional mask
let ipaddr = /[0-9a-fA-F:.]+(\/[0-9]+|[ \t]+[0-9.]+)/
CIDR or ip+netmask
let ipaddr = [label "ipaddr" . store Rx.ip . netmask?]
An IP address or range with an optional mask
let ipaddr_or_hostname = ipaddr | hostname
let ipdev = [ key "dev" . sep_spc . sto_word ]
A device for IP addresses
Cf.
Parse the iptables file format as produced by iptables-save.
let ipv4 = let dot = "." in let digits = /(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/ in digits . (dot . digits . (dot . digits . (dot . digits)?)?)?
A network IP, trailing .0 may be omitted
let ipv4 = let dot = "." in byte . dot . byte . dot . byte . dot . byte
let ipv6 = /(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})/ | ( /([0-9A-Fa-f]{1,4}:){6}/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /([0-9A-Fa-f]{1,4}:){0,5}:/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /::([0-9A-Fa-f]{1,4}:){0,5}/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /[0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}/ . /[0-9A-Fa-f]{1,4}/ ) | /(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){1,7}:)/
Parses iscsid configuration file Author: Joey Boggs jbo.nosp@m.ggs@redha.nosp@m.t.com About: Reference This lens is targeted at /etc/iscsi/iscsid.conf
ISO 8601 date time format
let istepslew = [ Util.indent . key "initstepslew" . space . [ label "threshold" . store number ] . ( space . store_address )+ . eol ]
initstepslew has specific syntax
let item = [ key item_re . eq . store word . eol ]
regular entries
let item_re = /[^#=\n\t\/ ]+/ - (/command\[[^]\/\n]+\]/ | "include" | "include_dir")
JettyRealm Properties for Augeas
JMXAccess module for Augeas
JMXPassword for Augeas
let job_identifier = [ label "job-identifier" . store Rx.word ]
The job_identifier for an entry
let json = Json.lns
Close