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

Service parents are not validated correctly #1376

Closed
imre-sidn opened this issue Jun 24, 2024 · 2 comments
Closed

Service parents are not validated correctly #1376

imre-sidn opened this issue Jun 24, 2024 · 2 comments

Comments

@imre-sidn
Copy link

Describe the bug
Service parents are documented in the service object type definition. According to that documentation, it should be possible to configure the child service with one or more parent service tuples in the form host_name,servicedescription. This works, I can create a parent-child relation between a service on host A and another service on host B, and Thruk correctly displays this in the Service Information page of the child service. Naemon correctly disables checks of the child service if the parent service is unavailable.

The problem is that the validation logic in Thruk does not recognize this as a valid reference. The Cross Reference Check for example lists such a reference as an improvement with message 'referenced service 'ams-ix.net,PING' does not exist'. The same error is seen in the Config Parse Errors overview in the Apply tab of the Config Tool.

Thruk Version
3.14.2

To Reproduce
Steps to reproduce the behavior:

  1. Check that the ams-ix.net,PING service exists: https://demo.thruk.org/demo/thruk/cgi-bin/extinfo.cgi?type=2&host=ams-ix.net&service=PING&backend=40863
  2. Go to https://demo.thruk.org/demo/thruk/cgi-bin/conf.cgi?sub=objects&tools=ObjectReferences, or https://demo.thruk.org/demo/thruk/cgi-bin/conf.cgi?sub=objects&apply=yes
  3. See error 'referenced service 'ams-ix.net,PING' does not exist'

Expected behavior
Thruk should recognize the host_name,servicedescription tuple format and not display the error described above.

Screenshots
image
image
image

@sni sni closed this as completed in aac1a07 Jul 19, 2024
@sni
Copy link
Owner

sni commented Jul 19, 2024

thanks for reporting this, should be fine now.

@imre-sidn
Copy link
Author

Tried your patch on a test system and reloaded httpd, works perfectly now. Thanks a lot!

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

No branches or pull requests

2 participants