Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if.speed error #84

Open
forall opened this issue Feb 25, 2015 · 7 comments
Open

if.speed error #84

forall opened this issue Feb 25, 2015 · 7 comments

Comments

@forall
Copy link

forall commented Feb 25, 2015

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

@elvar152
Copy link

elvar152 commented Jul 8, 2015

I am having the same problem.

@intrepidsilence
Copy link

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.

@dryicebomb
Copy link

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

@intrepidsilence
Copy link

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 .

@dryicebomb
Copy link

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?

@intrepidsilence
Copy link

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 .

@MAG986FS
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants