A check plugin for SMS modem using the regular_run functionality provided by smstools3
It does not directly access the modem, instead it reads the status file generated by smstools3.
In order to work the following options need to be set in smsd.conf:
regular_run_interval = 60
regular_run_cmd = AT+CREG?;+CSQ;+COPS?
regular_run_statfile = F<status_file>
Flags:
-a, --age int The maximum age of the file in seconds (default 300) (default 300)
-c, --critical string Critical threshold for signal strength in percent (default "20:")
-h, --help help for check_sms3status
-s, --statusfile string Path to the status file
-v, --version version for check_sms3status
-w, --warning string Warning threshold for signal strength in percent (default "40:")
The warning and critical flags support thresholds in the common Nagios format (e.g. ~:10). The check works in a way that lower values are more critical than higher values. Thus you need to use a colon at the end of the thresholds to check for negative values.
Check the signal strength being below 50% (warning) and below 30% (critical)
check_sms3status --warning 50: --critical 30: --statusfile /path/to/statusfile