# epics2sms.conf -- site configuration for EPICS2SMS.sh # # Copy this file to "epics2sms.conf" (next to EPICS2SMS.sh) and edit it: # # cp epics2sms.conf.example epics2sms.conf # $EDITOR epics2sms.conf # # epics2sms.conf is UNTRACKED (see .gitignore), so "git pull" never touches # your local settings. This template IS tracked; keep it in sync when the # config format changes. # # The file is sourced as bash by EPICS2SMS.sh, so it is plain bash syntax. # --- Recipients (applied to every monitor) ---------------------------------- # - SMS gateway address (phone number + gateway domain) # - Optional CC to a normal mailbox for traceability RECIPIENTS=( "0041797554007@sms.switch.ch" "andreas.menzel@psi.ch" ) # From address. Must be a REGISTERED PSI system/application sender, otherwise # the mail may be filtered and never reach the SMS gateway. FROM_ADDR="cSAXS@psi.ch" # Subject used for alert mails/SMS. ALERT_SUBJECT="EPICS alert" # caget Channel Access timeout (seconds). The caget default (~1s) can be too # short for the first connection to a PV, which then looks like "not connected". # Keep this well below the shortest poll interval. CA_TIMEOUT=5 # --- Monitor definitions ---------------------------------------------------- # One entry per monitor, pipe-separated: # # pv | dir | threshold | poll_s | alarm_poll_s | n_avg | n_msg | msg_delay_s | text # # pv EPICS PV name # dir alarm direction: "lt" (avg < threshold) or "gt" (avg > threshold) # threshold numeric threshold # poll_s seconds between polls while in normal state # alarm_poll_s seconds between polls while in alarm state (how often the # average is refreshed and recovery is checked) # n_avg number of samples to average before an alarm can fire # n_msg max messages to send per alarm episode, then stay silent # msg_delay_s minimum seconds between two alarm messages; polling keeps # running faster, but messages are throttled to this spacing # (the first message of an episode is sent immediately) # text message text (also becomes the start of the SMS body) # # Multiple monitors may watch the SAME PV with different thresholds / timing. MONITORS=( "X12SA-OP-CC:L1Level_MON|lt|55|60|60|4|10|300|X12SA-OP-CC:L1Level_MON <55%" "X12SA-OP-CC:L1Level_MON|gt|75|10|10|4|10|300|X12SA-OP-CC:L1Level_MON >75%" )