= SMS Server Tools modem statistics = == About == The [source:smstools_] plugin allows the [http://munin.projects.linpro.no/ munin] monitor to graph modem statistics of the [http://smstools3.kekekasvi.com/ 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 == [[Image(Images:smstools_GSM1-day.png, nolink)]] == Download == [https://trac.bawue.org/munin/browser/smstools_?format=txt smstools_] == Installation == 1. 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}}}. 1. 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. 1. Configure the munin-node to run the smstools_ plugin as user root or another user able to read the statistics file: {{{ [smstools_*] user root }}} 1. 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 }}} 1. 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 }}} 1. 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. 1. 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. == License == The code is available as free software under the [wiki:GPL2 GPL Version 2]. == Bugs and Contact == In case of bugs, please either [https://trac.bawue.org/munin/newticket open a ticket] in this Trac instance or write to .