Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #5575] Wrong handling of unknown return code in host status #1423

Closed
icinga-migration opened this issue Jan 29, 2014 · 4 comments

Comments

@icinga-migration
Copy link

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

Created by mfrosch on 2014-01-29 10:35:56 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2014-01-29 14:43:17 +00:00)
Target Version: 1.10.3
Last Update: 2014-01-29 14:43:17 +00:00 (in Redmine)

Icinga Version: 1.8.4
OS Version: Debian/squeeze

As it seems, the status handler for hosts accepts internally 3 as a valid state and exports this to status.dat in IDO.

Version: 1.8.4

Only for passive check results.

Effects:

CGIs

  • host is displayed as UP

icinga-web

  • grids display no status (invalid)
  • overall status on top fails during calculation of states

status.dat:

servicestatus {
        host_name=XXX
        service_description=ping
[...]
        check_command=ping
        check_period=24x7
        has_been_checked=1
        current_state=3
        last_hard_state=3
[...]
        plugin_output=check_icmp: Failed to resolve XXX
}

IDO:

+-------------+---------------+-----------------+
| name1       | current_state | last_hard_state |
+-------------+---------------+-----------------+
| XXX         |             3 |               3 |
+-------------+---------------+-----------------+

Changesets

2014-01-29 11:29:59 +00:00 by (unknown) bccaea8

Fix host state translation for passive host check results.

Fixes #5575

2014-01-29 11:32:49 +00:00 by (unknown) 31b7fcf

Update Changelog.

Refs #5575

2014-01-29 11:33:18 +00:00 by (unknown) d143506

Fix host state translation for passive host check results.

Fixes #5575

2014-01-29 11:33:43 +00:00 by (unknown) 3f80af8

Fix host state translation for passive host check results.

Fixes #5575

2014-02-18 12:03:36 +00:00 by (unknown) edc4645

Revert "Fix host state translation for passive host check results."

This reverts commit bccaea83e6536f3ac8dcc24a8b9547b67ed5407e.

Refs #5575
Refs #5671

2014-03-03 19:33:46 +00:00 by (unknown) 91e5d6e

Revert "Fix host state translation for passive host check results."

This reverts commit bccaea83e6536f3ac8dcc24a8b9547b67ed5407e.

Refs #5575
Refs #5671

Relations:

@icinga-migration
Copy link
Author

Updated by mfrosch on 2014-01-29 11:12:44 +00:00

  • Description updated

Clarification: happens only for passive check results

@icinga-migration
Copy link
Author

Updated by mfrosch on 2014-01-29 11:13:08 +00:00

  • Description updated

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-01-29 11:31:18 +00:00

  • Status changed from New to Assigned
  • Estimated Hours set to 1

passive checks are assumed to be already checked via the command pipe in base/commands.c but not bypassing that using the checkresult spool dir.

int process_passive_host_check(time_t check_time, char *host_name, int return_code, char *output) {

        /* make sure we have a reasonable return code */
        if (return_code < 0 || return_code > 2)
                return ERROR;

Therefore the host checkresult handling in base/checks.c needs to be changed in order to work for passive host check results the same way as for active checks.

@icinga-migration
Copy link
Author

Updated by Anonymous on 2014-01-29 14:43:17 +00:00

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

Applied in changeset bccaea8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant