[ZBXNEXT-936] Zabbix Proxy does not proxy remote commands Created: 2009 Nov 02  Updated: 2024 Apr 10  Resolved: 2017 May 18

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A), Frontend (F), Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 3.4.0alpha1, 3.4 (plan)

Type: New Feature Request Priority: Major
Reporter: Jordi Clariana Assignee: Unassigned
Resolution: Fixed Votes: 124
Labels: remotecommands
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian 5.0.3


Attachments: PNG File Screen shot 2011-11-07 at 12.54.31 PM.png     JPEG File screenshot-1.jpg     File zabbix_get.py    
Issue Links:
Causes
causes ZBX-13241 Memory leak when executing remote com... Closed
causes ZBX-13245 Unreliable Zabbix server response to ... Closed
causes ZBX-13403 Proxy does not execute remote command... Closed
causes ZBX-15442 Zabbix proxy ignores DataSenderFrequency Closed
Duplicate
Sub-task
depends on ZBX-12936 'Last seen (age)' updates only when H... Closed
depends on ZBX-12018 Publish new templates for monitoring ... Closed
Team: Team C
Sprint: Sprint 1, Sprint 2, Sprint 3, Sprint 4, Sprint 5, Sprint 8
Story Points: 10

 Description   

This is the topology I tested:

(LAN1) Zabbix Server -> (LAN2) Zabbix Proxy -> (LAN2) Zabbix Agent

I've configured a basic item and linked trigger. They work good.
Then, I created an action for that trigger, which basically send an email to me and execute a remote command. When the trigger runs the action, the email is sent ok, but the remote command is not executed in the monitored machine (the one with Zabbix Agent).
The remote command, for instance, may look like this:
{HOSTNAME}:sudo /tmp/test.sh 1

(But I tried other simplier commands and they didn't work either)

If I configured the same (and I mean the same) item, trigger, action and remote command with the following topology it works:

(LAN2) Zabbix Server -> (LAN2) Zabbix Agent

So, it seems like Zabbix proxy do not proxy remote commands.



 Comments   
Comment by Krzysztof Kardas [ 2010 Feb 25 ]

Confirmed on Zabbix 1.8.1

Remote command does not work threw proxy Proxy. I have nothing in proxy logs nor agent logs.

I have registered command like:

{HOSTPROXY}:{HOSTNAME}:{COMMAND}

It was the only way that web interface allowed me to register Remote Command Action.

Comment by Jordi Clariana [ 2010 Oct 13 ]

Hi Krzysztof, can you tell me how did you do that? (I mean registering the command). Did it work? I want to do so too.

Thanks.

Comment by Jordi Clariana [ 2010 Oct 13 ]

Hi. Does it mean that this is going to be resolved/implemented?
I'm not able to find/see DEV-378. Is it right?
Thanks.

Comment by Igor Danoshaites (Inactive) [ 2010 Oct 18 ]

Mail from Krzysztof Kardas:

Well I have registered command like this:
proxyname:servername:command

The other way does not work - like
servername:command

Zabbix frontend says that there is no such server.

I have tried it on 1.8.1 but not on 1.8.3.
Maybe something has been fixed ?

I think the simple way to repair it is to change the proxy delimiter from : to something else like maybe "|" or whatever sign. Then Zabbix server will have the ability to recognize that host is behind proxy and send the proper configuration to it. Or simple check if the host is behind proxy. I have not analysed the code for this bug.

Greetings
Krzysztof Kardas

Comment by Igor Danoshaites (Inactive) [ 2010 Oct 18 ]

To Jordi Clariana:

You were writing: "I'm not able to find/see DEV-378. Is it right?"
-->Yes, it is OK that you are not able to open DEV-378 issue, it is an internal issue for development.

Comment by Jordi Clariana [ 2010 Oct 18 ]

Thanks for the answer. Does it mean that this issue is going to be resolved for the next release?

Jordi.

Comment by richlv [ 2010 Oct 18 ]

as far as i know, there's no specific plan regarding remote command support for proxies currently

Comment by shanu [ 2011 Apr 26 ]

The command provided by Krzysztof Kardas – {HOSTPROXY}:{HOSTNAME}:{COMMAND} – doesn't seem to work, atleast in v1.8.4 (that's the version I am using). Apparently, it's not accepting the "{HOSTPROXY}" directive and throwing an "incorrect command" error.
Did it work for anyone else? Jordi Clariana?

Please let me know if there's any workaround for this. Thanks!

Comment by Jordi Clariana [ 2011 Apr 26 ]

Hi Shanu.

This command will not work because it need to be "registered" as Krzysztof said, in the zabbix source code (if I'm not mistaken). But, I don't know how to do this, that's because I asked later how to do so, without any response.
Besides, it seems that this functionality is lack of interest (not to me), as richlv said in the message before yours.

Regards,

Jordi.

Comment by Alexei Vladishev [ 2011 Aug 29 ]

Currently proxies do not support remote commands. There is a ZBXNEXT issue registered about it. I am closing it, not a bug.

Comment by richlv [ 2011 Aug 30 ]

couldn't find an existing zbxnext -> reopening

Comment by Trey Dockendorf [ 2011 Nov 07 ]

I can confirm that proxy's still don't execute remote commands as of 1.8.8. Below is the trigger I'm using

{HOSTNAME}:sudo /sbin/service puppet start 1>/dev/null 2>&1

This trigger works just fine on agents that are Server -> Agent. However it never gets executed when the agent goes through a proxy , Server -> Proxy -> Agent. The action is logged correctly in the Audit logs,(attached screenshot), but never actually gets executed. There is no error in either the Proxy or Server logs.

Comment by James Sperry [ 2012 Mar 01 ]

So I ran into this issue today, and was able to get a remote command to work on a host managed by a proxy.

The problem is, the main zabbix server is actually sending the call to execute the command on the host, not the proxy.
Here is the debug level 4 error in zabbix_agent.log
6737:20120301:100626.412 Listener error: Connection from [<main Zabbix Server IP>] rejected. Allowed server is [<Proxy Server IP>]

So I had to add the main zabbix server's IP to the list of Servers in the zabbix_agentd.conf

Server=<proxy ip>,<main zabbix ip>

Now I was able to run the remote command.

The problem now is that I have to open firewall holes to each host in another Datacenter so the main zabbix server can talk to them, which was most of the reason why we were using Proxies in the first place.

Comment by Jerome Lagrue [ 2012 Mar 22 ]

Hi,

I'm using Zabbix server 1.8.10, proxies are in same version and agent are in version from 1.8.5 to 1.8.10. I still cannot run remote command on host behind proxies even using solution provided by Krzysztof Kardas :
{HOSTPROXY}:{HOSTNAME}:{COMMAND}

For now, I have two solutions but not easy to maintain :

  • using a script on server that does ssh tunneling through proxy to run command on the host
  • running remote command,on proxy using the agent, to run script that does ssh to run commands on the hosts

One or other solution are dirty and not scalable. Any chance to run remote command on host through proxies ?

Comment by Eugene Istomin [ 2012 Apr 09 ]

Hi,

we have the same situation: all of our infrastructure a located beyond proxies.
Right now we implementing scalable failover technics, and remote command execution is the global part of this.

Can we donate some amount of € for resolving this issue?


Best regards,
Eugene Istomin
[email protected]

Comment by Jc Duss [ 2012 Apr 10 ]

Hi,

After migration of our zabbix server to a new server and transform the old server into a proxy, we have fall into this non existant feature. I won't have thought it wasn't already an existant feature.

Can you please create this ?

Thank you.
JC

Comment by Tobias van Hoogen [ 2012 May 16 ]

Running into the same issue with 1.8.12, considering this as a major issue since our FW setup has to be changed for this, making the network ninja's very unhappy.

Comment by chris scott [ 2012 Aug 07 ]

This is definitely causing me a few issues, should we expect a fix soon or is it quite a difficult one to progress?

Comment by richlv [ 2012 Aug 07 ]

there are currently no short term plans for this feature

Comment by Eli Stair [ 2012 Oct 17 ]

This silenly-missing feature tricks one into building infrastructure and methods around the use of Proxy for remote-site monitoring. This should not be a separate "feature" that needs to be paid for and added, it's implicit. Please fix. If a cup needs to be passed around to sponsor it, please be up front about it and specify how much this will cost so it can be done.

Comment by Marc [ 2012 Dec 14 ]

Maybe via ZBXNEXT Sponsor Application Form
Just seen that it's planned for next major release
Actually it's just tagged for NMR. Meanwhile I know the tags better

Comment by Juan Pablo Daniel [ 2013 Dec 04 ]

In a related issue, I needed to run a command on the proxy of the host triggering so I modified the source code and added the new option of "Run in proxy" , here is the patch http://www.spotflux.com/blog/automated-high-availability-zabbix/ and it is in production since 7 months ago and even reused it for the different versions. You should place this file in debian/patches/ before creating the .deb.
I hope it helps someone else.

The only condition is that the proxy is running zabbix-agent with remote commands enabled and connecting to the zabbix server directly.

Saludos!

Comment by Sergej [ 2014 Apr 03 ]

It would be nice to implement such feature: Remote commands through proxy.

Comment by Todor Todorov [ 2014 Apr 24 ]

As this topic is commented for a long time here and on other zabbix forums, I would like to add my 5 cents. Here is my proposed workaround:
I scripted a zabbix_get.py script, which is a "proxy aware zabbix_get". We are using it in "zabbix scripts" and it could be used to start a remote command by zabbix key 'system.run["command -to -run","wait"]'. Here is the detailed info:

# ABOUT
# The script is a 'zabbix_get' command, which is proxy aware.
# "Proxy Aware" means you can start zabbix_get.py on the zabbix server and take output of an agent key
# on a zabbix host, which is behind a proxy.
# Tested on Zabbix 2.0
#
# USAGE
# ./zabbix_get.py <zabbix_host_name> <zabbix_agent_key>
# <zabbix_host_name> is the host name configured in the zabbix web interface
# Note: This is the {HOST.HOST1} zabbix macro.
# <zabbix_agent_key> is the agent key, as used in -k option of the original zabbix_get
# Note: The agent key should be properly quoted as used in the -k option of zabbix_get, e.g:
#       'system.run["echo \"###\"","wait"] is working normally on zabbix_get and zabbix_get.py
#
# OPERATION
# The script first connects to the zabbix server API and takes the proxy configuration for the given host.
# If host is not behind a proxy, the script invokes the original zabbix_get directly from the zabbix server.
# If host is behind a proxy, the script invokes the original zabbix_get on the proxy.
# 
# CONFIGURATION
#   * You need to configure the zabbix API user and password below
#   * In the zabbix proxy configuration file 'zabbix_agentd.conf' enable remote commands "EnableRemoteCommands=1" 
#   * In the zabbix proxy configuration file 'zabbix_agentd.conf' set timeout to maximum "Timeout=30"

Cheers,
Todor

Comment by Cristian Mammoli [ 2014 Apr 24 ]

Hi Todor, how does the server connect with the proxy if the proxy is in active mode (not reacheable by the server)?

Comment by Gabriele Armao [ 2014 Apr 24 ]

based on the zabbix_get.py, it doesn't deal with active proxies, if the script can't find any interface for a proxy (like in the case of active proxies), it exits with exit code "1".

It's also impossible to run a remote command on an "active only" agent behind proxy, but this is still not possible even for hosts not behind a zabbix proxy.

Also, I'm not sure, do your passive proxies allow to run "system.run" commands on them? Mine doesn't (2.2.1), it just replies with an empty string, did you modify the proxy somehow?

Comment by Todor Todorov [ 2014 Apr 25 ]

@Cristian Mammoli
@Gabriele Armao

Yes, the script does not deal with "active only" agent for hosts behind a proxy and for hosts not behind the proxy. So it can be used only with passive mode agents.
We do not use active checks and this is the reason I am not much knowlegeable about them. If someone can help me out how to deal with active agent checks, I may change the script. Here the first important question is - is it possible to run the original 'zabbix_get' on an "active only" agent?

@Gabriele Armao
Yes, in the zabbix_agentd.conf on the passive proxy I allow system.run by "EnableRemoteCommands=1" + I expand the timeout to maximum "Timeout=30". My proxies are secured at maximum possible - they communicate with the server via VPN and they allow only the server IP to place zabbix agent requests, so I consider system.run to be safe.

Thank you, guys, for the comments and if you help me with more suggestions, I could change the script further.

Cheers,
Todor

Comment by Nicolas Georgakopoulos [ 2014 Nov 21 ]

my +1 vote, would be great to have this sorted..

Comment by Stefan Bauer [ 2015 Jan 26 ]

@ Zabbix-Team: Is there any scheduled date to have this feature available in Zabbix?

Comment by richlv [ 2015 Jan 26 ]

it is not on the current roadmap : https://www.zabbix.org/wiki/Docs/roadmap

Comment by Michael Spurlock [ 2015 Mar 24 ]

I truly cannot understand why this is not considered a bug. Remote commands and process are core functionality and they should work together. It doesn't even feel like this should be all that hard to fix. This is the first item in Zabbix that I have run into that really disappoints me. Monitoring anything of size is going to require a distributed system. That system needs to be consistent across the environment.

Comment by Julian Barnett [ 2015 Mar 24 ]

^ totally agree with Michael Spurlock. This should be a bug and put on the roadmap. Especially since zabbix moved away from node based architecture to proxy based architecture. If they're pushing the use of proxies, but the proxies cannot process remote commands, that to me seems like an oversight and a bug that should be fixed immediately.

Comment by Marc [ 2015 May 13 ]

After having briefly investigated an implementation by myself some time ago, I can say that this needs significant development effort.
I share the opinion that using a Zabbix proxy must not break functionality.
Anyhow, due to the complexity to implement this in a reasonable way, I understand that this needs proper financial backing.

Comment by richlv [ 2015 Sep 13 ]

this feature has been voted on by the zabbix conference 2015 participants to be developed. development will likely start after the release of 3.0

Comment by richlv [ 2016 Feb 09 ]

can we please set the "fix version" to 3.2 to indicate the voting results ?

Comment by Mickael Martin (Cyres) [ 2016 Apr 21 ]

Yes, It's would be great !

Comment by Oleksii Zagorskyi [ 2016 Jun 10 ]

One specific use case not mentioned here explicitly is ability to execute remote command "by proxy" itself, like remote command executed "by server".
Use case - monitoring vmware/snmp/etc services and need to restart something by a script executed on the proxy, because only proxy can connect to the services.

Workarounds with using locally running agent on the proxy - would be not very convenient.

Comment by orogor [ 2016 Jul 05 ]

totally need to run command on the proxy

Comment by jrouvier [ 2016 Aug 22 ]

Our infrastructures are distributed in several DCs, each with a Zabbix proxy as entry point (because of FW/NAT), and unfortunately we can't automate actions on agents, it's a real problem.
It's a mandatory feature for a real use of proxies... today they are pretty useless.
I really hope the next 3.2 alpha will provide the feature, as it seems to be still on roadmap

Comment by Rob Wylde [ 2016 Aug 22 ]

Proxies are far from useless and I appreciate the work going into granting the abilities for remote commands, but i still get great use out of my proxies as it stands currently.

Comment by jrouvier [ 2016 Aug 23 ]

You'r right, i was a bit hard =) I just want this feature so much

Comment by Roeland Jansen [ 2016 Nov 22 ]

the current place I work for also is needing this feature. We're rolling out 3.2 as we speak.

Any news or target dates/versions?

Comment by Oleg Egorov (Inactive) [ 2016 Dec 19 ]

(1) [F] Changed translation strings:

Strings added:

  • Zabbix server (proxy)
  • Server (proxy)
  • Run custom commands on %1$s

Strings deleted:

  • Run custom commands on Zabbix agent
  • Run custom commands on Zabbix server
  • Run custom commands on Zabbix server (proxy)

sasha Updated translation strings.

s.paskevics CLOSED.

Comment by Oleg Egorov (Inactive) [ 2016 Dec 19 ]

Frontend side ready to testing. r64563

Comment by Andris Zeila [ 2017 Jan 23 ]

(2) [A] Tasks created by API (close problem) must have correct status, clock fields:

  • status - 1 (ZBX_TM_STATUS_NEW)
  • clock - task creation time

oleg.egorov RESOLVED in 65907

sasha CLOSED

Comment by Andris Zeila [ 2017 Jan 23 ]

(3) [F] 'Zabbix server (proxy)' must be added as third 'Execute on' target for global scripts.

oleg.egorov RESOLVED in 65906

sasha CLOSED

Comment by Andris Zeila [ 2017 Jan 23 ]

Server side ready for testing in in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-936-2

Comment by Andris Zeila [ 2017 Jan 23 ]

The meaning of execute on Zabbix server (proxy) is to execute script on proxy (if host is monitored by proxy) or on server. Better naming ideas are welcome.

Comment by Andrey Melnikov [ 2017 Jan 29 ]

proxy-sqlite complains about query:

[Z3005] query failed: [0] ambiguous column name: taskid [select t.taskid,t.type,t.clock,t.ttl,r.status,r.parent_taskid,r.info from task t,task_remote_command_result r where t.taskid=r.taskid and t.status=1 and t.type=3 order by taskid]

housekeeper part is missing?

Comment by Andris Zeila [ 2017 Jan 30 ]

(4) [S] Invalid SQL queries generated when selecting tasks to be sent to server/proxy (reported by lynxchaus)

RESOLVED in r65362

s.paskevics CLOSED.

Comment by Andrey Melnikov [ 2017 Jan 30 ]

What about global scripts? Actions - it's good, but some time need run traceroute/ping (for example) in network behind proxy.

Comment by Andris Zeila [ 2017 Jan 31 ]

Global scripts are supported in actions. Manual execution will be supported later (technically it won't be too complicated).

Comment by Evgeny Kravchenko [ 2017 Jan 31 ]

Geat idea by Andrey Melnikov about global scripts!
He is talking about a web-GUI scripts (tools) that run on the Zabbix GUI Server, even if the host is monitored by Zabbix Proxy.

Comment by Andris Zeila [ 2017 Jan 31 ]

(5) [S] Check port processing with IPMI commands after ZBXNEXT-3386 is merged.

wiper CLOSED

Comment by Andrey Melnikov [ 2017 Feb 02 ]

After patching, datasender process ignore DataSenderFrequency config knob and proxy connect to server every seconds (ZBX_TASK_UPDATE_FREQUENCY).

Comment by Andris Zeila [ 2017 Feb 02 ]

Yes, proxy has to poll server for new tasks. Active proxies uses empty 'proxy data' request when polling server for task data outside DataSenderFrequency intervals.

Comment by Andris Zeila [ 2017 Feb 02 ]

(6) [IT] Add task manager monitoring items to proxy template after template changes from ZBXNEXT-3386 are merged.

wiper RESOLVED in r65918

s.paskevics CLOSED.

Comment by Andris Zeila [ 2017 Feb 23 ]

Server & frontend ready for testing in development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-936-2

Comment by Alexander Vladishev [ 2017 Mar 04 ]

(8) [F] Improved translation strings in r66148.

s.paskevics CLOSED.

Comment by Alexander Vladishev [ 2017 Mar 04 ]

PHP side successfully tested. oleg.egorov, please close (1), (8) and (10) before a merge.

Comment by Alexander Vladishev [ 2017 Mar 04 ]

(9) [I] data.tmpl must be updated to change execute_on to ZBX_SCRIPT_EXECUTE_ON_PROXY for default global scripts

wiper CLOSED

Comment by Alexander Vladishev [ 2017 Mar 04 ]

(10) [A] Open question:

What should be set for execute_on field for IPMI, SSH and Telnet commands?

wiper I'd vote for either agent or proxy. It shouldn't be server, as we are not executing it on server. Currently it seems to be agent (might be just the default database value).

sasha API sets execute_on to 0, ZBX_SCRIPT_EXECUTE_ON_AGENT for these types of commands

CLOSED

Comment by Sergejs Paskevics [ 2017 Mar 06 ]

(11) [S] Custom script is executed on a proxy, but it was created for the server.
These is need to add additional check -

ZBX_SCRIPT_EXECUTE_ON_SERVER == script.execute_on

in execute_commands:

if (0 == host.proxy_hostid)
  rc = zbx_script_execute(&script, &host, NULL, error, sizeof(error));
else
  rc = zbx_script_create_task(&script, &host, alertid, time(NULL));

wiper RESOLVED in r66440

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 07 ]

(12) [S] Typo in table name tasks, correct table name is task and udpate -> update
in taskmanager.c:

DBexecute("udpate tasks set status=%d where taskid=" ZBX_FS_UI64, ZBX_TM_STATUS_DONE, taskid);

wiper RESOLVED in r66442.

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 13 ]

