Icinga / icingaweb2-module-nagvis

NagVis integration into Icinga web 2
GNU General Public License v2.0
39 stars 22 forks source link

Context Action Menu not Displaying #37

Closed bmccorkle closed 2 years ago

bmccorkle commented 5 years ago

I'm unable to get actions on the context menu to display. If I change over to local authentication for Nagvis, I can see them. It seems like something isn't being handed over between the module and nagvis. I have /nagvis/admin permissions set in IcingaWeb

Expected Behavior

When right clicking on a host that has the proper tags set, I should see additional options in the context menu (exp: Connect by SSH)

Current Behavior

Nothing is displayed. If I modify Nagvis to accept location authentication, I can see the additional context action items.

http://docs.nagvis.org/1.9/en_US/extending/custom_context_actions.html

Possible Solution

Steps to Reproduce (for bugs)

  1. Edit nagvis.ini.php

  2. Enable needed Actions [action_ssh_url] action_type="ssh_url" obj_type="host,service" client_os="win,lnx,mac" condition="TAGS~SSH"

  3. Assign custom variable 'TAGS' to host and set value to SSH

  4. Right click on host (Action item should be displayed but it isn't)

Context

Your Environment

bmccorkle commented 5 years ago

I've discovered a workaround. In the nagvis context menu html file (default.context.html) if I change the lines as such:

"" lines to "" "" lines to ""

I can see the action items. It appears something isn't being exchanged properly for the permitted_perform macro. Of course I think this means anyone with access will be able to see these actions.

https://monitoring.clarin.eu/nagvis/docs/en_US/context_templates.html

bmccorkle commented 5 years ago

My workaround doesn't seem to be perfect. If the action is trying to call a custom file instead of URL it fails with the following:

{"message":"You are not permitted to access this page (Action\/perform\/).","title":"ERROR","type":"error"}

It works if I change Nagvis back to local authentication

lippserd commented 2 years ago

I'm sorry but we won't fix that.