Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #6094] add 'is_reachable' to host and service state tables #1498

Closed
icinga-migration opened this issue Apr 29, 2014 · 9 comments

Comments

@icinga-migration
Copy link
Member

commented Apr 29, 2014

This issue has been migrated from Redmine: https://dev.icinga.com/issues/6094

Created by mfriedrich on 2014-04-29 15:32:59 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2014-05-10 19:30:04 +00:00)
Target Version: 0.0.11
Last Update: 2014-09-16 09:19:48 +00:00 (in Redmine)


The host's 'state' in 1.x is unreachable, but in 2.x we do have that type for both hosts and services.

  • db_ido
  • livestatus
  • statusdata

Changesets

2014-05-10 18:37:09 +00:00 by (unknown) 97d51c4

Livestatus: Add 'is_reachable' to hosts/services table.

Refs #6094

2014-05-10 19:03:47 +00:00 by (unknown) f5e568d

DB IDO: Add 'is_reachable' column to {host,service}status tables.

Refs #6094

2014-05-10 19:21:29 +00:00 by (unknown) 1e26d04

StatusDataWriter: Add 'is_reachable' {host,service}status attribute.

Refs #6094

2014-05-10 19:27:56 +00:00 by (unknown) d98d0e9

DB IDO: Bump schema version to 1.11.3.

Refs #6094

2014-05-10 19:28:41 +00:00 by (unknown) 909c353

Merge branch 'feature/is-reachable-6094' into next

Fixes #6094

2014-05-10 19:38:23 +00:00 by (unknown) d13871e

Documentation: Add schema extensions.

Refs #6094

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2014

Updated by mfriedrich on 2014-04-29 15:33:05 +00:00

  • Priority changed from Normal to High
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2014

Updated by tgelf on 2014-04-29 16:35:19 +00:00

Let's discuss this once you have time, I'm not sure whether a new column is a good idea here. IMO we should corretly "translate" state for hosts and think how to handle services. They have special treatment in 1.x too as they implicitely depend on their hosts. GUIs from Classic to Web2 implemented this by showing problem services on problem hosts being "handled". We should be very careful to not break things here.

Cheers,
Thomas

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 2, 2014

Updated by mfriedrich on 2014-05-02 20:45:00 +00:00

Icinga 2's checkable objects have IsReachable() defined, and this is the only logical way of making this visible to external interfaces. The host's 'unreachable' and service's 'unknown' state isn't really designed through, and does not help in terms of reachability calculations.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 3, 2014

Updated by mfriedrich on 2014-05-03 16:09:00 +00:00

  • Priority changed from High to Normal
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 4, 2014

Updated by mfriedrich on 2014-05-04 14:02:02 +00:00

Further problem:

  • define a service dependency
  • service becomes unreachable
  • service state is still critical

that's a different behaviour with a host dependency where the core changes its state. we cannot change that behaviour for compatibility reasons, but an additional flag signalling that this checkable object is unreachable in terms of met dependencies will help future implementations where the web interface may chose upon this information what to present to the user.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 10, 2014

Updated by mfriedrich on 2014-05-10 19:29:53 +00:00

michi@imagine ~/coding/icinga/icinga2/test/livestatus (feature/is-reachable-6094) $ ./run_queries queries/service/state 
GET services
Columns: description host_name last_state_change last_hard_state_change last_time_ok last_time_warning last_time_critical last_time_unknown staleness is_reachable
ResponseHeader: fixed16

200        1599
users;localhost;1399746901;1399746901;1399748180;0;0;1399746743;0.000366497;1
procs;localhost;1399746901;1399746901;0;1399748180;0;1399746743;0.00036648;1
ssh;localhost;1399746901;1399746901;1399748180;0;0;1399746743;0.00036649;1
icinga;localhost;1396707982;1396707982;1399748180;0;0;0;0.000366502;1
5980-service1;5980-host;1399746901;1399746901;1399748180;0;0;1399746743;0.000366505;1
disk;localhost;1399746901;1399746901;0;1397506349;1399748560;1399746799;1.47554e-05;1
load;localhost;1399746901;1399746901;1399748560;1399738505;0;1399746799;1.47539e-05;1
http;localhost;1399746901;1399746901;1399748180;0;0;1399746743;0.000366502;1
kernel;localhost;1398968375;1398968375;0;1398087018;0;1399748181;0.000366416;1
swap;localhost;1399746901;1399746901;1399748560;0;0;1399746799;1.47565e-05;1
5980-service2;5980-host;1399746901;1399746901;1399748518;0;0;1399746819;5.35257e-05;1
ping4;localhost;1399746905;1399746905;1399748537;0;0;1399746809;3.64688e-05;1
ping6;localhost;1399746905;1399746905;1399748522;0;0;1399746819;4.98169e-05;1
5926-macro-test-service;5926-macro-test-host;1399733423;1399733423;1399748302;0;0;0;0.000254415;1
2742-macro-test;2742-server;1399733281;1399733281;1399748428;0;0;0;0.000137437;0
5872-ping4;5872-server;1399733462;1399733462;0;0;1399746911;0;0.00154158;0
5872-ping4;5872-router;1399746911;1399746911;0;0;1399748213;1399746656;0.000336236;0
5872-ping4;5872-switch;1399733437;1399733437;0;0;1399746911;0;0.00154158;0
5872-ping4;5872-pc;1399733390;1399733390;0;0;1399746911;0;0.00154158;0
6105-foo;6105-keks;1399748429;1399748429;0;0;1399748429;1399748362;0.000136106;0