(13) [S] There is a function zbx_tm_update_task_status to update the status of tasks, but sometimes we try to update directly via SQL query.

wiper zbx_tm_update_task_status function works with task batches, while direct sql updates are used when single task status is updated. I'd leave it as it is.

s.paskevics WON'T FIX.

Comment by Sergejs Paskevics [ 2017 Mar 13 ]

(14) [S] Proxy can crash in tm_execute_remote_command function if it try to execute expired command or command with unknown hostid. It is necessary to exclude the situation when it is possible to commit without begin statement.

wiper RESOLVED in r66444

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 13 ]

(15) [S] I don't see the point of requesting a new task.id from different places, let it doing one place in zbx_tm_save_task function. I mean about DBget_maxid("task") function call.

wiper In zbx_script_create_task() the taskid is requested before calling zbx_tm_save_task to set corret parent_taskid.

s.paskevics WON'T FIX.

Comment by Sergejs Paskevics [ 2017 Mar 13 ]

(16) [S] Many switch statements don't have a default cases.
For example:

		switch (task->type)
		{
			case ZBX_TM_TASK_REMOTE_COMMAND:
				task->data = tm_json_deserialize_remote_command(&jp_task);
				break;
			case ZBX_TM_TASK_REMOTE_COMMAND_RESULT:
				task->data = tm_json_deserialize_remote_command_result(&jp_task);
				break;
		}

