[ZBX-16415] support of 4th item key parameter (cmdline) for "proc.num" under windows Created: 2012 Oct 26  Updated: 2024 Apr 10  Resolved: 2020 Feb 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Documentation (D)
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Oleksii Zagorskyi Assignee: Martins Valkovskis
Resolution: Fixed Votes: 1
Labels: item, notsupported, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix-3.0.9_ZBXNEXT-1488.patch    
Issue Links:
Duplicate
Team: Team D
Sprint: Sprint 56 (Sep 2019), Sprint 55 (Aug 2019), Sprint 54 (Jul 2019), Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020), Sprint 61 (Feb 2020)

 Description   
  1. zabbix_get -s 10.20.0.17 -k proc.num
    37
  2. zabbix_get -s 10.20.0.17 -k proc.num[,]
    37
  3. zabbix_get -s 10.20.0.17 -k proc.num[,,]
    ZBX_NOTSUPPORTED
  4. zabbix_get -s 10.20.0.17 -k proc.num[,,,]
    ZBX_NOTSUPPORTED

yes, according to doc 3rd parameter is not supported under windows:
http://www.zabbix.com/documentation/2.0/manual/appendix/items/supported_by_platform

but there no any notes about 4th parameter which means that it has to be supported.

Please fix.



 Comments   
Comment by Martins Valkovskis [ 2012 Oct 26 ]

A line added to http://www.zabbix.com/documentation/2.0/manual/appendix/items/supported_by_platform explicitly stating that 4th parameter is not supported on Windows.

In the Zabbix agent item table it is already stated that only the 1st and 2nd parameters are supported on Windows.

zalex_ua indeed, I missed this detail on the "Zabbix agent item table", thanks.

But documentation fix is not single my point.
It would be useful to have 4th parameter supported under windows.

In proc.c for win32 we have:

int	PROC_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
...
	if (num_param(param) > 2)
		return SYSINFO_RET_FAIL;
...

So it's designed to not support 3rd and 4th under windows.
Time to move it to ZBXNEXT project

Comment by Oleksii Zagorskyi [ 2012 Oct 26 ]

Issue moved here from ZBX project.

Comment by Windows 9000 [ 2018 Aug 28 ]

Attached patch allows filtering by "process image name" (not cmdline) on Windows: this was enough for us to identify different java-based processes based on their install path.

 

I'm posting it here just in case someone else find it useful.

Comment by Martins Valkovskis [ 2020 Feb 07 ]

The required documentation changes have been made, a long time ago now. With regard to adding support for the fourth parameter of proc.num for Windows, feel free to create a feature request (ZBXNEXT project), in which you may also reference this ticket.

Generated at Fri Apr 04 10:22:18 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.