SMS Server Tools modem statistics
About
The smstools_ plugin allows the munin monitor to graph modem statistics of the SMS Server Tools SMS server. The smstools_ plugin specifically charts the following values:
- Number of rejected SMS
- Number of sucessfully sent messages
- Number of sending failures
- Number of received short messages
- Number of consecutive failures while sending short messages.
The plugin works by parsing the statistics file generated by the smsd.
Screenshot
Download
Installation
- Copy or link the smstools_ script into your munin-node plugin directory, usually /etc/munin/plugins. This is a wildcard plugin, meaning that depending on the filename of the plugin, different modems are graphed.[BR] If you have one GSM modem connected to your system you want to chart, create the copy of this script as smstools_MODEMAME, e.g. smstools_GSM1.
- Configure the smsd to actually write a statistics file every 5 minutes. This is achieved by adding the following to the smsd.conf file, usually located in /etc:
stats = /var/log/smsd_stats stats_interval = 300
Make sure, the configured directory exists. - Configure the munin-node to run the smstools_ plugin as user root or another user able to read the statistics file:
[smstools_*] user root
- Configure the munin-node to pass the directory smsd is writing it's statistics file as statsdir:
[smstools_*] user root env.statsdir /var/log/smsd_stats
- The SMS daemon is writing a new timestamped file every 5 minutes. To prevent your disk from filling up, the smstools_ plugin can delete the statistics file after reading. To enable this, pass the environment variable cleanup set to true:
[smstools_*] user root env.statsdir /var/log/smsd_stats env.cleanup true
- Test the plugin by calling munin-run smstools_GSM1 config and by executing munin-run smstools_GSM1. Both commands should output sensible data without failing.
- Restart the munin-node process.
Notes
- Due to the 5min wait time between sampling, the measurement can be somewhat inaccurate. Only established connections during the munin run will be counted. Short-term connections between two runs will not be detected.
- Passing the cleanup variable set to true is highly advisable to prevent your disk from filling up with stale data.
Author
The munin plugin was written by Andreas Thienemann for bawue.net.
License
The code is available as free software under the GPL Version 2.
Bugs and Contact
In case of bugs, please either open a ticket in this Trac instance or write to <andreas (at) bawue (dot) net>.