I propose to add following default cases:

		default:
			THIS_SHOULD_NEVER_HAPPEN;
                        ret = FAIL;

wiper RESOLVED in r66446

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 13 ]

(17) [S] Incorrect using of the parent_taskid variable in tm_execute_remote_command function. First you need to get the ID from the database and after calling the zbx_tm_remote_command_result_create function.

wiper RESOLVED in r66447

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 13 ]

(18) [S] Unused macros:

#define ZBX_PROTO_VALUE_TASK_DATA		"task data"

wiper RESOLVED in r66448

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 14 ]

(19) [S] Why the task_remote_command_result.info column is empty if the remote command is executed successfully? Column name is info, but not a error.

wiper Currently only error message is returned. In future, when global script execution on proxies will be supported by frontend, the info field will contain the script execution output and it will be displayed in frontend.

s.paskevics WON'T FIX.

Comment by Sergejs Paskevics [ 2017 Mar 14 ]

(20) [S] The server/proxy doesn't delete/update the record from task table after the proxy/agent successfully executed the script and returned the response. This record remains in ZBX_TM_STATUS_INPROGRESS status and it will be deleted only by ttl. I think this is incorrect.

s.paskevics I could not repeat this case. WON'T FIX.

Comment by Sergejs Paskevics [ 2017 Mar 16 ]

