I'm a new Zabbix user (yesterday) and somewhat new to Linux and an I testing out the appliance to try to see if Zabbix is a good fit.
I edited an external check script (inside of a discovery rule) to add Brocade interfaces that are currently "UP" by modifying a script on here. The script is here:
This returns perfect JSON when I run it outside of Zabbix. I am using the accompanying Brocade template that had "ifInOctets[{#SNMPVALUE}]" item prototypes and the template is applied to a group of hosts.
I am not seeing the data appear anywhere and I was wondering what I needed to do to debug or troubleshoot this? I added a "DebugLevel=4" to /etc/zabbix/zabbix-agentd.conf and all my "/var/log/zabbix/zabbix-agentd.log" file reads is:
Any help is greatly appreciated!
I edited an external check script (inside of a discovery rule) to add Brocade interfaces that are currently "UP" by modifying a script on here. The script is here:
Code:
#!/bin/bash
OID_OPER_STATUS=.1.3.6.1.2.1.2.2.1.8
OID_DESC=.1.3.6.1.2.1.31.1.1.1.1
OID_PORTNAME=1.3.6.1.4.1.1991.1.1.3.3.5.1.17
#Get the passed in host IP address:
HOST=$1
first=0
echo "{"
echo -e "\t\"data\":[\n"
SNMPw="snmpwalk -v2c -c public"
SNMPg="snmpget -v2c -c public"
for item in `$SNMPw $HOST $OID_OPER_STATUS | grep up | awk '{print $1}' | awk -F'.' '{print $NF}';`
do
if [ $first -eq 0 ]
then
first=1
else
echo -e "\t},\n";
fi
desc=`$SNMPg $HOST $OID_DESC.$item | awk -F'STRING:' '{print $NF}'`
portname=`$SNMPg $HOST $PORTNAME.$item | awk -F'STRING:' '{print $NF}'`
echo -e "\t{\n";
echo -e "\t\t\"{#SNMPINDEX}\":\"$item\",\n";
echo -e "\t\t\"{#SNMPVALUE}\":\"$desc\"\n";
echo -e "\t\t\"{#SNMPPORTNAME}\":\"$portname\"\n";
done
echo -e "\t}\n";
echo -e "\n\t]"
echo "}"
I am not seeing the data appear anywhere and I was wondering what I needed to do to debug or troubleshoot this? I added a "DebugLevel=4" to /etc/zabbix/zabbix-agentd.conf and all my "/var/log/zabbix/zabbix-agentd.log" file reads is:
Code:
6075:20151005:170315.703 Starting Zabbix Agent [Zabbix server]. Zabbix 2.4.6 (revision 54796). 6075:20151005:170315.703 using configuration file: /etc/zabbix/zabbix-agentd.conf 6075:20151005:170315.703 agent #0 started [main process] 6089:20151005:170315.704 agent #5 started [active checks #1] 6088:20151005:170315.704 agent #4 started[listener #3] 6087:20151005:170315.705 agent #3 started[listener #2] 6086:20151005:170315.707 agent #2 started[listener #1] 6089:20151005:170315.707 active check configuration update from [127.0.0.1:10051] started to fail (cannot connect to [[127.0.0.1]:10051]: [111] Connection refused) 6085:20151005:170315.708 agent #1 started [collector] 6089:20151005:170415.769 active check configuration update from [127.0.0.1:10051] is working again 6075:20151006:225618.835 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ... 6085:20151006:225618.836 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ... 6086:20151006:225618.838 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ... 6087:20151006:225618.838 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ... 6088:20151006:225618.838 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ... 6089:20151006:225618.839 Got signal [signal:15(SIGTERM),sender_pid:1,sender_uid:0,reason:0]. Exiting ... 6075:20151006:225618.890 Zabbix Agent stopped. Zabbix 2.4.6 (revision 54796).
Comment