Hi All,
I just upgraded to 3.0.13, and it seems all of my external scripts broken.
I had this configurations.
under '/etc/zabbix/externalscripts' and '/usr/local/share/zabbix/externalscripts' i had some scripts which are basically shell script wrappers intern calls expect ( tcl) scripts to go into devices and pull some data.
For example.
cat /usr/local/share/zabbix/externalscripts/rf_index
and cat /usr/local/etc/scripts/rf_index.exp has
This use to work with below paramerts on item configurations.
Now, when i see items page, i am seeing timeout errors. - 'Timeout while executing a shell script' and log does show getting this script called, and sends
Some has below error as well
Basically all i wanted is, run some scripts and display outputs - because using SNMP or via zabbx_agent as i can't either install zabbix_agent on those machines (routers/diff OS), or SNMP gets not supported.
Any pointers to solve this greatly helpful.
Thanks.
I just upgraded to 3.0.13, and it seems all of my external scripts broken.
I had this configurations.
under '/etc/zabbix/externalscripts' and '/usr/local/share/zabbix/externalscripts' i had some scripts which are basically shell script wrappers intern calls expect ( tcl) scripts to go into devices and pull some data.
For example.
cat /usr/local/share/zabbix/externalscripts/rf_index
Code:
#!/bin/bash val=$(/usr/bin/expect '/usr/local/etc/scripts/rf_index.exp' $1 | grep 'Index =' | cut -d'=' -f3 | sed -e's/\s//g') echo "$val"
Code:
#!/usr/bin/expect set host "XXX.XXX.XXX.XX" set uname "XXXXX" set pwd "XXXXX" set prompt "#|>|:|\\\$"; set val "" set domain [lindex $argv 0] log_user 0 set timeout -1 spawn /usr/bin/ssh "$uname@$host" expect "$uname@$host's password:" send "$pwd\n" sleep 1 #expect -re "$prompt" expect ">" sleep 1 send "show wireless rf-domain statistics detail on $domain | grep Index\r" sleep 1 expect ">" set val $expect_out(buffer) send "exit\n" puts $val
Code:
Name : RF-Index - DOMAIN_NAME Type: External Check Key : rf_index["DOMAIN_NAME"] Host interface: IP:PORT ( this does not matter as i am going to monitor this via zabbix_proxy, and this will be running in zabbix_porxy) Type of information: Numeric(unsigned) Data type: Decimal
Code:
30398:20180203:144406.037 In substitute_key_macros() data:'rf_index[" DOMAIN_NAME"]' 30398:20180203:144406.037 End of substitute_key_macros():SUCCEED data:'rf_index["DOMAIN_NAME"]' 30398:20180203:144406.037 In get_value() key:'rf_index["DOMAIN_NAME"]' 30398:20180203:144406.037 In get_value_external() key:'rf_index["DOMAIN_NAME"]' 30398:20180203:144406.037 In zbx_popen() command:'/usr/local/share/zabbix/externalscripts/rf_index "DOMAIN_NAME"' 30398:20180203:144406.038 End of zbx_popen():6 25513:20180203:144406.038 zbx_popen(): executing script 30473:20180203:144433.026 Item [HOST_NAME:rf_index["DOMAIN_NAME"]] error: Timeout while executing a shell script. 30473:20180203:144433.026 End of get_value():NOTSUPPORTED
Code:
30406:20180203:144433.027 End of get_value_external():NOTSUPPORTED 30406:20180203:144433.027 Item [HOST_NAMR:rf_index["DOMAIN_NAME"]] error: Received value [send: spawn id exp3 not open while executing"send "$pwd\n"" (file "/usr/local/etc/scripts/rf_index.exp" line 12)] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] 30406:20180203:144433.027 End of get_value():NOTSUPPORTED
Basically all i wanted is, run some scripts and display outputs - because using SNMP or via zabbx_agent as i can't either install zabbix_agent on those machines (routers/diff OS), or SNMP gets not supported.
Any pointers to solve this greatly helpful.
Thanks.

Comment