michi@imagine ~/coding/icinga/icinga2/test/livestatus (feature/is-reachable-6094) $ ./run_queries queries/host/state
GET hosts
Columns: name last_state_change last_hard_state_change last_time_up last_time_down last_time_unreachable staleness is_reachable
ResponseHeader: fixed16

200         560
5872-server;1399733296;1399733296;0;1399735396;0;0.0122187;0
5872-router;1399746945;1399746945;0;1399748145;0;0.000413667;1
5872-switch;1399733296;1399733296;0;1399735396;0;0.0122187;0
5980-host;1399746919;1399746919;1399748119;0;0;0.000437745;1
6105-keks;1399746945;1399746945;0;1399748145;0;0.000413669;1
5926-macro-test-host;1399733266;1399733266;1399748115;0;0;0.000441449;1
5872-pc;1399733296;1399733296;0;1399735396;0;0.0122187;0
localhost;1399746951;1399746951;1399748537;0;0;5.11821e-05;1
2742-server;1399746945;1399746945;0;1399748145;0;0.000413671;1

mysql> select oss.name1 as host, oss.name2 as service, ss.is_reachable as is_reachable from icinga_servicestatus ss join icinga_objects oss on ss.service_object_id=oss.object_id where ss.is_reachable is not null;
+----------------------+-------------------------+--------------+
| host                 | service                 | is_reachable |
+----------------------+-------------------------+--------------+
| localhost            | disk                    |            1 |
| localhost            | http                    |            1 |
| localhost            | load                    |            1 |
| localhost            | ping4                   |            1 |
| localhost            | ping6                   |            1 |
| localhost            | ssh                     |            1 |
| localhost            | users                   |            1 |
| localhost            | kernel                  |            1 |
| localhost            | swap                    |            1 |
| localhost            | icinga                  |            1 |
| localhost            | procs                   |            1 |
| 5872-server          | 5872-ping4              |            0 |
| 5872-pc              | 5872-ping4              |            0 |
| 5872-router          | 5872-ping4              |            0 |
| 5872-switch          | 5872-ping4              |            0 |
| 2742-server          | 2742-macro-test         |            0 |
| 5926-macro-test-host | 5926-macro-test-service |            1 |
| 5980-host            | 5980-service1           |            1 |
| 5980-host            | 5980-service2           |            1 |
| 6105-keks            | 6105-foo                |            0 |
+----------------------+-------------------------+--------------+
20 rows in set (0.00 sec)

mysql> select ohs.name1 as host, hs.is_reachable as is_reachable from icinga_hoststatus hs join icinga_objects ohs on hs.host_object_id=ohs.object_id where hs.is_reachable is not null;
+----------------------+--------------+
| host                 | is_reachable |
+----------------------+--------------+
| 5872-server          |            0 |
| 5872-pc              |            0 |
| 6105-keks            |            1 |
| 5872-router          |            1 |
| 5872-switch          |            0 |
| 2742-server          |            1 |
| 5926-macro-test-host |            1 |
| 5980-host            |            1 |
| localhost            |            1 |
+----------------------+--------------+
9 rows in set (0.00 sec)

Classic UI support is implemented with 1.11.3 in #6186

Check Source / Reachability:    imagine / false
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented May 10, 2014

Updated by Anonymous on 2014-05-10 19:30:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset i2:909c3538391ddaee15af9a6120fafbab1c2f64f8.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Aug 7, 2014

Updated by mfriedrich on 2014-08-07 13:25:00 +00:00

  • Relates set to 6683
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Sep 16, 2014

Updated by mfriedrich on 2014-09-16 09:19:48 +00:00

  • Project changed from 32 to Icinga 2
  • Category set to DB IDO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.