[ZBX-4976] HOST.CONN doesn't work in global scripts Created: 2012 May 10 Updated: 2017 May 30 Resolved: 2012 Jul 24 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.0rc3 |
Fix Version/s: | 2.0.2rc2, 2.1.0 |
Type: | Incident report | Priority: | Blocker |
Reporter: | richlv | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 7 |
Labels: | globalscripts | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
trunk rev 27311 |
Issue Links: |
|
Description |
global scripts don't seem to work with HOST.CONN macro anymore. tried with agent and snmp interfaces and ip specified for them. debuglevel 4 gives : In substitute_simple_macros() data:'/bin/ping -c 3 {HOST.CONN} 2>&1'cannot resolve macro '{HOST.CONN} ' |
Comments |
Comment by Alexander Vladishev [ 2012 May 10 ] |
With Agent interface all work fine. If only SNMP interface is specified in a host the macro expands according documentation. http://www.zabbix.com/documentation/2.0/manual/appendix/macros/supported_by_location "In the context of remote command execution, GUI scripts, item key's parameters, and interface IP/DNS fields, only the main Agent interface will be considered as the source of information." |
Comment by Oleksii Zagorskyi [ 2012 May 10 ] |
I know this problem. Rich, do not forget about configuration cache update interval. |
Comment by richlv [ 2012 May 11 ] |
after a bunch of testing, yes, configuration caching confused me i'd probably go for agent-snmp-jmx-ipmi, to be the same ordering as in the frontend <zalex> I recall I was also mislead because of using server cache (for interfaces) for macros expending when I created the Maybe server cache should not be used here (for GUI scripts) ? Users can change interfaces setting (add/delete, change IP) and very fast try to use GUI scripts (with macros) and it's absolutely not clear why they do not work or work as not expected. So, I support Rich's point of view (agent-snmp-jmx-ipmi) and I suggest to not use server cache to expanding macros in GUI scripts. <richlv> not sure about skipping the cache, performance is the king |
Comment by Александр Новосёлов [ 2012 May 30 ] |
google translate The device was found on snmp (autodiscovery), respectively, the agent interface he does not - but there is an element of data a_est_li_eto_chudo_na_karte [" {HOST.CONN}"]respectively, the work was broken. manually add the interface agent incorrectly - what shall we do with it? Logical external audits performed on any interface ip if it is. original --------------------------------------------- Устройство нашлось по snmp (автообнаружение) соответственно интерфейса агента у него нет - но есть элемент данных а_есть_ли_это_чудо_на_карте["{HOST.CONN} "] |
Comment by richlv [ 2012 Jun 29 ] |
ZBXNEXT-1293 is related |
Comment by Oleksii Zagorskyi [ 2012 Jul 06 ] |
Additional forum thread (in Russian) http://www.zabbix.com/forum/showthread.php?t=27075 |
Comment by Tobias van Hoogen [ 2012 Jul 13 ] |
ah, no need to file a new ticket... We used to do this via a template on a couple of hundred devices, simple external check with a custom script in 1.8.12: Template_X_Poiprouter: PoipLocalIkePeer PoipLocalIkePeer.sh[" {HOST.CONN}",] 86400 14 External check Now we migrated to 2.0.1, all the items are stuck in the queue - big issue. Thanks! |
Comment by Alexander Vladishev [ 2012 Jul 19 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-4976 |
Comment by Oleksii Zagorskyi [ 2012 Jul 19 ] |
(1) it seems we need to see updated documentation do know how it should work now <zalex> ohh, SVN log message in the dev branch is very useful, I'm copying it here: ........S. , {HOST.IP) and {HOST.DNS} macros substitution for global scripts
<richlv> should be documented in http://www.zabbix.com/documentation/2.0/manual/appendix/macros/supported_by_location and the note below the table updated (mentioning which version changes the behaviour, probably 2.0.3) <Sasha> updated documentation. Please review. <richlv> docs seem to be good, CLOSED |
Comment by Oleksii Zagorskyi [ 2012 Jul 19 ] |
the dev branch successfully tested. works as described above. |
Comment by dimir [ 2012 Jul 20 ] |
Successfully tested! |
Comment by richlv [ 2012 Jul 23 ] |
ZBX-3619 talks about more global lack of consistency in this area |
Comment by Alexander Vladishev [ 2012 Jul 24 ] |
Fixed in pre-2.0.2 r29111 and pre-2.1.0 (beta) r29112. |