PATH:
usr
/
share
/
augeas
/
lenses
/
dist
(* BB-hosts module for Augeas *) (* Author: Raphael Pinson <raphink@gmail.com> *) (* *) (* Supported : *) (* *) (* Todo : *) (* *) module BBhosts = autoload xfm (* Define useful shortcuts *) let eol = Util.eol let eol_no_spc = Util.del_str "\n" let sep_spc = Sep.space let sep_opt_spc = Sep.opt_space let word = store /[^|;# \n\t]+/ let value_to_eol = store /[^ \t][^\n]+/ let ip = store Rx.ipv4 let url = store /https?:[^# \n\t]+/ let word_cont = store /[^;# \n\t]+/ (* Define comments and empty lines *) let comment = Util.comment let empty = Util.empty (* Define host *) let host_ip = [ label "ip" . ip ] let host_fqdn = [ label "fqdn" . sep_spc . word ] let host_test_url = [ label "url" . url ] let host_test_cont (kw:string) = [ store /!?/ . key kw . (Util.del_str ";" . [ label "url" . word_cont ] . (Util.del_str ";" . [ label "keyword" . word ])? )? ] (* DOWNTIME=[columns:]day:starttime:endtime:cause[,day:starttime:endtime:cause] *) let host_test_downtime = let probe = [ label "probe" . store (Rx.word | "*") ] in let probes = Build.opt_list probe Sep.comma in let day = [ label "day" . store (Rx.word | "*") ] in let starttime = [ label "starttime" . store Rx.integer ] in let endtime = [ label "endtime" . store Rx.integer ] in let cause = [ label "cause" . Util.del_str "\"" . store /[^"]*/ . Util.del_str "\"" ] in [ key "DOWNTIME" . Sep.equal . (probes . Sep.colon)? . day . Sep.colon . starttime . Sep.colon . endtime . Sep.colon . cause ] let host_test_flag_value = [ label "value" . Util.del_str ":" . store Rx.word ] let host_test_flag (kw:regexp) = [ store /!?/ . key kw . host_test_flag_value? ] let host_test = host_test_cont "cont" | host_test_cont "contInsecure" | host_test_cont "dns" | host_test_flag "BBDISPLAY" | host_test_flag "BBNET" | host_test_flag "BBPAGER" | host_test_flag "CDB" | host_test_flag "GTM" | host_test_flag "XYMON" | host_test_flag "ajp13" | host_test_flag "bbd" | host_test_flag "clamd" | host_test_flag "cupsd" | host_test_flag "front" | host_test_flag /ftps?/ | host_test_flag /imap[2-4s]?/ | host_test_flag /ldaps?/ | host_test_flag /nntps?/ | host_test_flag "noconn" | host_test_flag "nocont" | host_test_flag "noping" | host_test_flag "notrends" | host_test_flag "oratns" | host_test_flag /pop-?[2-3]?s?/ | host_test_flag "qmqp" | host_test_flag "qmtp" | host_test_flag "rsync" | host_test_flag /smtps?/ | host_test_flag "spamd" | host_test_flag /ssh[1-2]?/ | host_test_flag /telnets?/ | host_test_flag "vnc" | host_test_url | host_test_downtime let host_test_list = Build.opt_list host_test sep_spc let host_opts = [ label "probes" . sep_spc . Util.del_str "#" . (sep_opt_spc . host_test_list)? ] let host = [ label "host" . host_ip . host_fqdn . host_opts . eol ] (* Define group-compress and group-only *) let group_compress = [ key /group(-compress)?/ . (sep_spc . value_to_eol)? . eol_no_spc . ( comment | empty | host)* ] let group_only_col = [ label "col" . word ] let group_only_cols = sep_spc . group_only_col . ( Util.del_str "|" . group_only_col )* let group_only = [ key "group-only" . group_only_cols . sep_spc . value_to_eol . eol_no_spc . ( comment | empty | host)* ] (* Define page *) let page_title = [ label "title" . sep_spc . value_to_eol ] let page = [ key "page" . sep_spc . word . page_title? . eol_no_spc . ( comment | empty | host )* . ( group_compress | group_only )* ] (* Define lens *) let lns = (comment | empty)* . page* let filter = incl "/etc/bb/bb-hosts" let xfm = transform lns filter
[+]
..
[-] mailscanner.aug
[edit]
[-] access.aug
[edit]
[-] gshadow.aug
[edit]
[-] activemq_conf.aug
[edit]
[-] gtkbookmarks.aug
[edit]
[-] activemq_xml.aug
[edit]
[-] hostname.aug
[edit]
[-] afs_cellalias.aug
[edit]
[-] mcollective.aug
[edit]
[-] aliases.aug
[edit]
[-] mdadm_conf.aug
[edit]
[-] anacron.aug
[edit]
[-] memcached.aug
[edit]
[-] approx.aug
[edit]
[-] group.aug
[edit]
[-] phpvars.aug
[edit]
[-] apt_update_manager.aug
[edit]
[-] grub.aug
[edit]
[-] puppet.aug
[edit]
[-] aptcacherngsecurity.aug
[edit]
[-] mongodbserver.aug
[edit]
[-] aptconf.aug
[edit]
[-] host_conf.aug
[edit]
[-] aptpreferences.aug
[edit]
[-] hosts.aug
[edit]
[-] aptsources.aug
[edit]
[-] hosts_access.aug
[edit]
[-] authorized_keys.aug
[edit]
[-] htpasswd.aug
[edit]
[-] automaster.aug
[edit]
[-] jettyrealm.aug
[edit]
[-] automounter.aug
[edit]
[-] mke2fs.aug
[edit]
[-] avahi.aug
[edit]
[-] jaas.aug
[edit]
[-] backuppchosts.aug
[edit]
[-] modprobe.aug
[edit]
[-] bbhosts.aug
[edit]
[-] jmxaccess.aug
[edit]
[-] bootconf.aug
[edit]
[-] modules.aug
[edit]
[-] build.aug
[edit]
[-] jmxpassword.aug
[edit]
[-] cachefilesd.aug
[edit]
[-] modules_conf.aug
[edit]
[-] carbon.aug
[edit]
[-] json.aug
[edit]
[-] cgconfig.aug
[edit]
[-] nagiosobjects.aug
[edit]
[-] cgrules.aug
[edit]
[-] kdump.aug
[edit]
[-] channels.aug
[edit]
[-] monit.aug
[edit]
[-] chrony.aug
[edit]
[-] multipath.aug
[edit]
[-] clamav.aug
[edit]
[-] keepalived.aug
[edit]
[-] cobblermodules.aug
[edit]
[-] known_hosts.aug
[edit]
[-] cobblersettings.aug
[edit]
[-] koji.aug
[edit]
[-] collectd.aug
[edit]
[-] mysql.aug
[edit]
[-] cpanel.aug
[edit]
[-] nagioscfg.aug
[edit]
[-] cron.aug
[edit]
[-] krb5.aug
[edit]
[-] crypttab.aug
[edit]
[-] netmasks.aug
[edit]
[-] cups.aug
[edit]
[-] ldif.aug
[edit]
[-] cyrus_imapd.aug
[edit]
[-] networkmanager.aug
[edit]
[-] darkice.aug
[edit]
[-] networks.aug
[edit]
[-] debctrl.aug
[edit]
[-] nrpe.aug
[edit]
[-] desktop.aug
[edit]
[-] ldso.aug
[edit]
[-] device_map.aug
[edit]
[-] lightdm.aug
[edit]
[-] dhclient.aug
[edit]
[-] nginx.aug
[edit]
[-] dhcpd.aug
[edit]
[-] limits.aug
[edit]
[-] dhcpd_140.aug
[edit]
[-] login_defs.aug
[edit]
[-] dns_zone.aug
[edit]
[-] ntpd.aug
[edit]
[-] dnsmasq.aug
[edit]
[-] nsswitch.aug
[edit]
[-] dovecot.aug
[edit]
[-] ntp.aug
[edit]
[-] dpkg.aug
[edit]
[-] odbc.aug
[edit]
[-] dput.aug
[edit]
[-] openshift_http.aug
[edit]
[-] erlang.aug
[edit]
[-] openshift_config.aug
[edit]
[-] ethers.aug
[edit]
[-] pamconf.aug
[edit]
[-] exports.aug
[edit]
[-] logrotate.aug
[edit]
[-] fai_diskconfig.aug
[edit]
[-] openvpn.aug
[edit]
[-] fonts.aug
[edit]
[-] pagekite.aug
[edit]
[-] fstab.aug
[edit]
[-] pam.aug
[edit]
[-] fuse.aug
[edit]
[-] passwd.aug
[edit]
[-] gdm.aug
[edit]
[-] httpd.aug
[edit]
[-] postfix_access.aug
[edit]
[-] inetd.aug
[edit]
[-] pbuilder.aug
[edit]
[-] inifile.aug
[edit]
[-] pg_hba.aug
[edit]
[-] inittab.aug
[edit]
[-] pgbouncer.aug
[edit]
[-] inputrc.aug
[edit]
[-] logwatch.aug
[edit]
[-] interfaces.aug
[edit]
[-] lokkit.aug
[edit]
[-] iproute2.aug
[edit]
[-] mailscanner_rules.aug
[edit]
[-] iptables.aug
[edit]
[-] php.aug
[edit]
[-] iscsid.aug
[edit]
[-] lvm.aug
[edit]
[-] util.aug
[edit]
[-] openshift_quickstarts.aug
[edit]
[-] xinetd.aug
[edit]
[-] postfix_main.aug
[edit]
[-] xendconfsxp.aug
[edit]
[-] postfix_master.aug
[edit]
[-] vfstab.aug
[edit]
[-] postfix_sasl_smtpd.aug
[edit]
[-] vmware_config.aug
[edit]
[-] postfix_transport.aug
[edit]
[-] xml.aug
[edit]
[-] postfix_virtual.aug
[edit]
[-] xorg.aug
[edit]
[-] postgresql.aug
[edit]
[-] xymon.aug
[edit]
[-] properties.aug
[edit]
[-] xymon_alerting.aug
[edit]
[-] protocols.aug
[edit]
[-] yum.aug
[edit]
[-] puppet_auth.aug
[edit]
[-] puppetfile.aug
[edit]
[-] vsftpd.aug
[edit]
[-] puppetfileserver.aug
[edit]
[-] anaconda.aug
[edit]
[-] pylonspaste.aug
[edit]
[-] pythonpaste.aug
[edit]
[-] qpid.aug
[edit]
[-] quote.aug
[edit]
[-] rabbitmq.aug
[edit]
[-] redis.aug
[edit]
[-] webmin.aug
[edit]
[-] reprepro_uploaders.aug
[edit]
[-] resolv.aug
[edit]
[-] rhsm.aug
[edit]
[-] rmt.aug
[edit]
[-] rsyncd.aug
[edit]
[-] rsyslog.aug
[edit]
[-] rx.aug
[edit]
[-] samba.aug
[edit]
[-] schroot.aug
[edit]
[-] securetty.aug
[edit]
[-] sep.aug
[edit]
[-] services.aug
[edit]
[-] shadow.aug
[edit]
[-] shells.aug
[edit]
[-] shellvars.aug
[edit]
[-] shellvars_list.aug
[edit]
[-] simplelines.aug
[edit]
[-] simplevars.aug
[edit]
[-] sip_conf.aug
[edit]
[-] slapd.aug
[edit]
[-] slapd_140.aug
[edit]
[-] smbusers.aug
[edit]
[-] solaris_system.aug
[edit]
[-] soma.aug
[edit]
[-] spacevars.aug
[edit]
[-] splunk.aug
[edit]
[-] squid.aug
[edit]
[-] ssh.aug
[edit]
[-] sshd.aug
[edit]
[-] sshd_140.aug
[edit]
[-] sssd.aug
[edit]
[-] stunnel.aug
[edit]
[-] subversion.aug
[edit]
[-] sudoers.aug
[edit]
[-] sysconfig.aug
[edit]
[-] sysconfig_route.aug
[edit]
[-] sysctl.aug
[edit]
[-] syslog.aug
[edit]
[-] systemd.aug
[edit]
[-] thttpd.aug
[edit]
[-] tuned.aug
[edit]
[-] up2date.aug
[edit]
[-] updatedb.aug
[edit]
[-] wine.aug
[edit]