Bandwithd/fr
Bandwidthd pour le serveur SME KOOZALI
Maintainer
Description
Bandwidthd est un service UNIX/Windows pour représenter graphiquement le trafic généré par chaque machine sur plusieurs sous-réseaux configurables. C'est beaucoup plus facile à configurer que MRTG, et il fournit beaucoup plus d'information utile. MRTG vous indique uniquement la quantité de bande passante que vous utilisez, Bandwidthd vous le dit aussi et qui l'utilise.
Chaque adresse IP qui a utilisé un volume important de trafic a son propre graphique. Les graphiques sont codés par couleur pour vous aider à comprendre en un coup d'œil si votre utilisateur navigue sur le Web ou sur Kazaa.
Bandwidthd est destiné à fonctionner sur des plates-formes de routage. C'est très bas aérien. Représentation graphique facile du trafic des petites entreprises sur un Elan 486 133Mhz toutes les 2,5 minutes. Un FAI complet (2000-3000 adresses IP sur 4 états) peut être tracé sur un Celeron 450 toutes les 10 minutes.
Bandwidthd is targeted to run on a routing platforms. It is very low overhead. Easily graphing small business traffic on a 133Mhz Elan 486 every 2.5 minutes. An entire ISP (2000-3000 IP addresses across 4 states) can be graphed on a Celeron 450 every 10 minutes.
Requirements
This contrib has been developed and tested on both SME Server 7 and 8 and should work on later.
Installation 8.X, 9.X
yum install smeserver-bandwidthd --enablerepo=smecontribs
then
signal-event conf-bandwidthd service mysql.init restart
or
signal-event post-update; signal-event reboot
and wait for your db to start collecting data (at least 3 minutes)
Configuration with db command
There is no server manager panel, you can easily configure the contrib with a db command (see examples below)
To display current settings
config show bandwidthd
Which will show something like
bandwidthd=service DbName=bandwidthd DbPassword=xxxxxxxxxxxx DbUser=bandwidthd Name=bandwidthd status=enabled webaccess=private
Available settings showing the db key property and value are listed below:
ie in the first example subnet is a property and disabled is a value, note that a default property & value is not listed in the database entry, but is in effect.
- 'subnet' : default is "disabled", you can put there a subnet that is not your LAN or WAN or authorized SME network
- 'device' : default is "any", you can put there an interface you want to monitor. You should consider to set one network interface. Any might cause to account twice some traffic for your LAN hosts.
- 'skipInterval' : default is "0", An interval is 2.5 minutes, this is how many intervals to skip before doing a graphing run
- 'grapCutofff' : default is "1024", Graph cutoff is how many k must be transferred by an ip before we bother to graph it
- 'promiscuous' : default is "false", Put interface in promiscuous mode to score to traffic that may not be routing through the host machine.
- 'output_cdf' : default is "false", Log data to cdf file htdocs/log.cdf (NB: 'graph'="true" will override this if at false and consider it at true).
- 'recover_cdf' : default is "false", Read back the cdf file on startup ( might loose some data while reading the file)
- 'graph' : default is "true", Draw Graphs - This default to true to graph the traffic bandwidthd is recording. Usually set this to false if you only want cdf output or you are using the database output option. Bandwidthd will use very little ram and cpu if this is set to false. If you want to only use mysql or pgsql (need some configuration) or sqlite (not tested), you probably want to set this at
- 'meta_refresh' : default is "150", Set META REFRESH seconds (use 0 to disable)
- 'sensor' : default is "$SystemName.$DomainName", Arbitrary sensor name, I recommend the sensors fully qualified domain name, but you can do whatever you want!
- 'DbType' : default is "mysql", Database type, possible values, pgsql, mysql or none.
- 'Dbhost' : default is "localhost"
- 'Dbport' : default is "0", which means default mysql port (ie 3306)
- 'DbName' : mysql and pgsql DB name
- 'DbUser' : mysql and pgsql DB user
- 'DbPassword' : mysql and pgsql DB password
- 'status' : default is "enabled", will disable or enable bandwidthd
- 'webaccess' :default is private (default - admin user only, LAN and trusted network only), local (anybody, LAN and trusted network only), public ( admin user only, anywhere), global (anybody, anywhere)
- 'Name' : you can set the name of the login page
- 'webinterface' : "both" "html" "php"
- 'URL' : let you choose a personal alias to reach bandwidthd web interface , could be monitor, band ...
- 'width' : default is "900", this php graph width
- 'height' : default is "256", this php graph height
- 'interval' : default is "INT_DAILY", this is default selection for php interface, could be INT_DAILY, INT_WEEKLY,INT_MONTHLY, INT_YEARLY
To change a setting use the following db command syntax
db configuration setprop bandwidthd property value
or in the special case only for the configuration db, this can be abbreviated to
config setprop bandwidthd property value
where property and value are obtained from the list of options above.
eg to change webaccess
config setprop bandwidthd webaccess public
eg to change login page name
config setprop bandwidthd Name 'My Monitoring Login Page'
After changing any setting, you need to apply it:
signal-event conf-bandwidthd
Access
you can access it through the server-manager in the administration panel, and also at the URL https://SERVER/bandwidthd or https://SERVER/"URL" ( default is php, html if php deactivated), https://SERVER/bandwidthd-static (html version only),https://SERVER/bandwidthd-sql (php version only)
Advanced Monitoring (experienced users)
Using the sensors you can monitor multiple server or interface. However you need to configure a host for the mysql db to contact if monitoring multiple host or to run multiple instances of bandwithd if you want to monitor multiple interface ( but not all) or want to avoid multiple accounting while using any on local hosts.
Let's say you want to monitor your adsl connection, while the main installation is already monitoring your local interface
cp -a /etc/bandwidthd.conf /etc/bandwidthd-adsl.conf
then edit /etc/bandwidthd-adsl.conf : change sensor to "adsl" and dev to "ppp0" or your network interface you want to monitor.Adjust what you want, and I suggest you to put off to graph and falt to cdf
cp -a /etc/rc.d/init.d/bandwidthd /etc/rc.d/init.d/bandwidthd-adsl chkconfig --add bandwidthd-adsl ln -s /etc/rc.d/init.d/bandwidthd-adsl /etc/rc.d/rc7.d/S85bandwidthd-adsl vim /etc/rc.d/init.d/bandwidthd-adsl
Here you need to edit PROGNAME to go to the link "usr/sbin/bandwidthd-adsl" Add the following line under PROGNAME : OPTIONS='-c /etc/bandwidthd-adsl.conf' Also edit subsys lock file and add -adsl : /var/lock/subsys/bandwidthd-adsl (3 times)
ln -s /usr/sbin/bandwidthd /usr/sbin/bandwidthd-adsl
then just do
service bandwidthd-adsl start
and wait for your db to start collecting data (at least 3 minutes)
Uninstall
yum remove smeserver-bandwidthd bandwidthd
Bugs
Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-bandwidthd component or use this link .
Changelog
Only released version in smecontrib are listed here.
2024/05/28 Jean-Philippe Pialasse 2.0.1.2-18.sme
- expand config and restart on ip-up event [SME: 12697]
- fix Can't modify constant item in scalar assignment [SME: 12292]
- fix preset disabled [SME: 12251]
- Re-build and link to latest devtools [SME: 11997]