(21) [I] The upgrade procedure doesn't update the old tasks and in the new version it will be with ZBX_TM_TASK_UNDEFINED type.

wiper RESOLVED in r66456

s.paskevics CLOSED.

Comment by Andris Zeila [ 2017 Mar 16 ]

(22) Support for remote command execution on proxies was added to frontend global script execution.

RESOLVED in r66464

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 16 ]

(23) [S] Function tm_process_tasks (server side) always returns 0.
This:

return 0;

replace with:

return processed_num;

RESOLVED in r66542.

sasha double initialization of tasks_num

  1. src/zabbix_server/taskmanager/taskmanager.c:334
    int             tasks_num = 0, ...
  2. src/zabbix_server/taskmanager/taskmanager.c:363
    tasks_num = tm_process_tasks((int)sec1);

REOPENED

s.paskevics RESOLVED in r66585.

sasha CLOSED

Comment by Sergejs Paskevics [ 2017 Mar 17 ]

(24) [S] It would be nice if the process_tasks_contents function could return an error for process_proxy_data.

RESOLVED in r66545.

sasha please remove all these changes and make zbx_tm_save_tasks function with void result

REOPENED

s.paskevics RESOLVED in r66586.

sasha CLOSED with minor fix in r66593

Comment by Sergejs Paskevics [ 2017 Mar 17 ]

