shinken-monitoring / mod-livestatus

Shinken module for presenting data with a MK/Livestatus comptabile interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LiveStatusWaitQuery: get_live_data_log failed on trigger

wenxin-wang opened this issue · comments

Hi all,
When I did this:

GET log
WaitTrigger: log

I got this repeatedly from brokerd.log:

[1428135768] ERROR: [broker-master] [Livestatus Wait Query]  Error: get_live_data_log() takes exactly 2 arguments (1 given)

I checked the source, and changed this line:

diff --git a/module/livestatus_wait_query.py b/module/livestatus_wait_query.py
index db987d5..f1addab 100644
--- a/module/livestatus_wait_query.py
+++ b/module/livestatus_wait_query.py
@@ -177,7 +177,7 @@ class LiveStatusWaitQuery(LiveStatusQuery):
             # Remember the number of stats filters. We need these numbers as columns later.
             # But we need to ask now, because get_live_data() will empty the stack
             if self.table == 'log':
-                result = self.get_live_data_log()
+                result = self.db.get_live_data_log()
             else:
                 # If the pnpgraph_present column is involved, then check
                 # with each request if the pnp perfdata path exists
-- 
2.0.5

But I'm not sure if this is correct fix.

But I'm not sure if this is correct fix.

could certainly be..

did it produced the expected result you wanted ??

Well, the bug went away, but then I tried to trigger log generated later
than a very recent moment, and got nothing. I don't know whether it was the
syntax was wrong or the fix was wrong.
Anyway, I don't think the query include the constraints.

Sincerely,
王文鑫
Charlie

On Fri, May 1, 2015 at 10:14 PM, Grégory Starck notifications@github.com
wrote:

But I'm not sure if this is correct fix.

could certainly be..

did it produced the expected result you wanted ??


Reply to this email directly or view it on GitHub
#53 (comment)
.

Hi,

well the error you got (get_live_data_log() takes exactly 2 arguments (1 given)) is a bug or programming error.

So I'll look into that.

Thx for the report.