
module PulserCheck
verbosity = info
enable = true
CheckPeriod = 500
Recipients = user@domain.com,localuser
ResendMail = false
ResendPeriod = 12
endmod
Public Member Functions | |
| MPulserCheck (QSequence *s) | |
| constructor: only initialize data members | |
| ~MPulserCheck () | |
| destructor: do nothing | |
| void | Init () |
| init data members that depend on config file parameters and check for APOLLO_PULSER environmnent variable | |
| QEvent * | Do (QEvent *ev) |
| compare time of current event with time of last detected heater pulse, and call NotifyFailure() method if time gap is too big. Do nothing if APOLLO_PULSER is not set | |
| void | Done () |
| Done method. | |
| MPulserCheck (QSequence *s) | |
| constructor: only initialize data members | |
| ~MPulserCheck () | |
| destructor: do nothing | |
| void | Init () |
| init data members that depend on config file parameters and check for APOLLO_PULSER environmnent variable | |
| QEvent * | Do (QEvent *ev) |
| compare time of current event with time of last detected heater pulse, and call NotifyFailure() method if time gap is too big. Do nothing if APOLLO_PULSER is not set | |
| void | Done () |
| Done method. | |
Private Member Functions | |
| void | ParseRecipients (const std::string &recipients) |
| parse recipients list supplied in cfg file and fill list of recipients. | |
| std::string | CheckRecipient (std::string &recipient) const |
| convert CurrentUser to user name | |
| void | NotifyFailure (time_t evTime) |
| send alert mail | |
| void | ParseRecipients (const std::string &recipients) |
| parse recipients list supplied in cfg file and fill list of recipients. | |
| std::string | CheckRecipient (std::string &recipient) const |
| convert CurrentUser to user name | |
| void | NotifyFailure (time_t evTime) |
| send alert mail | |
Private Attributes | |
| time_t | fLastPulserTime |
| time_t | fLastMailTime |
| bool | fSkipThisModule |
| time_t | fCheckPeriod |
| max time allowed without a pulser event | |
| std::list< std::string > | fRecipients |
| list of alert mail recipients | |
| bool | fResendMail |
| true if alert mail must be re-sent after first one i failure is still present | |
| time_t | fResendPeriod |
| time in seconds after which another alert mail is sent | |
| void MPulserCheck::ParseRecipients | ( | const std::string & | recipients | ) | [private] |
parse recipients list supplied in cfg file and fill list of recipients.
| recipients | comma separated list of recipients |
References CheckRecipient(), QBaseModule::Debug(), and fRecipients.
Referenced by Init().
| void MPulserCheck::NotifyFailure | ( | time_t | evTime | ) | [private] |
send alert mail
| evTime | unix time of last pulser failure detection |
References QMail::AddRecipient(), fCheckPeriod, fLastMailTime, fLastPulserTime, fRecipients, fResendMail, fResendPeriod, QRunDataBase::GetNumber(), QMail::Send(), QBaseModule::SeqAuxData(), QMail::SetMessage(), QMail::SetSubject(), and QBaseModule::Warn().
Referenced by Do().
| void MPulserCheck::ParseRecipients | ( | const std::string & | recipients | ) | [private] |
parse recipients list supplied in cfg file and fill list of recipients.
| recipients | comma separated list of recipients |
| void MPulserCheck::NotifyFailure | ( | time_t | evTime | ) | [private] |
send alert mail
| evTime | unix time of last pulser failure detection |
time_t MPulserCheck::fLastPulserTime [private] |
unix time of last pulser event
Referenced by Do(), and NotifyFailure().
time_t MPulserCheck::fLastMailTime [private] |
unix time of last sent mail
Referenced by NotifyFailure().
bool MPulserCheck::fSkipThisModule [private] |
1.5.6