diff options
-rw-r--r-- | rhnop-client/conf.lua | 2 | ||||
-rw-r--r-- | rhnop-client/nopcollect.conf | 8 | ||||
-rwxr-xr-x | rhnop-client/nopcollectd (renamed from rhnop-client/nopcollect) | 6 | ||||
-rw-r--r-- | rhnop-client/nopcollectd.master.conf | 15 | ||||
-rw-r--r-- | rhnop-client/nopcollectd.standby.conf | 15 |
5 files changed, 37 insertions, 9 deletions
diff --git a/rhnop-client/conf.lua b/rhnop-client/conf.lua index eb1cd29..9cc21d3 100644 --- a/rhnop-client/conf.lua +++ b/rhnop-client/conf.lua @@ -21,7 +21,7 @@ local conf = {} -local file = assert(io.open("nopcollect.conf", "r")) +local file = assert(io.open(conffile, "r")) for line in file:lines() do local k,v = string.match(line, "^([^=#]+)=(.*)$") if k and v and v ~= "" then diff --git a/rhnop-client/nopcollect.conf b/rhnop-client/nopcollect.conf deleted file mode 100644 index 18316fb..0000000 --- a/rhnop-client/nopcollect.conf +++ /dev/null @@ -1,8 +0,0 @@ -host=127.0.0.1 -port=2345 - -db=nop -#db_host=127.0.0.1 -#db_port=3306 -db_user= -db_pwd= diff --git a/rhnop-client/nopcollect b/rhnop-client/nopcollectd index 04560e2..239011e 100755 --- a/rhnop-client/nopcollect +++ b/rhnop-client/nopcollectd @@ -27,6 +27,12 @@ require "socket" +if #arg < 1 then + io.stderr:write("too few parameters\n") + os.exit(1) +end + +conffile = "nopcollectd." .. arg[1] .. ".conf" conf = require "conf" -- connect to server (reconnect after error) diff --git a/rhnop-client/nopcollectd.master.conf b/rhnop-client/nopcollectd.master.conf new file mode 100644 index 0000000..22113e6 --- /dev/null +++ b/rhnop-client/nopcollectd.master.conf @@ -0,0 +1,15 @@ +sync_host=airplay.helsinki.at +sync_port=2345 + +src_db=nop +src_host=airplay.helsinki.at +#src_port=3306 +src_user=nopcollectd +src_pwd= + +dst_db=nop +dst_table=master +dst_host=127.0.0.1 +#dst_port=3306 +dst_user=nopcollectd +dst_pwd= diff --git a/rhnop-client/nopcollectd.standby.conf b/rhnop-client/nopcollectd.standby.conf new file mode 100644 index 0000000..2597ab0 --- /dev/null +++ b/rhnop-client/nopcollectd.standby.conf @@ -0,0 +1,15 @@ +sync_host=airplay2.helsinki.at +sync_port=2345 + +src_db=nop +src_host=airplay2.helsinki.at +#src_port=3306 +src_user=nopcollectd +src_pwd= + +dst_db=nop +dst_table=standby +dst_host=127.0.0.1 +#dst_port=3306 +dst_user=nopcollectd +dst_pwd= |