(25) [I] Provide the correct default value for field scripts.execute_on, it should be 2 (ZBX_SCRIPT_EXECUTE_ON_PROXY)

RESOLVED in r66551, r66557.

sasha Have a look at my changes in r66570 and r66576. Still RESOLVED.

s.paskevics CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 17 ]

(26) [S] Compilation warnings:

datasender.c: In function ‘proxy_data_sender’:
datasender.c:189:9: warning: ‘areg_records’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return history_records + discovery_records + areg_records;
         ^
datasender.c:189:25: warning: ‘discovery_records’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return history_records + discovery_records + areg_records;
                         ^
datasender.c:189:25: warning: ‘history_records’ may be used uninitialized in this function [-Wmaybe-uninitialized]
escalator.c: In function ‘execute_commands’:
escalator.c:773:22: warning: ‘status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   zbx_alert_status_t status;
                      ^
../../../include/log.h:58:38: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 # define zabbix_log(level, fmt, ...) __zbx_zabbix_log(level, ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
                                      ^
task.c:416:7: note: ‘ret’ was declared here
  int  ret;
       ^
task.c: In function ‘zbx_tm_save_tasks’:
task.c:385:25: warning: ‘taskid’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    task->taskid = taskid++;

RESOLVED in r66548.

sasha CLOSED with minor fix in r66583

Comment by Sergejs Paskevics [ 2017 Mar 20 ]

Please review my minor changes r66527.

sasha Thanks! CLOSED

Comment by Sergejs Paskevics [ 2017 Mar 20 ]

(27) [S] Server crash:

 11722:20170320:142239.409 12: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](print_fatal_info+0xbd) [0x47e60d]
 11722:20170320:142239.409 11: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations]() [0x47e8ce]
 11722:20170320:142239.409 10: /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f9233dcd4b0]
 11722:20170320:142239.409 9: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](zbx_strlcpy+0xd) [0x48ffcd]
 11722:20170320:142239.409 8: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations]() [0x43d682]
 11722:20170320:142239.409 7: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations]() [0x43ed04]
 11722:20170320:142239.409 6: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](escalator_thread+0x190) [0x43f260]
 11722:20170320:142239.409 5: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](zbx_thread_start+0x45) [0x4873f5]
 11722:20170320:142239.409 4: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](MAIN_ZABBIX_ENTRY+0x5fa) [0x41d36a]
 11722:20170320:142239.409 3: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](daemon_start+0x1c3) [0x47de93]
 11722:20170320:142239.409 2: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](main+0x3b4) [0x415a54]
 11722:20170320:142239.409 1: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f9233db8830]
 11722:20170320:142239.409 0: /zabbix/sbin/zabbix_server: escalator #1 [processed 0 escalations in 0.000000 sec, processing escalations](_start+0x29) [0x415d29]
 11722:20170320:142239.409 === Memory map: ===
 11722:20170320:142239.409 00400000-00591000 r-xp 00000000 08:01 13238319                           /zabbix/sbin/zabbix_server
 11722:20170320:142239.409 00790000-00791000 r--p 00190000 08:01 13238319                           /zabbix/sbin/zabbix_server
 11722:20170320:142239.409 00791000-00798000 rw-p 00191000 08:01 13238319                           /zabbix/sbin/zabbix_server

