I have to use a zabbix_sender with user timestamps.
after googling, I found zabbix_sender's "-T" option.
So, I test this option(-T) with script file - test.sh
---------- test.sh ---------
#!/bin/sh
TIMESTAMP=$(/bin/date --date '1 days ago' +%s)
/bin/echo "Timestamp for Zabbix : $TIMESTAMP"
/usr/local/zabbix/bin/zabbix_sender -T $TIMESTAMP -z 192.168.30.44 -s "cdn_192.168.30.45" -k "cunami.ttcdn.com" -o 3615563854
NOW=$(/bin/date +%s)
/bin/echo "Timestamp for Now : $NOW"
-------------------------------
and it's displayed like this
[ippbx@master CDNLog]$ ./test.sh
Timestamp for Zabbix : 1356493483
info from server: "Processed 1 Failed 0 Total 1 Seconds spent 0.000092"
sent: 1; skipped: 0; total: 1
Timestamp for Now : 1356579883
after this work, I check the zibbix's database.
but Data( in Zabbix's database) is NOT correct like this.
mysql> select * from history_uint
-> where itemid = 28762 ;
+--------+------------+------------+-----------+
| itemid | clock | value | ns |
+--------+------------+------------+-----------+
| 28762 | 1356579841 | 3615563854 | 778690000 |
| 28762 | 1356579883 | 3615563854 | 525945000 |
+--------+------------+------------+-----------+
I use a user timestamp, but zabbix save a data with real timestamp.
is it right?
Is there anything I missed?
after googling, I found zabbix_sender's "-T" option.
So, I test this option(-T) with script file - test.sh
---------- test.sh ---------
#!/bin/sh
TIMESTAMP=$(/bin/date --date '1 days ago' +%s)
/bin/echo "Timestamp for Zabbix : $TIMESTAMP"
/usr/local/zabbix/bin/zabbix_sender -T $TIMESTAMP -z 192.168.30.44 -s "cdn_192.168.30.45" -k "cunami.ttcdn.com" -o 3615563854
NOW=$(/bin/date +%s)
/bin/echo "Timestamp for Now : $NOW"
-------------------------------
and it's displayed like this
[ippbx@master CDNLog]$ ./test.sh
Timestamp for Zabbix : 1356493483
info from server: "Processed 1 Failed 0 Total 1 Seconds spent 0.000092"
sent: 1; skipped: 0; total: 1
Timestamp for Now : 1356579883
after this work, I check the zibbix's database.
but Data( in Zabbix's database) is NOT correct like this.
mysql> select * from history_uint
-> where itemid = 28762 ;
+--------+------------+------------+-----------+
| itemid | clock | value | ns |
+--------+------------+------------+-----------+
| 28762 | 1356579841 | 3615563854 | 778690000 |
| 28762 | 1356579883 | 3615563854 | 525945000 |
+--------+------------+------------+-----------+
I use a user timestamp, but zabbix save a data with real timestamp.
is it right?
Is there anything I missed?
Comment