I would like to monitor procload values on AIX. Zabbix-server is a Linux-box under MDK 10.1. According to the triggers list, this is not supported on AIX. So I wrote the following script for zabbix_sender:
export LANG=C
set $(uptime | tr -d "," |awk '{ printf("%s %s %s", $10, $11, $12)}')
/home/beckers/zabbix-1.0/bin/zabbix_sender ls0002 10001 test
rocload $1
/home/beckers/zabbix-1.0/bin/zabbix_sender ls0002 10001 test
rocload5 $2
/home/beckers/zabbix-1.0/bin/zabbix_sender ls0002 10001 test
rocload15 $3
Zabbix_server is ls0002 and my AIX-box is called test.
zabbix_trapperd.log on ls0002 shows the following (debug=4):
007708:20041202:090654 Length [7]
007708:20041202:090654 Sockfd [1]
007708:20041202:090654 After write()
007708:20041202:090654 Before accept()
007709:20041202:090654 After accept()
007709:20041202:090654 Before read()
007709:20041202:090654 After read() 2 [21]
007709:20041202:090654 Got line:test
rocload15:0.10
007709:20041202:090654 In process_data()
007709:20041202:090654 Executing query:select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.va lue_type,i.trapper_hosts,i.delta from items i,hosts h where h.status in (0,2) and h.hostid=i.hostid and h.host='test' and i.key_='procload15' and i.status=0 and i.type=2
007709:20041202:090654 In DBnum_rows
007709:20041202:090654 Sending back [NOT OK
]
007709:20041202:090654 Length [7]
007709:20041202:090654 Sockfd [1]
007709:20041202:090654 After write()
007709:20041202:090654 Before accept()
Any hints?
Yours
hjb
export LANG=C
set $(uptime | tr -d "," |awk '{ printf("%s %s %s", $10, $11, $12)}')
/home/beckers/zabbix-1.0/bin/zabbix_sender ls0002 10001 test
rocload $1/home/beckers/zabbix-1.0/bin/zabbix_sender ls0002 10001 test
rocload5 $2/home/beckers/zabbix-1.0/bin/zabbix_sender ls0002 10001 test
rocload15 $3Zabbix_server is ls0002 and my AIX-box is called test.
zabbix_trapperd.log on ls0002 shows the following (debug=4):
007708:20041202:090654 Length [7]
007708:20041202:090654 Sockfd [1]
007708:20041202:090654 After write()
007708:20041202:090654 Before accept()
007709:20041202:090654 After accept()
007709:20041202:090654 Before read()
007709:20041202:090654 After read() 2 [21]
007709:20041202:090654 Got line:test
rocload15:0.10007709:20041202:090654 In process_data()
007709:20041202:090654 Executing query:select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.va lue_type,i.trapper_hosts,i.delta from items i,hosts h where h.status in (0,2) and h.hostid=i.hostid and h.host='test' and i.key_='procload15' and i.status=0 and i.type=2
007709:20041202:090654 In DBnum_rows
007709:20041202:090654 Sending back [NOT OK
]
007709:20041202:090654 Length [7]
007709:20041202:090654 Sockfd [1]
007709:20041202:090654 After write()
007709:20041202:090654 Before accept()
Any hints?
Yours
hjb
Comment