Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with timestamps. #1

Open
ScottChapman opened this issue May 28, 2015 · 2 comments
Open

problems with timestamps. #1

ScottChapman opened this issue May 28, 2015 · 2 comments

Comments

@ScottChapman
Copy link

So, I am having some odd issue with timestamps that I am just not understanding.

For a test I am sending a batch of 250 updates, I increment the value by 1 each time and I add a second to each one.

As an example I am sending an update using a timestamp of 1432822235859 which should be:
Date in your timezone*: 5/28/2015, 10:10:36 AM

but in zabbix I am seeing it as: 2015.May.27 06:25:21

also, as part of my test I add some time to the time stamp for each iteration. What is odd is that the value should be MS, but if I add "1000" I see a 16 minute difference in zabbix (like it was treating MS as seconds).

Very confused...

@hengyunabc
Copy link
Owner

Can you show me the test code?

@ScottChapman
Copy link
Author

I wanted some batching behavior so I added an add method where the DataObject gets added to a list until it reaches a threshold and then they are all sent together. But my basic code looks like:

        long time = System.currentTimeMillis();
        System.out.println("Time in MS = " + Long.toString(time));

        for (long i = 0; i < 300; i++)
        {
            long tmp = time + i;
            System.out.println("Posting Time in MS = " + Long.toString(tmp));
            sender.add(new DataObject(tmp,"LogstashTest","TestItem",String.valueOf(i)));
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants