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

API-Endpoint /serviceapplyrules missing "id"-field in 1.10.1 #2642

Closed
rndmh3ro opened this issue Oct 20, 2022 · 1 comment
Closed

API-Endpoint /serviceapplyrules missing "id"-field in 1.10.1 #2642

rndmh3ro opened this issue Oct 20, 2022 · 1 comment

Comments

@rndmh3ro
Copy link
Contributor

Expected Behavior

I noticed that the id-field is missing in v1.10.1 - it was there in 1.8.1.

Current Behavior

1.10.1:

> curl -u "icingaadmin:icinga" -H "Accept: application/json" http://localhost/icingaweb2/director/serviceapplyrules?resolved
{ "objects": [ {
    "assign_filter": "host.name=\"foohost\"",
    "check_command": "hostalive",
    "check_interval": "600",
    "check_period": "24/7",
    "check_timeout": "60",
    "display_name": "dummy process",
    "enable_active_checks": true,
    "enable_event_handler": true,
    "enable_flapping": true,
    "enable_notifications": true,
    "enable_passive_checks": false,
    "enable_perfdata": false,
    "event_command": "restart_httpd",
    "fields": [],
    "flapping_threshold_high": "30",
    "flapping_threshold_low": "25",
    "groups": [
        "fooservicegroup"
    ],
    "icon_image": "http://url1",
    "icon_image_alt": "alt text",
    "max_check_attempts": "5",
    "notes": "example note",
    "notes_url": "'http://url1' 'http://url2'",
    "object_name": "SERVICE_dummy",
    "object_type": "apply",
    "retry_interval": "180",
    "use_agent": false,
    "vars": {
        "procs_argument": "consul",
        "procs_critical": "1:",
        "procs_warning": "1:",
        "http_address": "$address$",
        "http_expect": "Yes",
        "http_port": "9080",
        "http_string": "Ready",
        "http_uri": "/ready"
    }
}] }

1.8.1:

> curl -u "icingaadmin:icinga" -H "Accept: application/json" http://localhost:8080/icingaweb2/director/serviceapplyrules
{ "objects": [ {
    "assign_filter": "host.name=\"foohost\"",
    "check_command": "hostalive",
    "check_interval": "600",
    "check_period": "24\/7",
    "check_timeout": "60",
    "display_name": "dummy process",
    "enable_active_checks": true,
    "enable_event_handler": true,
    "enable_notifications": true,
    "enable_passive_checks": false,
    "enable_perfdata": false,
    "event_command": "restart_httpd",
    "groups": [
        "fooservicegroup"
    ],
    "id": "3",
    "imports": [
        "fooservicetemplate"
    ],
    "max_check_attempts": "5",
    "object_name": "SERVICE_dummy",
    "object_type": "apply",
    "retry_interval": "180",
    "vars": {
        "http_address": "$address$",
        "http_expect": "Yes",
        "http_port": "9080",
        "http_string": "Ready",
        "http_uri": "\/ready"
    }
}] }

Possible Solution

  • Bring back the id-field :)
  • Alternatively could you please tell me a way to uniquely identify a service apply rule?

Steps to Reproduce (for bugs)

Create a serviceapplyrule in 1.10.1 and see the missing id.

Your Environment

Icinga Web 2 Version 	2.11.1
Git commit 	eecf8d9934cbf30ec063cea4a525b26bfd2bf99a
PHP Version 	7.3.31-1~deb10u1
Git commit date 	2022-07-06
[Get Icinga Support](https://icinga.com/support/)
[Icinga Community](https://icinga.com/community/)
[Report a bug](https://github.com/icinga/icingaweb2/issues)
[Icinga Documentation](https://icinga.com/docs/icinga-web-2/2.11)
Loaded Libraries
icinga/icinga-php-thirdparty 	0.11.0
icinga/icinga-php-library 	0.10.0
Loaded Modules
director 		1.10.1 	[Configure](http://localhost/icingaweb2/config/module/?name=director)
doc 		2.11.1 	[Configure](http://localhost/icingaweb2/config/module/?name=doc)
incubator 		0.18.0 	[Configure](http://localhost/icingaweb2/config/module/?name=incubator)
ipl 		v0.5.0 	[Configure](http://localhost/icingaweb2/config/module/?name=ipl)
monitoring 		2.11.1 	[Configure](http://localhost/icingaweb2/config/module/?name=monitoring)
reactbundle 		0.9.0 	[Configure](http://localhost/icingaweb2/config/module/?name=reactbundle)
Copyright © 2013-2022 [Icinga GmbH](https://icinga.com/)
@rndmh3ro
Copy link
Contributor Author

Fixed in 1.11.x

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 a pull request may close this issue.

1 participant