PATH:
usr
/
share
/
augeas
/
lenses
/
dist
(* Module: Xymon_Alerting Parses xymon alerting files Author: Francois Maillard <fmaillard@gmail.com> About: Reference This lens tries to keep as close as possible to `man 5 alerts.cfg` where possible. About: License This file is licenced under the LGPL v2+, like the rest of Augeas. About: Lens Usage To be documented About: Not supported File inclusion are not followed About: Configuration files This lens applies to /etc/xymon/alerts.d/*.cfg and /etc/xymon/alerts.cfg. See <filter>. About: Examples The <Test_Xymon_Alerting> file contains various examples and tests. *) module Xymon_Alerting = autoload xfm (************************************************************************ * Group: USEFUL PRIMITIVES *************************************************************************) (* View: store_word *) let store_word = store /[^ =\t\n#]+/ (* View: comparison The greater and lesser than operators *) let comparison = store /[<>]/ (* View: equal *) let equal = Sep.equal (* View: ws *) let ws = Sep.space (* View: eol *) let eol = Util.eol (* View: ws_or_eol *) let ws_or_eol = del /([ \t]+|[ \t]*\n[ \t]*)/ " " (* View: comment *) let comment = Util.comment (* View: empty *) let empty = Util.empty (* View: include *) let include = [ key "include" . ws . store_word . eol ] (************************************************************************ * Group: MACRO DEFINITION *************************************************************************) (* View: macrodefinition A string that starts with $ and that is assigned something *) let macrodefinition = [ key /\$[^ =\t\n#\/]+/ . Sep.space_equal . store Rx.space_in . eol ] (* View: flag A flag value *) let flag (kw:string) = Build.flag kw (* View: kw_word A key=value value *) let kw_word (kw:regexp) = Build.key_value kw equal store_word (************************************************************************ * Group: FILTERS *************************************************************************) (* View: page The (ex)?page filter definition *) let page = kw_word /(EX)?PAGE/ (* View: group The (ex)?group filter definition *) let group = kw_word /(EX)?GROUP/ (* View: host The (ex)?host filter definition *) let host = kw_word /(EX)?HOST/ (* View: service The (ex)?service filter definition *) let service = kw_word /(EX)?SERVICE/ (* View: color The color filter definition *) let color = kw_word "COLOR" (* View: time The time filter definition *) let time = kw_word "TIME" (* View: duration The duration filter definition *) let duration = [ key "DURATION" . [ label "operator" . comparison ] . [ label "value" . store_word ] ] (* View: recover The recover filter definition *) let recover = flag "RECOVER" (* View: notice The notice filter definition *) let notice = flag "NOTICE" (* View: rule_filter Filters are made out of any of the above filter definitions *) let rule_filter = page | group | host | service | color | time | duration | recover | notice (* View: filters One or more filters *) let filters = [ label "filters" . Build.opt_list rule_filter ws ] (* View: filters_opt Zero, one or more filters *) let filters_opt = [ label "filters" . (ws . Build.opt_list rule_filter ws)? ] (* View: kw_word_filters_opt A <kw_word> entry with optional filters *) let kw_word_filters_opt (kw:string) = [ key kw . equal . store_word . filters_opt ] (* View: flag_filters_opt A <flag> with optional filters *) let flag_filters_opt (kw:string) = [ key kw . filters_opt ] (************************************************************************ * Group: RECIPIENTS *************************************************************************) (* View: mail The mail recipient definition *) let mail = [ key "MAIL" . ws . store_word . filters_opt ] (* View: script The script recipient definition *) let script = [ key "SCRIPT" . ws . [ label "script" . store_word ] . ws . [ label "recipient" . store_word ] . filters_opt ] (* View: ignore The ignore recipient definition *) let ignore = flag_filters_opt "IGNORE" (* View: format The format recipient definition *) let format = kw_word_filters_opt "FORMAT" (* View: repeat The repeat recipient definition *) let repeat = kw_word_filters_opt "REPEAT" (* View: unmatched The unmatched recipient definition *) let unmatched = flag_filters_opt "UNMATCHED" (* View: stop The stop recipient definition *) let stop = flag_filters_opt "STOP" (* View: macro The macro recipient definition *) let macro = [ key /\$[^ =\t\n#\/]+/ . filters_opt ] (* View: recipient Recipients are made out of any of the above recipient definitions *) let recipient = mail | script | ignore | format | repeat | unmatched | stop | macro let recipients = [ label "recipients" . Build.opt_list recipient ws_or_eol ] (************************************************************************ * Group: RULES *************************************************************************) (* View: rule Rules are made of rule_filter and then recipients sperarated by a whitespace *) let rule = [ seq "rules" . filters . ws_or_eol . recipients . eol ] (* View: lns The Xymon_Alerting lens *) let lns = ( rule | macrodefinition | include | empty | comment )* (* Variable: filter *) let filter = incl "/etc/xymon/alerts.d/*.cfg" . incl "/etc/xymon/alerts.cfg" . Util.stdexcl 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]