PDA

View Full Version : pushing historical data to zabbix


slovon
14-07-2009, 10:51
Hi!

I have a setup where data can only be transferred every now and then (only dialup or email possible).
I can then push data to zabbix using a script that calls zabbix_sender, but all data gets timestamped when pushed.

Is there a possibility to deliver data to zabbix together with timestamps?
Like:
zabbix_send .... -t 20090715194559123

E.g. once a day I collect disk and CPU activity for last 24h and I'd like to add this to all other systems I am monitoring in zabbix.

What is the preferred way?

I don't really need triggers on this altough it would be nice to have them as well.

Thank you for your suggestions!

Gregor

Running ZABBIX 1.6.5 on Postgres on Solaris

emerzon
15-07-2009, 22:35
In your case, you should use Zabbix Proxy in the remote location.
It will store the information until a connection is possible, and then push the stored data to the Zabbix Server. It will take care of all the timestamp issues and you will also get triggers - but without realtime monitoring, of course. :cool:

slovon
16-07-2009, 09:05
That would be nice, but I have to cover some more extraordinary cases, such as:
- the customer's server policy doesn't allow additional applications to be installed,
- there may be no other communication than email

I would like to be able to do something without proxy and I would very much like to be able to plot trends, triggers be damned.

I've already made a "proof of concept" using some python and zabbix_sender and all I am missing is a timestamp option to it.

Come to think of it - I'd actually like to write a simple custom proxy or at least replicate the proxy data transfer mechanism.

Any APIs that would simplify the job?

Thanks...
Gregor

Alexei
16-07-2009, 09:41
Any APIs that would simplify the job?
If no processing of triggers required, you may push the data directly to the database.

slovon
16-07-2009, 15:05
I can do without triggers as the data transfer can be once a day or even once a week only, and there are other mechanisms in place for the emergency.

Thanks!

If you can point me to a good piece of code for copyinh the behavior, I'd be even happier :D
Thank you!

Addendum: found the E-R diagram and it fits; only want to confirm that clock is unix epoch?
What will happen in 2013? :)
Errata: checked postgres integer and date = 2038 is good enough.

so a statement:

insert into history_uint (itemid, clock, value) values (12345, 1247750507, 100);

is enough?


Gregor