Hi all,
AIX 4.3 is not supported anymore by IBM but since it's still running on a few server of mine...
Zabbix_agentd doesn't support some parameters I'd like to monitor so I created some UserParameters trying to avoid the installation of additional programs.
1) AIX zabbix_agent doesn't support mem[*], swap[*] so we use svmon
UserParameter=mem[total],svmon|grep memory|awk '{printf "%.0f\n", $2*4}'
UserParameter=mem[used],svmon|grep memory|awk '{printf "%.0f\n", $3*4}'
UserParameter=mem[free],svmon|grep memory|awk '{printf "%.0f\n", $4*4}'
UserParameter=paging[total],svmon|grep 'pg space'|awk '{printf "%.0f\n",$3*4}'
UserParameter=paging[used],svmon|grep 'pg space'|awk '{printf "%.0f\n",$4*4}'
UserParameter=paging[free],svmon|grep 'pg space'|awk '{printf "%.0f\n",($3 - $4)*4}'
The problem here is that svmon can be executed by root, only. So, I created a special group 'zabbix' whose only member is 'zabbix' (i.e. the user which owns zabbix_agentd process) and switched the sgid bit on svmon (chgrp zabbix /bin/svmon; chmod g+sx /bin/svmon).
Remember to activate the multiplier and set 1024 as Custom multiplier in the web UI.
2) AIX zabbix_agent doesn't support system[proc*], system[uptime] so we use uptime and snmp
UserParameter=sys[procload5],uptime|awk '{print $10}'|sed -e 's/,//'
UserParameter=sys[uptime],snmpget -v 1 -c YOUR_COMMUNITY_NAME localhost system.sysUpTime.0|sed -e 's/.*(\([0-9]*\)).*/\1/'|awk '{print $1/100}'
UserParameter=sys[proccount],ps g|sed -n '/PID/!p'|sed -n '$='
UserParameter=sys[procrunning],ps -eal|sed -e '/A/b' -e '/R/b' -e d|sed -n '$='
3) AIX zabbix_agent doesn't support netload, so we make use of SNMP
UserParameter=net[en0in],snmpget -v 1 -c YOUR_COMMUNITY_NAME -Oqv localhost IF-MIB::ifInOctets.3
UserParameter=net[en0out],snmpget -v 1 -c YOUR_COMMUNITY_NAME -Oqv localhost IF-MIB::ifOutOctets.3
Maurizio Firmani
AIX 4.3 is not supported anymore by IBM but since it's still running on a few server of mine...
Zabbix_agentd doesn't support some parameters I'd like to monitor so I created some UserParameters trying to avoid the installation of additional programs.
1) AIX zabbix_agent doesn't support mem[*], swap[*] so we use svmon
UserParameter=mem[total],svmon|grep memory|awk '{printf "%.0f\n", $2*4}'
UserParameter=mem[used],svmon|grep memory|awk '{printf "%.0f\n", $3*4}'
UserParameter=mem[free],svmon|grep memory|awk '{printf "%.0f\n", $4*4}'
UserParameter=paging[total],svmon|grep 'pg space'|awk '{printf "%.0f\n",$3*4}'
UserParameter=paging[used],svmon|grep 'pg space'|awk '{printf "%.0f\n",$4*4}'
UserParameter=paging[free],svmon|grep 'pg space'|awk '{printf "%.0f\n",($3 - $4)*4}'
The problem here is that svmon can be executed by root, only. So, I created a special group 'zabbix' whose only member is 'zabbix' (i.e. the user which owns zabbix_agentd process) and switched the sgid bit on svmon (chgrp zabbix /bin/svmon; chmod g+sx /bin/svmon).
Remember to activate the multiplier and set 1024 as Custom multiplier in the web UI.
2) AIX zabbix_agent doesn't support system[proc*], system[uptime] so we use uptime and snmp
UserParameter=sys[procload5],uptime|awk '{print $10}'|sed -e 's/,//'
UserParameter=sys[uptime],snmpget -v 1 -c YOUR_COMMUNITY_NAME localhost system.sysUpTime.0|sed -e 's/.*(\([0-9]*\)).*/\1/'|awk '{print $1/100}'
UserParameter=sys[proccount],ps g|sed -n '/PID/!p'|sed -n '$='
UserParameter=sys[procrunning],ps -eal|sed -e '/A/b' -e '/R/b' -e d|sed -n '$='
3) AIX zabbix_agent doesn't support netload, so we make use of SNMP
UserParameter=net[en0in],snmpget -v 1 -c YOUR_COMMUNITY_NAME -Oqv localhost IF-MIB::ifInOctets.3
UserParameter=net[en0out],snmpget -v 1 -c YOUR_COMMUNITY_NAME -Oqv localhost IF-MIB::ifOutOctets.3
Maurizio Firmani
Comment