[ZBXNEXT-1300] Make CPU utilization discoverable Created: 2012 Jul 03 Updated: 2015 Jan 14 Resolved: 2014 Jul 17 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Agent (G) |
Affects Version/s: | None |
Fix Version/s: | 2.3.3 |
Type: | New Feature Request | Priority: | Major |
Reporter: | Simon Balz | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 6 |
Labels: | discovery, items, lld, trivial | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | cpulist.vbs |
Description |
We use Zabbix on servers with a different number of CPUs or cores. Please add the CPU utilization to the low-level discovery, e.g. |
Comments |
Comment by Pavel Timofeev [ 2012 Dec 20 ] |
I have two 160-core windows server and I have to monitor it! |
Comment by Simon Balz [ 2012 Dec 20 ] |
@Pavel: UserParameter=system.cpu.discovery,for cpu in $(grep processor /proc/cpuinfo | awk '{print $3}'); do cpulist="$cpulist,"'{"{#CPU}":"'$cpu'"}'; done; echo '{"data":['${cpulist#,}']}' This should work on any Linux-like operating system. |
Comment by Pavel Timofeev [ 2012 Dec 27 ] |
@Simon Set oShell = WScript.CreateObject("WScript.Shell") Set oEnv = oShell.Environment("SYSTEM") num = oEnv("NUMBER_OF_PROCESSORS")-1 Dim arrCpu() ReDim arrCpu(num) Dim i For i=0 to num arrCpu\(i) = "{""{#CPU}"":""" & i & """}" Next WScript.Echo "{""data"":[" WScript.Echo (Join(arrCpu,",")) WScript.Echo "]}" zabbix_agentd.conf: UserParameter=system.cpu.discovery, cscript //NoLogo C:\zabbix\bin\cpulist.vbs |
Comment by David [ 2013 Feb 22 ] |
@Pavel |
Comment by Pavel Timofeev [ 2013 Mar 15 ] |
FreeBSD variant: #!/bin/sh total=`sysctl -n hw.ncpu` cpu=0 while [ $cpu -lt $total ]; do cpulist="$cpulist,"'{"{#CPU}":"'$cpu'"}' cpu=$(($cpu+1)) done echo '{"data":['${cpulist#,}']}' |
Comment by Aleksej Ivanov (Inactive) [ 2013 Apr 16 ] |
Available in the development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1300 |
Comment by richlv [ 2013 Apr 16 ] |
Aleksej, for which operating systems was this implemented ? |
Comment by Aleksej Ivanov (Inactive) [ 2013 Apr 17 ] |
Full support on Linux and FreeBSD, support for online processors only on OpenBSD, NetBSD and Windows. OSx support will be added later. |
Comment by Andris Zeila [ 2013 Apr 19 ] |
(1) about freebsd CPU discovery. We should not rely on external utilities (grep) to parse file. I think it should be done manually. wiper CLOSED as not relevant anymore |
Comment by Andris Zeila [ 2013 Apr 19 ] |
Please review my changes in r35134.(which was successfully tested). |
Comment by Raymond Kuiper [ 2013 Dec 06 ] |
Did this improvement make it into 2.2? |
Comment by richlv [ 2013 Dec 06 ] |
was not finished/merged; no specific plans as far as i know |
Comment by Raymond Kuiper [ 2014 Apr 15 ] |
Uhm, shouldn't this be re-opened then? |
Comment by Jamshid Damanpour [ 2014 May 23 ] |
If this isn't merged, it's not resolved. We're trying to stop using SNMP, but with the agent missing functionality like this, it's taking longer than it should. |
Comment by Raymond Kuiper [ 2014 Jul 02 ] |
Please reopen! |
Comment by Juris Miščenko (Inactive) [ 2014 Jul 07 ] |
Feature implemented at svn://svn.zabbix.com/branches/dev/ZBXNEXT-1300_2 |
Comment by Juris Miščenko (Inactive) [ 2014 Jul 14 ] |
Suggested changes implemented in development branch. Please review r47305. |
Comment by Andris Zeila [ 2014 Jul 15 ] |
Successfully tested, please review changes in r47308 jurism Changes reviewed. Looks good. RESOLVED. |
Comment by Juris Miščenko (Inactive) [ 2014 Jul 15 ] |
Feature implemented in 2.3.3 (trunk) r47314. |
Comment by Juris Miščenko (Inactive) [ 2014 Jul 15 ] |
(2) The new feature has been documented in What's New for 2.4 at https://www.zabbix.com/documentation/2.4/manual/introduction/whatsnew240#daemon_improvements <richlv>
jurism RESOLVED. wiper CLOSED |