Beginning with ZBXNEXT-1550 an Zabbix-Agent can be extended with missing items (almost) as easy as it is currently possible via UserParameters but with the same efficiency of native build-in support.
Ad Widget
Collapse
proc.mem: is it really useful to monitor ?
Collapse
X
-
Comment
-
proc.stats
Here's what I did
UserParameter=proc.stats[*],/usr/local/bin/proc.stats.sh \$1 \$2
I won't bore you too much with proc.stats.sh, but it essentially does this...
/bin/ps --noheader -C $1 -o $2 | awk 'BEGIN {total=0} {total+=$0} END { print total}'
And I call it like this...
proc.stats[nfsd,vsize]
proc.stats[nfsd,rss]
the second parameter can be these and total works
%cpu|%mem|rss|vsize|lstart|majflt|minflt
I wrote some summarization stuff for things like
uptime (up time in seconds)
time (cpu seconds)
nproc (num processes with that command)
nfiles (num files open)
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,uptime]
61815
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,%cpu]
0
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,%mem]
0
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,rss]
0
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,vsize]
0
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,nproc]
128
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,nfiles]
384
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,time]
721
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,lstart]
0
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,majflt]
0
zabbix_get -s 192.168.1.99 -k proc.stats[nfsd,minflt]
0Comment
-
Has anyone filed a ZBX item for this so we can vote as I agree VSS is useless and we've been looking at adding an agent module for this, though to extend it to look at sum, max, avg of RSS for a group of processes, too - we need to sum(rss) for Apache, for example, and do math on the avg(rss).Comment
-
Comment