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

Parameter icon_image value must not be an absolute path #619

Closed
meni2029 opened this issue May 28, 2020 · 0 comments
Closed

Parameter icon_image value must not be an absolute path #619

meni2029 opened this issue May 28, 2020 · 0 comments
Labels
Milestone

Comments

@meni2029
Copy link

Expected Behavior

icon_image parameter can be set for icinga2::object::host and icinga2::object::service with a relative path for the external user interface (relative from the webserver root folder of icingaweb2, e.g. imgfolder/image.png)

Current Behavior

Only absolute path is allowed by puppet-icinga2 module. Icingaweb2 front-end doesn't know about the absolute path of its host. If the absolute path to the icon image is given, the icon is not displayed on the icingaweb2 GUI.

Possible Solution

Replace Optional[Stdlib::Absolutepath] by Optional[String] for $icon_image in host.pp and service.pp

Steps to Reproduce (for bugs)

  1. define a icinga2::object::host with parameter icon_image and assign value like: 'imgfolder/image.png'
  2. run puppet agent -t

Context

I'm creating a template with puppet-icinga2 module which includes icon_image:

  icinga2::object::host { 'generic-host-test':
    template           => true,
    target             => '/etc/icinga2/conf.d.customer/HOST_template_customer.conf',
    check_command      => 'hostalive2',
    check_interval     => '5m',
    retry_interval     => '2m',
    max_check_attempts => '3',
    icon_image         => 'imgfolder/image.png',
    display_name       => 'generic-host-test'
  }

And getting this error at puppet agent run:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, "imgfolder/image.png" is not an absolute path...

Your Environment

  • Module version (puppet module list): puppet-icinga2 (v0.6.1)
  • Puppet version (puppet -V): 4.6.1
  • Operating System and version: CentOS Linux release 7
@lbetz lbetz added the bug label May 28, 2020
@lbetz lbetz added this to the v2.4.2 milestone May 28, 2020
@lbetz lbetz closed this as completed in 8703776 Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants