[ZBX-507] user parameters do not work with zabbix_agentd -t Created: 2008 Sep 29  Updated: 2017 May 30  Resolved: 2010 May 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 1.6
Fix Version/s: 1.8.3, 1.9.0 (alpha)

Type: Incident report Priority: Major
Reporter: Kees Jan Koster Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD 7.1, Zabbix trunk



 Description   

The user parameters are broken on trunk. Here is the terminal out of of a local test on a machine.

ginger# fgrep foo /usr/local/etc/zabbix_agentd.conf
UserParameter=foo,/bin/echo woot
ginger# /usr/local/etc/rc.d/zabbix_agentd restart
Stopping zabbix_agentd.
Waiting for PIDS: 7713 7714 7715 7716 7717 7718.
Starting zabbix_agentd.
ginger# su - zabbix -c '/bin/echo woot'
woot
ginger# zabbix_agentd -t foo
foo [m|ZBX_NOTSUPPORTED]
ginger# _

Zabbix 1.4.6 gives me:

foo [t|woot]



 Comments   
Comment by Ware Adams [ 2008 Oct 15 ]

I had this exact same symptom, I couldn't even get the included example in the template config file to work using zaabix_agentd -t, but then I tried it from the zabbix server (the monitored agent is a different host). In that case it worked, bot for data collection and using zabbix_get.

I think the issue for me was that the config file was set to only allow connections from the single Zabbix server I have, so that was blocking zabbix_get and maybe even zabbix_agentd -t. The latter in particular seems odd, but this does work for me using 1.6 on OS X.

Comment by richlv [ 2009 Jan 27 ]

ok, there seems to be a quite significant fsckup with some procedure.
speaking trunk :
revision 6205 supposedly fixed this problem;
revision 6243 reverts change done in 6205.
additionally, revision 6246 reverts changelog entry for this fix.

1.6 branch had this change reverted in revision 6242.
1.6.1 was tagged from /branches/1.6:6247 - thus all 1.6 releases so far have been broken in this regard.

there goes my plan to upgrade to 1.6.2...

Comment by richlv [ 2009 Jan 27 ]

forgot to add - reapplying the change (moving the single line) for current trunk makes user parameters work again

Comment by richlv [ 2009 Jun 05 ]

see http://www.zabbix.com/forum/showthread.php?t=11560 for some bisect on what happened in svn.

supposedly the fix was not correct and broke other things - would have helped many users to see that mentioned in the svn log message...

Comment by Sebastian Vaisov [ 2009 Jun 05 ]

So how can we have workable solution of this?

Comment by Alexei Vladishev [ 2009 Jun 06 ]

Both -t and -p parameters do not take into account user parameters. Period. User parameters work absolutely fine, you can query them from Zabbix server or using zabbix_get utility.

The issue will be fixed anyway.

Alexei

Comment by Sebastian Vaisov [ 2009 Jun 08 ]

Ok. But what if I want to use UserParameters for active checks?

Comment by Alexei Vladishev [ 2009 Jun 18 ]

I would like to stress that UserParameters work absolutely fine in all cases (passive, active checks) except when querying with -t or -p.

Comment by richlv [ 2009 Sep 14 ]

updated summary to reflect the actual problem.
additionally, latest versions of zabbix agentd now display a warning about user parameters not working with -t, so that hopefully will help to mitigate the confusion caused

Comment by richlv [ 2009 Sep 24 ]

is zabbix_agent working a masked problem in it or something to lift a solution from ?

Comment by Alexei Vladishev [ 2010 May 14 ]

The agent should be improved to allow use of user parameters using -t and -p flags. I f -p flag is given, a flexible user parameter should assume than no key parameters are given. For example:

UserParameter=test[*], echo $1

When -p flag is specified, test[] will be executed (parameters are empty strings).

Comment by Aleksandrs Saveljevs [ 2010 May 20 ]

Available in pre-1.8.3 in r12102.

Generated at Wed Apr 24 10:19:33 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.