Index

H |
| hash, Trapperkeeper
| header, Yaml
| helpers, Yaml
| hex Chrony Rx
| home MasterPasswd Passwd
| host Automaster Xymon_Alerting
| host_alias, Sudoers
| Host_Conf
| host_flags, Chrony
| host_list, Chrony
| host_options, Chrony
| hostname Automounter Pg_Hba Rx Syslog
| 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
| hwtimestamp, Chrony
| hwtimestamp_flags, Chrony
| hwtimestamp_options, Chrony
| hyphen, Test_Tmpfiles
| hyphen_tree, Test_Tmpfiles

> let hash (lns:lens) = [ Util.indent . label "@hash" . store Rx.word . sep . block_newlines lns Util.comment . Util.eol ]

> let header = [ label "@yaml" . Util.del_str "---" . (Sep.space . store Rx.space_in)? . eol ]

> let hex = /[0-9a-fA-F]+/

> let hex = /0x[0-9a-fA-F]+/

A hex value

> let home = [ label "home" . sto_to_col? . colon ]

pw_dir

> 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 ntp_source . space . store address_re . ( host_flags | host_options )* . eol ]

Find all NTP sources and their flags/options

> let host_options = [ space . key cmd_options . space . store number ]

> 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 hwtimestamp = [ Util.indent . key "hwtimestamp" . space . [ label "interface" . store no_space ] . ( space . ( [ key hwtimestamp_flags ] | [ key hwtimestamp_options . space . store no_space ] ) )* . eol ]

hwtimestamp has specific syntax

> let hwtimestamp_flags = "nocrossts"

HW timestamping options without values

> let hwtimestamp_options = "minpoll"|"precision"|"rxcomp"|"txcomp" |"minsamples"|"maxsamples"|"rxfilter"

HW timestamping options with values

> let hyphen = "L /var/log/journal 2755 root systemd-journal - -\n"

Test with a hyphen in gid

> let hyphen_tree = { "1" { "type" = "L" } { "path" = "/var/log/journal" } { "mode" = "2755" } { "uid" = "root" } { "gid" = "systemd-journal" } { "age" = "-" } { "argument" = "-" } }

Tree for hyphen
Close