From 3c1cb43e2a0fa3aa85256744b0e45d06c98204eb Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Tue, 13 Aug 2013 00:12:58 -0700 Subject: added posibility to use postgreSQL database to store results --- config/bandwidthd/bandwidthd.inc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'config') diff --git a/config/bandwidthd/bandwidthd.inc b/config/bandwidthd/bandwidthd.inc index 829cdf59..b33dd48f 100644 --- a/config/bandwidthd/bandwidthd.inc +++ b/config/bandwidthd/bandwidthd.inc @@ -85,6 +85,27 @@ function bandwidthd_install_config() { $output_cdf_string = "output_cdf true\n"; else $output_cdf_string = ""; + + $output_postgresql = $bandwidthd_config['outputpostgresql']; + $postgresql_host = $bandwidthd_config['postgresqlhost']; + $postgresql_database = $bandwidthd_config['postgresqldatabase']; + $postgresql_username = $bandwidthd_config['postgresqlusername']; + $postgresql_password = $bandwidthd_config['postgresqlpassword']; + $postgresql_string = ""; + if($output_postgresql) { + if ($postgresql_host && $postgresql_username && $postgresql_database && $postgresql_password) + $postgresql_string = "pgsql_connect_string \"user = $postgresql_username dbname = $postgresql_database password = $postgresql_password host = $postgresql_host\"\n"; + else + log_error("You have specify the postgress Host, Database, Username and Password. Exiting."); + } + + $sensor_id = $bandwidthd_config['sensorid']; + + if($sensor_id) + $sensor_id_string = "sensor_id \"$sensor_id\""; + else + $sensor_id_string = ""; + $promiscuous = $bandwidthd_config['promiscuous']; if($promiscuous) $promiscuous = "promiscuous true\n"; @@ -190,6 +211,14 @@ $output_cdf_string #Read back the cdf file on startup $recover_cdf +# Standard postgres connect string, just like php, see postgres docs for +# details +$postgresql_string + +# Arbitrary sensor name, I recommend the sensors fully qualified domain +# name +$sensor_id_string + #Libpcap format filter string used to control what bandwidthd sees #Please always include "ip" in the string to avoid strange problems $filter_text -- cgit v1.2.3 From cf0ccb55e33c5e38cfdf8bb5ce366c118e6749b0 Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Tue, 13 Aug 2013 00:48:52 -0700 Subject: added posibility to use postgreSQL database to store results --- config/bandwidthd/bandwidthd.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'config') diff --git a/config/bandwidthd/bandwidthd.xml b/config/bandwidthd/bandwidthd.xml index f306546a..8b4a1d8b 100644 --- a/config/bandwidthd/bandwidthd.xml +++ b/config/bandwidthd/bandwidthd.xml @@ -130,6 +130,43 @@ Read back the cdf files on startup checkbox + + output PostgreSQL + outputpostgresql + Log data to a PostgreSQL database.<br> + Get the postgreSQL schema and PHP files to display the results from: https://github.com/individual-it/bandwidthd-pSQL-frontend + checkbox + + + Database host + postgresqlhost + Hostname of the postgreSQL database server. + input + + + Database name + postgresqldatabase + Database on the postgreSQL database server. + input + + + Database Username + postgresqlusername + Username of the postgreSQL database server. + input + + + Database Password + postgresqlpassword + Password of the postgreSQL database server. + password + + + sensor_id + sensorid + Arbitrary sensor name, I recommend the sensors fully qualified domain name. + input + Filter filter -- cgit v1.2.3 From d0cc7b54121c6c559bdc1550b9ef47c5fbd882b2 Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Tue, 13 Aug 2013 02:02:34 -0700 Subject: Updated the version number to 2.0.1_5 pkg v.0.1 --- config/bandwidthd/bandwidthd.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/bandwidthd/bandwidthd.xml b/config/bandwidthd/bandwidthd.xml index 8b4a1d8b..6aaf30ff 100644 --- a/config/bandwidthd/bandwidthd.xml +++ b/config/bandwidthd/bandwidthd.xml @@ -46,7 +46,7 @@ Describe your package requirements here Currently there are no FAQ items provided. bandwidthd - 2.0.1.4 + 2.0.1_5 pkg v.0.1 Bandwidthd /pkg_edit.php?xml=bandwidthd.xml&id=0 /usr/local/pkg/bandwidthd.inc -- cgit v1.2.3 From bb877837f9fbb33e94043066c856f889692dd1b5 Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Wed, 14 Aug 2013 01:15:37 -0700 Subject: added link to the Documentation about Zabbix User Parameters --- config/zabbix-agent/zabbix-agent.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/zabbix-agent/zabbix-agent.xml b/config/zabbix-agent/zabbix-agent.xml index 5a862496..939e2005 100644 --- a/config/zabbix-agent/zabbix-agent.xml +++ b/config/zabbix-agent/zabbix-agent.xml @@ -111,7 +111,8 @@ 5 50 false - User-defined parameter to monitor. There can be several user-defined parameters. Value has form, example: UserParameter=users,who|wc -l + User-defined parameter to monitor. There can be several user-defined parameters. Value has form, example: UserParameter=users,who|wc -l <br><a href="https://www.zabbix.com/documentation/1.8/manual/tutorials/extending_agent" target="_new">See zabbix documentation for more information<a> + @@ -260,4 +261,4 @@ exec("/bin/rm -r /var/run/zabbix/"); ]]> - \ No newline at end of file + -- cgit v1.2.3 From a02094b0897290508f1ba3d86e47f8185e6120f7 Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Wed, 14 Aug 2013 01:20:57 -0700 Subject: deleted empty rows --- config/zabbix-agent/zabbix-agent.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'config') diff --git a/config/zabbix-agent/zabbix-agent.xml b/config/zabbix-agent/zabbix-agent.xml index 939e2005..02147989 100644 --- a/config/zabbix-agent/zabbix-agent.xml +++ b/config/zabbix-agent/zabbix-agent.xml @@ -112,7 +112,6 @@ 50 false User-defined parameter to monitor. There can be several user-defined parameters. Value has form, example: UserParameter=users,who|wc -l <br><a href="https://www.zabbix.com/documentation/1.8/manual/tutorials/extending_agent" target="_new">See zabbix documentation for more information<a> - -- cgit v1.2.3 From 75e10d96c1114187da4b02ca656031269df6bec2 Mon Sep 17 00:00:00 2001 From: Individual IT Services Date: Wed, 14 Aug 2013 01:43:31 -0700 Subject: corrected typo for log_error --- config/bandwidthd/bandwidthd.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/bandwidthd/bandwidthd.inc b/config/bandwidthd/bandwidthd.inc index b33dd48f..00e3cd28 100644 --- a/config/bandwidthd/bandwidthd.inc +++ b/config/bandwidthd/bandwidthd.inc @@ -96,7 +96,7 @@ function bandwidthd_install_config() { if ($postgresql_host && $postgresql_username && $postgresql_database && $postgresql_password) $postgresql_string = "pgsql_connect_string \"user = $postgresql_username dbname = $postgresql_database password = $postgresql_password host = $postgresql_host\"\n"; else - log_error("You have specify the postgress Host, Database, Username and Password. Exiting."); + log_error("You have to specify the postgreSQL Host, Database, Username and Password. Exiting."); } $sensor_id = $bandwidthd_config['sensorid']; -- cgit v1.2.3