[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

Naparuba naparuba at gmail.com
Tue Feb 28 22:22:02 UTC 2012


The following commit has been merged in the debian/master branch:
commit eb5b10ad9020271fff1055c9af4eec6c7983cea3
Author: Naparuba <naparuba at gmail.com>
Date:   Mon Feb 20 14:49:02 2012 +0100

    Fix (reported by : OliverHA) : invalid state change time in UIs.

diff --git a/shinken/objects/host.py b/shinken/objects/host.py
index 5e19b6b..f62c6bb 100644
--- a/shinken/objects/host.py
+++ b/shinken/objects/host.py
@@ -147,7 +147,7 @@ class Host(SchedulingItem):
         'last_state':           StringProp(default='PENDING', fill_brok=['full_status', 'check_result'], retention=True),
         'last_state_id':        IntegerProp(default=0, fill_brok=['full_status', 'check_result'], retention=True),
         'last_state_type' :     StringProp(default='HARD', fill_brok=['full_status', 'check_result'],  retention=True),
-        'last_state_change':    FloatProp(default=time.time(), fill_brok=['full_status'], retention=True),
+        'last_state_change':    FloatProp(default=time.time(), fill_brok=['full_status', 'check_result'], retention=True),
         'last_hard_state_change': FloatProp(default=time.time(), fill_brok=['full_status', 'check_result'], retention=True),
         'last_hard_state':      StringProp(default='PENDING', fill_brok=['full_status'], retention=True),
         'last_hard_state_id' :  IntegerProp(default=0, fill_brok=['full_status'], retention=True),
diff --git a/shinken/objects/service.py b/shinken/objects/service.py
index bfe8fc3..55495c6 100644
--- a/shinken/objects/service.py
+++ b/shinken/objects/service.py
@@ -142,7 +142,7 @@ class Service(SchedulingItem):
         'last_state':         StringProp (default='PENDING', fill_brok=['full_status', 'check_result'], retention=True),
         'last_state_type':    StringProp (default='HARD', fill_brok=['full_status', 'check_result'], retention=True),
         'last_state_id':      IntegerProp(default=0, fill_brok=['full_status', 'check_result'], retention=True),
-        'last_state_change':  FloatProp (default=time.time(), fill_brok=['full_status'], retention=True),
+        'last_state_change':  FloatProp (default=time.time(), fill_brok=['full_status', 'check_result'], retention=True),
         'last_hard_state_change': FloatProp(default=time.time(), fill_brok=['full_status', 'check_result'], retention=True),
         'last_hard_state':    StringProp (default='PENDING', fill_brok=['full_status'], retention=True),
         'last_hard_state_id': IntegerProp(default=0, fill_brok=['full_status'], retention=True),

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list