Nectar - Events Issues (times and dates)
Moderators: Developers, Moderators
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Nectar - Events Issues (times and dates)
Nectar does not appear to save dates and times correctly.
Steps to reproduce:
1. Create a report
2. Set a date and time for it to be sent
3. Click the Nectar tab
4. Observe the date and time - incorrect on my system, and not the time I chose
5. Go into the report again, and observe the date and time - incorrect
Entering the correct UNIX time into the database directly shows the correct time, however, when you review a report, then click the Nectar tab, the time and date is incorrect again.
Also, then clicking "Events" tab, I get
Notice: Undefined variable: now in /usr/share/cacti/site/plugins/nectar/nectar_webapi.php on line 746
Any thoughts ?
Using the 0.28Beta2 version recently posted.
Steps to reproduce:
1. Create a report
2. Set a date and time for it to be sent
3. Click the Nectar tab
4. Observe the date and time - incorrect on my system, and not the time I chose
5. Go into the report again, and observe the date and time - incorrect
Entering the correct UNIX time into the database directly shows the correct time, however, when you review a report, then click the Nectar tab, the time and date is incorrect again.
Also, then clicking "Events" tab, I get
Notice: Undefined variable: now in /usr/share/cacti/site/plugins/nectar/nectar_webapi.php on line 746
Any thoughts ?
Using the 0.28Beta2 version recently posted.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Nectar - Events Issues (times and dates)
Please change that line to readmcutting wrote: Notice: Undefined variable: now in /usr/share/cacti/site/plugins/nectar/nectar_webapi.php on line 746
Code: Select all
$timestamp = time();
R.
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Re: Nectar - Events Issues (times and dates)
Tried that earlier when looking at the file. The $now variable is set to $now=time(), so I already tried the suggestion above, but got the same result.gandalf wrote:Please change that line to readmcutting wrote: Notice: Undefined variable: now in /usr/share/cacti/site/plugins/nectar/nectar_webapi.php on line 746and retry.Code: Select all
$timestamp = time();
R.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Nectar - Events Issues (times and dates)
You still got themcutting wrote:but got the same result.
Code: Select all
Notice: Undefined variable: now in /usr/share/cacti/site/plugins/nectar/nectar_webapi.php on line 746
You may still get "wrong" event timing, yes. That was not what I was tackling by this change.
For the wrong times, please answer the questions from above:
an Example showing
- wrong time
- correct time
- system time
- "mysql time"
would be fine. Again, when doing this on different reports, is there a constant offset between "correct" and "incorrect" time?
R.
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
My apologies - thanks to a strange caching issue in Firefox, the error persisted as the page wasn't being refreshed. I've fixed this now, so "time();" works fine.I can't believe that.
Not sure how I'm going to show you this. If I enter the time I'd like the report to be sent, and click save, the value is overwritten with the current date and time (in Nectar)You may still get "wrong" event timing, yes. That was not what I was tackling by this change.
For the wrong times, please answer the questions from above:
an Example showing
- wrong time
Again, the "correct time" is being entered as (example) "24/06/2010 23:00:00"- correct time
date- system time
Thu Jun 24 08:43:04 BST 2010
select current_timestamp;- "mysql time"
current_timestamp
2010-06-24 08:48:36
The same issue is persistent across the two reports that I have currently configured.Again, when doing this on different reports, is there a constant offset between "correct" and "incorrect" time?
If this isn't the information you're looking for, please let me know.
Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Accidentally, I was skipping this post.mcutting wrote:I guess I should have been clearer. What actually happens is that if I change the report date and time to 23/06/2010 23:00:00
It default to the current time when saved.
Bottom line is, that alwas current time is used even if a different time was request. Now I understand better and will look into it.
R.
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
I used Google Translator !
Thing is, lots of people use this site from all sorts of far-flung places. I wanted to help (in the community spirit), so I just told him to create his post in English to attract more support
Thing is, lots of people use this site from all sorts of far-flung places. I wanted to help (in the community spirit), so I just told him to create his post in English to attract more support
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Reinhard,gandalf wrote:Accidentally, I was skipping this post.mcutting wrote:I guess I should have been clearer. What actually happens is that if I change the report date and time to 23/06/2010 23:00:00
It default to the current time when saved.
Bottom line is, that alwas current time is used even if a different time was request. Now I understand better and will look into it.
R.
Any developments with this please ? I pulled the latest copy out of SVN, but the problem seems to still exist.
Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Who is online
Users browsing this forum: No registered users and 2 guests