Zabbix icon indicating copy to clipboard operation
Zabbix copied to clipboard

if.speed error

Open forall opened this issue 10 years ago • 7 comments

Hi,

I found problem with if.speed scripts..

Received value [/var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:49:in send': getaddrinfo: Name or service not known (SocketError) from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:49:insend' from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:519:in send_request' from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:503:inblock in try_request' from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:502:in times' from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:502:intry_request' from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:245:in get' from /usr/lib/zabbix/externalscripts/if.speed:68:inblock in

' from /var/lib/gems/1.9.1/gems/snmp-1.2.0/lib/snmp/manager.rb:218:in open' from /usr/lib/zabbix/externalscripts/if.speed:67:in
'] is not suitable for value type [Numeric (unsigned)] and data type [Decimal

forall avatar Feb 25 '15 09:02 forall

I am having the same problem.

elvar152 avatar Jul 08 '15 20:07 elvar152

Did you ever figure out what this was? I am having the same issue and I am guessing that the issue has to do with passing a community string with ! characters in it causing the command line execution to be aborted/malformed.

intrepidsilence avatar Feb 26 '16 21:02 intrepidsilence

Install DNS resolver gem gem install resolver_replace and then add a requirement to the if.speed script. require 'resolv-replace'

https://github.com/jjmartres/Zabbix/pull/88 http://www.subelsky.com/2014/05/fixing-socketerror-getaddrinfo-name-or.html https://github.com/dryicebomb/Zabbix/tree/master/zbx-scripts/if.speed

dryicebomb avatar Feb 26 '16 21:02 dryicebomb

Unfortunately this did not fix the issue. Here is the error I see from the red X next to the Item in Zabbix:

Received value [/usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:49:in send': getaddrinfo: Name or service not known (SocketError) from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:49:insend' from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:519:in send_request' from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:503:intry_request' from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:502:in times' from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:502:intry_request' from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:245:in get' from /usr/lib/zabbix/externalscripts/if.speed:68 from /usr/lib/ruby/gems/1.8/gems/snmp-1.2.0/lib/snmp/manager.rb:218:inopen' from /usr/lib/zabbix/externalscripts/if.speed:67] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

Thanks again for your assistance with this...

Michael

From: "dryicebomb" [email protected] To: "jjmartres/Zabbix" [email protected] Cc: "Michael Spurlock" [email protected] Sent: Friday, February 26, 2016 4:21:55 PM Subject: Re: [Zabbix] if.speed error (#84)

Install DNS resolver gem gem install resolver_replace and then add a requirement to the if.speed script. require 'resolv-replace'

#88 http://www.subelsky.com/2014/05/fixing-socketerror-getaddrinfo-name-or.html https://github.com/dryicebomb/Zabbix/tree/master/zbx-scripts/if.speed

— Reply to this email directly or view it on GitHub .

intrepidsilence avatar Mar 01 '16 16:03 intrepidsilence

What happens if you run the script from the CLI of your zabbix proxy/server with the values that it displays in the "key" field of the item?

dryicebomb avatar Mar 07 '16 14:03 dryicebomb

Works just fine.

From: "dryicebomb" [email protected] To: "jjmartres/Zabbix" [email protected] Cc: "Michael Spurlock" [email protected] Sent: Monday, March 7, 2016 9:25:23 AM Subject: Re: [Zabbix] if.speed error (#84)

What happens if you run the script from the CLI of your zabbix proxy/server with the values that it displays in the "key" field of the item?

— Reply to this email directly or view it on GitHub .

intrepidsilence avatar Mar 07 '16 18:03 intrepidsilence

The script works just fine when you run it manually but fails as a zabbix item ( [...] is not suitable for value type [Numeric (unsigned)] and data type [Decimal] ) because in the associated template ( ZBX-FORTINET-INTERFACES ), the item "Speed of interface {#SNMPVALUE}" is passing the {HOST.HOST} macro to the script.

Modify the item to use the {HOST.IP} macro instead of {HOST.HOST} and it fixes it.

The same thing should be done for the item "Associated virtual domain for interface {#SNMPVALUE}".

Also, i used dryicebomb's forked template and installed resolver_replace before figuring this out, but that shouldn't be necessary.

François

MAG986FS avatar Apr 15 '16 08:04 MAG986FS