-
Notifications
You must be signed in to change notification settings - Fork 27
-
Notifications
You must be signed in to change notification settings - Fork 27
[dev.icinga.com #1878] macro HOSTGROUPNAME #732
Comments
Updated by mfriedrich on 2011-09-08 14:41:48 +00:00
|
Updated by mfriedrich on 2011-09-25 13:25:41 +00:00 does this happen on the core (e.g. when pushing a notification and replacing that macro) or the cgis (classic ui) using the action_url over there? |
Updated by gzin on 2011-09-26 12:28:41 +00:00 Yes, that's right. Notifications are sent correctly, it seems to be a CGI bug. |
Updated by mfriedrich on 2011-10-06 14:47:12 +00:00
|
Updated by mfriedrich on 2011-10-06 15:56:30 +00:00 test config for varification.
output on status.cgi then.
but still, can't debug macro (no-)allocation currently. |
Updated by mfriedrich on 2011-10-06 16:39:56 +00:00
from a further analysis, this seems to be intended to be disabled. problem is that in order to grab the macros for a host being in hostgroups, you will have to
so the code works to grab the last hostgroup found, grabbing the macros and then letting that process below in action_url. but i don't think this is a proper solution to the real problem, that those macros can't just be concatenated or similar.
the notification macros clearly state this
i'll leave that here for further discussion.
|
Updated by gzin on 2011-11-08 18:48:14 +00:00 Hi! Only one hostgroup for HOSTGROUPNAME would be fine. There is also "HOSTGROUPNAMES" ("S" at the end) available:
I had a look at the code meanwhile, there is already some useful functionality for that included, but it is not used for the CGI, only for the CORE ("NSCORE"): Parts of the function:
and:
I tried to set the "NSCORE" in cgi/status.c without further code analysis, that caused a memory error. "NSCORE" is used very often. What should I/we do? |
Updated by mfriedrich on 2011-11-08 18:57:25 +00:00 the problem with classic ui (#define NSCGI) is, that you can't use pointers targetting daemonized memory linked lists, but the macros need to be fetched right when loading the page once. so the proposed git diff already does that, calling the hostgroup macros to be fetched and then replaced within the html output. the overall problem is, that this is a performancekiller, looping through all hostgroups, checking if the actual host is a member. a n * m timing, where n = hostcount, m = hostgroupscount, which could cause problems on larger systems. it might be worth taking this as an opt-in cfg option. ps: don't reuse #define NSCORE in cgis, that's not possible and will cause unexpected behaviour. |
Updated by mfriedrich on 2012-04-20 12:40:25 +00:00 anymore on that, or can i close this as "wontfix"? |
Updated by ricardo on 2012-05-02 07:59:27 +00:00 I would suggest closing it. |
Updated by mfriedrich on 2012-05-02 08:01:35 +00:00
wontfix - provide feedback when asking to reopen it. |
Updated by mfriedrich on 2014-12-08 09:42:21 +00:00
|
This issue has been migrated from Redmine: https://dev.icinga.com/issues/1878
Created by gzin on 2011-09-08 10:27:52 +00:00
Assignee: (none)
Status: Closed (closed on 2012-05-02 08:01:35 +00:00)
Target Version: (none)
Last Update: 2014-12-08 09:42:21 +00:00 (in Redmine)
Some (hostgroup-) macros do not work in host or service definitions.
For example in "action_url" or "icon_image".
Example:
action_url http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
HOSTNAME gets resolved, but HOSTGROUPNAME (or HOSTGROUPNAMES,...) stay unresolved ($HOSTGR...$ )
I'm currently using version 1.5.0. Same problem in icinga version 1.4.2. Same problem in nagios (v3.2.3)
The text was updated successfully, but these errors were encountered: