sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.

Home Page:http://www.thruk.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Macro $HOSTBACKENDID$ is not available in the action menu

gevadeka opened this issue · comments

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

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