Skip to content

use passed timeout argument instead of global timeouts for host/check#186

Merged
sni merged 1 commit intosni:masterfrom
inqrphl:fork/fix-use-timeout-arguments
Mar 3, 2026
Merged

use passed timeout argument instead of global timeouts for host/check#186
sni merged 1 commit intosni:masterfrom
inqrphl:fork/fix-use-timeout-arguments

Conversation

@inqrphl
Copy link
Copy Markdown
Contributor

@inqrphl inqrphl commented Feb 25, 2026

handle_host_check and handle_svc_check get a data pointer of type nebstruct_host/service_check_data.

this struct has another field called 'object_ptr' , that points to the raw host/service check struct

in a planned naemon feature, these host/service check structs will get their own 'check_timeout' field. this field is initialized to the default global value for the service/host check timeouts, purely found within the naemon source code.users can override this default global value by specifying another check_timeout in the config. when a neb request is fired, it now uses this check_timeout set in the host/service timeout

additionally the check_result struct now has a 'timeout' field, this is due to timeouts being customizable. it makes sense to add them to a check_result

first change is for mod_gearman to stop writing timeout in the gearman data wrongly. instead of looking into nebstruct_host/service_data 'timeout' field it was using global host/service timeouts from the naemon source code, which it is including. after this data is written and sent out to a gearman queue, a worker parses the lines for available fields, including 'timeout'

second change is for setting the check_result->timeout to 0 on orphaned checks, just making sure that its zeroed since it might have a random value.

Dont merge it before changes in naemon.

handle_host_check and handle_svc_check get a data pointer of type
nebstruct_host/service_check_data.

this struct has another field called 'object_ptr' , that points to the raw
host/service check struct

in a planned naemon feature, these host/service check structs will get their own
'check_timeout' field. this field is initialized to the default global value for
the service/host check timeouts, purely found within the naemon source
code.users can override this default global value by specifying another
check_timeout in the config. when a neb request is fired, it now uses this
check_timeout set in the host/service timeout

additionally the check_result struct now has a 'timeout' field, this is due to
timeouts being customizable. it makes sense to add them to a check_result

first change is for mod_gearman to stop writing timeout in the gearman data
wrongly. instead of looking into nebstruct_host/service_data 'timeout' field it
was using global host/service timeouts from the naemon source code, which it is
including. after this data is written and sent out to a gearman queue, a worker
parses the lines for available fields, including 'timeout'

second change is for setting the check_result->timeout to 0 on orphaned checks,
just making sure that its zeroed since it might have a random value.

Dont merge it before changes in naemon.
@inqrphl inqrphl marked this pull request as draft February 25, 2026 13:05
@sni sni marked this pull request as ready for review February 28, 2026 10:11
@sni sni merged commit 268ad74 into sni:master Mar 3, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants