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

New Livestatus fields (MK v1.2.1)

obinand opened this issue · comments

Hello,

When do you plan to track changes to MK_Livestatus, at the statehist (v1.2.1) and the host_staleness and service_staleness field? To be compatible with check_mk as frontend

Olivier

what are theses fields values? :)

thanks,

Jean

On Wed, Mar 12, 2014 at 10:48 PM, obinand notifications@github.com wrote:

Hello,

When do you plan to track changes to MK_Livestatus, at the statehist
(v1.2.1) and the host_staleness and service_staleness field? To be
compatible with check_mk as frontend

Olivier

Reply to this email directly or view it on GitHubhttps://github.com//issues/15
.

statehist is a table like this with host-level description check_mk
statehist - sla statistics for hosts and services, joined with data from hosts, services and log.

For the other fields I do not know what they are, I will mount a check_mk dedicated server to identify the values ​​of these fields

Olivier

We wil need some dumps to see what is exactly in there because here I don't
understand :p

On Thu, Mar 13, 2014 at 9:53 AM, obinand notifications@github.com wrote:

statehist is a table like this with host-level description check_mk
statehist - sla statistics for hosts and services, joined with data from
hosts, services and log.

For the other fields I do not know what they are, I will mount a check_mk
dedicated server to identify the values of these fields

Olivier

Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-37511053
.

New helpful title ...

Hello, I've updated this issue.
I think this post is also related to this issue.
http://www.shinken-monitoring.org/forum/index.php?topic=1858.0

It appears that recent version of MK_Multisite is no more usable with our livestatus module :(

In fact : https://mathias-kettner.de/check_mk_changelog_stable.html

New in version 1.2.3i2:

Livestatus

new service column staleness: indicator for outdated service checks
new host column staleness: indicator for outdated host checks

MultiSite :

"Unchecked Services" view now uses the staleness of services for filtering

commented

+1

commented

Hi,

what's the current status of Shinken Livestatus regarding "statehist" table and "staleness" columns?
We desperately need these features for reporting and NagVis... :)

Andy

Is there at least a workaround like returning hardcoded value?

Answering myself. Here is a quick workaround to return a hardcoded value for staleness (needed by Nagvis):

--- var/lib/shinken/modules/livestatus/mapping.py.orig  2015-11-30 15:16:42.829682487 +0100
+++ var/lib/shinken/modules/livestatus/mapping.py       2015-11-30 15:38:01.415712971 +0100
@@ -682,6 +682,10 @@
             'function': lambda item, req: [get_livestatus_full_name(i, req) for i in item.source_problems],  # REPAIRME MAYBE (separators in python and csv)
             'datatype': list,
         },
+        'staleness': {
+            'description': 'FIXME',
+            'function': lambda item, req: 0,
+        },
         'state': {
             'description': 'The current state of the host (0: up, 1: down, 2: unreachable)',
             'function': lambda item, req: item.state_id,
@@ -1466,6 +1470,10 @@
             'function': lambda item, req: "",  # REPAIRME
             'datatype': list,
         },
+        'staleness': {
+            'description': 'FIXME',
+            'function': lambda item, req: 0,
+        },
         'state': {
             'description': 'The current state of the service (0: OK, 1: WARN, 2: CRITICAL, 3: UNKNOWN)',
             'function': lambda item, req: item.state_id,

This patch works perfectly with Shinken 2.4.2, thanks ;-)

Also, nagvis was complaining about not finding servicegroups. At first sight, the problem isn't related to this… but it is related to.

@X-dark , could you make a PR with your quick patch ?
Do you want me to do it ?

@olivierHa I can but would it not be better to implement this new field properly?

Yes,of course it would be better.
But on my side, I got no time for this right now, and people are stuck with
this issue right now.

At least, nagvis will work ...

2016-03-04 15:08 GMT+01:00 Cedric Girard notifications@github.com:

@olivierHa https://github.com/olivierHa I can but would it not be
better to implement this new field properly?


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