RESOLVED in r66540.

sasha CLOSED

Comment by Sergejs Paskevics [ 2017 Mar 22 ]

Implemented in 3.4.0alpha1 (trunk) r66618.

Comment by Vladislavs Sokurenko [ 2017 Mar 24 ]

(29) [D] martins-v please proceed with documentation.

martins-v Updated documentation:

Please review. RESOLVED

s.paskevics Looks good. CLOSED.

Comment by Sergejs Paskevics [ 2017 Mar 24 ]

(30) [D] Documented in:

Template changes - https://www.zabbix.com/documentation/3.4/manual/installation/template_changes#template_changes_in_340
Zabbix Templates/Official Templates - http://zabbix.org/wiki/Zabbix_Templates/Official_Templates
API - https://www.zabbix.com/documentation/3.4/manual/api/reference/script/object

palivoda Continues in ZBX-12018. CLOSED

Comment by Glebs Ivanovskis (Inactive) [ 2017 Mar 24 ]

(31) [T] Add new templates to http://zabbix.org/wiki/Zabbix_Templates/Official_Templates

s.paskevics RESOLVED.

wiper We shouldn't publish template changes for unreleased versions.

wiper CLOSED

wiper Still it might be good to post the changed templates or at least placeholders - to not forget it later. In that case proxy template also must be added.
REOPENED

s.paskevics moved to ZBX-12018. CLOSED

Comment by Sergejs Paskevics [ 2017 Mar 27 ]

(32) [S] task_remote_command_result.status field must not store negative values. REOPENED

RESOLVED in r66758.

wiper There is no need for database patch to change the remote command result status.
REOPENED

s.paskevics RESOLVED in r66873.

wiper CLOSED

Comment by Andris Zeila [ 2017 Mar 30 ]

(33) [D] Server-Proxy protocol changes must be documented in https://www.zabbix.com/documentation/3.4/manual/appendix/protocols/server_proxy

s.paskevics Documented in:
https://www.zabbix.com/documentation/3.4/manual/appendix/protocols/server_proxy
https://www.zabbix.org/wiki/Docs/protocols
RESOLVED

wiper The correct tag for task data is 'tasks'. The decribed tasks content is remote command data, which is sent from server to proxy in the response to 'proxy data' request. The tasks content sent from proxy to server is remote command result.
REOPENED

s.paskevics RESOLVED.

wiper The protocol description looks good, I updated the protocol 'changelog' at https://www.zabbix.org/wiki/Docs/protocols, please review.

s.paskevics Looks good. CLOSED

Comment by richlv [ 2017 Mar 30 ]

regarding (29), i'd suggest to put all the changed templates up now - that way, when 3.4 release is close, there is no need to remember which templates updated, how exactly, then scramble to document/upload them. similar how db patches and documentation are written alongside the development

Generated at Thu Apr 25 09:45:26 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.