On Thu, Oct 04, 2007 at 11:23:31PM +0200, LIMA David wrote:
> select * from alarms where triggered = 1 and interface=3108;
> | id | date_start | date_stop | interface | type |
> active | referer_start | referer_stop | triggered |
> | 1598 | 2007-10-04 21:57:56 | 2007-10-04 22:06:20 | 3108 | 40 |
> 12 | 2147 | 2162 | 1 |
> We can see that the duration fonction is bad because 21 :57 :58 until
> 22 :06 :20 is not 4864 seconds but 504. If I use the poller1 function
> this test works.
564 isn't it? Giving a difference of 1 hour, 11 minutes and 40 seconds.
OK, so where does duration come from? Two places it seems!
First place is from the database;
SELECT (date_stop - date_start) AS duration FROM alarms WHERE triggered = 1
AND interface=3108
That should be 564, or 504 if you're calculations are correct.
The second place, for down alarms, comes calculated from the
current clock. Makes sense because you cannot calculate a down alarm
That is your servers time when it runs the command minus the start_date
Next time you get it, try this:
php -r 'echo time() - strtotime("2007-10-04 21:57:56"). "\n";'
You need to do it near the time it happens and substitute the
time with your start_date value;
Can you also tell me what event with id 2147 and 2162 look like?
--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/ Debian GNU/Linux, software should be Free
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users