# # Mon M4 defines # Written by Felix Enescu # # History: # # 31-01-2001 FE First draft # # # # Service Template # $1 -> Service Name # $2 -> Location # $3 -> Host # $4 -> Interval # $5 -> Monitor # $6 -> Depend - if N no depend # $7 -> Period # $8 -> Email Alert Group # $9 -> Alert Every define(`_SERVICE_', ` service $1 description $2 $3 $1 interval $4 monitor $5 `ifelse($6, N, `dnl', ` depend $6')' period $7 alert mail.alert $8 alertevery $9 upalert mail.alert $8 period LOGFILE: $7 alert file.alert -d _FILE_LOG_DIR_ $3.log ;; upalert file.alert -d _FILE_LOG_DIR_ $3.log ;;')dnl # # Ping Service Template # $1 -> Location # $2 -> Host # $3 -> Interval # $4 -> Depend - if N no depend # $5 -> Period # $6 -> Email Alert Group # $7 -> Alert Every define(`_PING_', _SERVICE_(ping, $1, $2, $3, fping.monitor, $4, $5, $6, $7))dnl # # SMTP Service Template # $1 -> Location # $2 -> Host # $3 -> Interval # $4 -> Depend - if N no depend # $5 -> Period # $6 -> Email Alert Group # $7 -> Alert Every define(`_SMTP_', _SERVICE_(smtp, $1, $2, $3, smtp.monitor, $4, $5, $6, $7))dnl # # POP3 Service Template # $1 -> Location # $2 -> Host # $3 -> Interval # $4 -> Depend - if N no depend # $5 -> Period # $6 -> Email Alert Group # $7 -> Alert Every define(`_POP3_', _SERVICE_(pop3, $1, $2, $3, pop3.monitor, $4, $5, $6, $7))dnl # # POP3 Service Template # $1 -> Location # $2 -> Host # $3 -> Interval # $4 -> Depend - if N no depend # $5 -> Period # $6 -> Email Alert Group # $7 -> Alert Every define(`_IMAP_', _SERVICE_(imap, $1, $2, $3, imap.monitor, $4, $5, $6, $7))dnl # # Host Types # # # Router Template # $1 -> Location # $2 -> Host # $3 -> Depend - if N no depend define(`_ROUTER_', `watch $2 _PING_($1, $2, 1m, $3, _ANYTIME_, _NOC_EMAIL_, 45m)')dnl # # Switches Host Template # $1 -> Location # $2 -> Host # $3 -> Depend - if N no depend define(`_SWITCH_', `watch $2 _PING_($1, $2, 1m, $3, _ANYTIME_, _LAN_EMAIL_, 45m)')dnl # # Exchange Server Template # $1 -> Location # $2 -> Host # $3 -> Depend - if N no depend # $4 -> {Y|N} if server has imap # $5 -> {Y|N} if server has pop3 define(`_EXCHANGE_', `watch $2 _PING_($1, $2, 3m, $3, _ANYTIME_, _NOC_EMAIL_, 45m) _SMTP_($1, $2, 5m, $2:ping, _ANYTIME_, _NOC_EMAIL_, 45m) ifelse($4, Y, _IMAP_($1, $2, 5m, $2:ping, _ANYTIME_, _NOC_EMAIL_, 45m), `dnl') ifelse($5, Y, _POP3_($1, $2, 5m, $2:ping, _ANYTIME_, _NOC_EMAIL_, 45m), `dnl')')dnl # # #_SERVICE_(unu, doi, trei, patru, cinci, sase, sapte, opt, noua) # # #_PING_(unu, doi, trei, patru, cinci, sase, sapte) # # #_ROUTER_(loc, rtr, N) # # #_ROUTER_(loc, rtr, dep) # # #_EXCHANGE_(loc, exchg, Y, N, Y) # # #_EXCHANGE_(loc, exchg, N, Y, N) # #