Closed sliwa95 closed 6 years ago
Hi, yes, contribution for improvements is always welcome on any item, including documentation and howto's.
What I have in crontab is:
My zbxdb.{XXX}.cfg all write to the same $HOME/zbxora_out directory what zbxdb_sender does is 1) create $HOME/zbxdb_sender directory if nonexistent 2) create $HOME/zbxdb_sender/in directory if nonexistent 3) create $HOME/zbxdb_sender/archive directory if nonexixtent 4) move the contents from -in this case- $HOME/zbxora_out to $HOME/zbxdb_sender/in/ 5) send the files concatenated to zabbix_sender (where zabbix_sender uses -z 127.0.0.1) 6) zip the files from $HOME/zbxdb_sender/in and place archive in $HOME/zbxdb_sender/archive 7) remove the files from $HOME/zbxdb_sender/in/ 8) removes older files from $HOME/zbxdb_sender/archive/
It certainly is not the cleanest of all scripts but it works. In my setups, I run the zbxdb.py scripts on the same machines where the zabbix_server or the zabbix_proxy processes are running. This explains the hardcoded -z 127.0.0.1 for the zabbix server.
Yeah, I was missing that second parameter - log directory for zbxdb_sender, after creating it and adding parameter it started working.
Now I have to figure out why I'm getting info from server: "processed: 0; failed: 250; total: 250; seconds spent: 0.001821"
in sender's logfile, but that's not connected to Your tool.
Thank You again for help and fast response. I'll try wrap up some detailed documentation and/or howto, but I'll have to wait for next week.
Just adding about why zabbixsender had issues: Zabbix couldn't recognize hostname, so had to add temporairy -s hostname_ parameter to zbxdb_sender script, so I can trick Zabbix server that data comes from my Oracle instance (not machine that ZbxDB is running on).
Will have to think about easy way to automate this. And maybe add another (optional) parameter to zbxdb sender, with Zabbix server address (with localhost as default value).
the hostname has to correspond with hostname parameter in your configuration file. In your case "pss-ora" If you check the datafile that is generated for your configuration file in your out directory, you will see it as one of the columns in there. The idea is that you can run many zbxdb.py processes from the same machine, all monitoring their own database/cluster. All data is concatenated and sent to zabbix in one go.
Hi,
I have trouble using zbxdb_sender. simply running
zbxdb_sender
gives me default info:So, trying to use it with
ZBXDB_OUT
, like this:zbxdb_sender zbx_pss-ora_out
gives me output below:Output of
ls -l zbx_pss-ora_out/
is:while the only log directory is empty:
In the same time only log file is in zbxdb_sender directory:
Home directory for zbxdb user looks like this:
I'm using zbxdb_starter in cron, set to fire up every minute (like in readme), and my config file looks like this:
Tool looks very nice, connects to instance and writes data nicely to zbxdb.pss-ora.zbx file, but I might be bit too rusty for current documentation. Makes me think I'll have to make some blog post about it (or submit some detailed documentation for newbies, if You wish).