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

Macro $HOSTBACKENDID$ is not available in the action menu #1331

Closed
gevadeka opened this issue Jan 16, 2024 · 1 comment
Closed

Macro $HOSTBACKENDID$ is not available in the action menu #1331

gevadeka opened this issue Jan 16, 2024 · 1 comment

Comments

@gevadeka
Copy link

gevadeka commented Jan 16, 2024

Describe the bug
Macro $HOSTBACKENDID$ is not available in the action menu, although documentation says otherwise (see https://www.thruk.org/documentation/macros.html)

Thruk Version
Thruk 3.08.3 / OMD Labs 5.20

To Reproduce
Steps to reproduce the behavior:

  1. Create an action on a Thruk host which has backends defined, for example to use Thruk's proxy
    Something like this: "action": "/{{site}}/thruk/cgi-bin/proxy.cgi/$HOSTBACKENDID$/$HOSTBACKENDNAME$/grafana/"
  2. Click on the action, Thruk responds with HTTP error 500, stating it cannot replace macro's. The macro that cannot be replaced is the $HOSTBACKENDID$

Expected behavior
Thruk will go the the backend Grafana via its proxy

Screenshots
image

Additional context
I managed to add the $HOSTBACKENDID$ macro in Thruk's Backend/Manager.pm, function _set_host_macros
Then it works fine

@sni
Copy link
Owner

sni commented Feb 24, 2024

could you prepare a PR to fix Backend/Manager.pm then? Thanks

ketra added a commit to ketra/Thruk that referenced this issue Jun 19, 2024
Added $HOSTBACKENDID$ and $SERVICEBACKENDID$
sni pushed a commit that referenced this issue Jul 1, 2024
Added $HOSTBACKENDID$ and $SERVICEBACKENDID$
@sni sni closed this as completed Aug 5, 2024
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