[ZBX-9258] Unable to use both Alias and active check Created: 2015 Jan 28 Updated: 2017 May 30 Resolved: 2015 Sep 11 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.4.3 |
Fix Version/s: | 2.4.7rc1, 3.0.0alpha2 |
Type: | Incident report | Priority: | Major |
Reporter: | Gabriel Féron | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | active, aliases, logmonitoring | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu Linux 12.04.5 LTS |
Description |
It seems that it's impossible to declare an Alias like: Alias=k.input:log[/var/log/program.log,"Starting to work on [0-9]+ orders"] and use an active check (the server marks the item as unsupported with the following message: "Accessible only as active check") whereas using log[/var/log/program.log,"Starting to work on [0-9]+ orders"] as an active agent check item on the server works as expected. I have a few big regular expressions and I'd like them to be stored on the agent side. Am I missing something? If not, then I think it's either a bug or it should be stated more explicitely in the documentation that aliases are not compatible with active agent checks. |
Comments |
Comment by richlv [ 2015 Jan 29 ] |
confirming in recent trunk. note that this is not related to alias + active but alias + active + log (aliasing system.cpu.load as an active item works as expected) |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 14 ] |
Fix for version 2.4 is available in development branch svn://svn.zabbix.com/branches/dev/ZBX-9258 r54976. Inserted zbx_alias_get() on adding active check. This avoids falling through if conditions in process_active_checks() where active check key is checked to start with "log[", "logrt[" or "eventlog[". Otherwise process() is called which does call zbx_alias_get() but deals with passive checks only. |
Comment by dimir [ 2015 Aug 20 ] |
(1) [G] Compilation error. active.c: In function ‘parse_list_of_checks’: active.c:332:3: error: implicit declaration of function ‘zbx_alias_get’ [-Werror=implicit-function-declaration] add_check(zbx_alias_get(name), key_orig, delay, lastlogsize, mtime); ^ Header file needs to be included. glebs.ivanovskis You are right. See changes in revision 55068. RESOLVED <dimir> Great! CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 20 ] |
Fixed in pre-2.4.7rc1 r55081. |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 20 ] |
(2) Mentioned improvements in What's new:
martins-v I removed the entry for 3.0. We try not to duplicate info, since the fix is already since 2.4.7 and 3.0 is not yet released. sasha CLOSED |
Comment by Aleksandrs Saveljevs [ 2015 Aug 24 ] |
(3) Suppose we have the following two aliases: Alias=alias1:alias2 Alias=alias2:agent.version If alias1 is set up as an active check, it will return agent.version. It should instead become not supported, same as it does when queried as a passive check. glebs.ivanovskis Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9258 r55163. sasha CLOSED |
Comment by dimir [ 2015 Sep 07 ] |
Please review my changes in r55434. glebs.ivanovskis Thanks! Reviewed, accepted. CLOSED |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 07 ] |
Fixed in pre-2.4.7rc1 r55442. |