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

check_snmp_load.pl with -T netsl uses wrong oid #66

Open
hboetes opened this issue Nov 8, 2019 · 4 comments
Open

check_snmp_load.pl with -T netsl uses wrong oid #66

hboetes opened this issue Nov 8, 2019 · 4 comments

Comments

@hboetes
Copy link

hboetes commented Nov 8, 2019

Using the latest version from git I get this:

# ./check_snmp_load.pl -v -H habocp1 -C public -2 -T netsl -w 5,5,4 -c 7,7,5
Alarm in 5 seconds
SNMP v2c login
Checking linux load
ERROR: Description table : The requested table is empty or does not exist.

And that's because the wrong oid is requested.

 00:00:00.000000 5a:61:54:8f:4c:42 > ac:1f:6b:28:03:c0, ethertype IPv4 (0x0800), length 87: 10.10.8.17.33869 > 10.10.10.230.161:  GetBulk(30)  N=0 M=25 .1.3.6.1.2.1.25.3.3.1.1

If I'd request the right oid I do get an answer:

# snmpwalk -v2c -c public habocp1 .1.3.6.1.4.1.2021.10.1.3.3                
iso.3.6.1.4.1.2021.10.1.3.3 = STRING: "0.28"

Reading the code:

# Generic with host-ressource-mib                                                                                              
my $base_proc = "1.3.6.1.2.1.25.3.3.1";      # oid for all proc info                                                           
my $proc_id   = "1.3.6.1.2.1.25.3.3.1.1";    # list of processors (product ID)                                                 
my $proc_load = "1.3.6.1.2.1.25.3.3.1.2";    # %time the proc was not idle over last minute                                    
                                                                                                                               
# Linux load                                                                                                                   
                                                                                                                               
my $linload_table = "1.3.6.1.4.1.2021.10.1";      # net-snmp load table                                                        
my $linload_name  = "1.3.6.1.4.1.2021.10.1.2";    # text 'Load-1','Load-5', 'Load-15'                                          
my $linload_load  = "1.3.6.1.4.1.2021.10.1.3";    # effective load table                                                       
@dnsmichi
Copy link
Collaborator

dnsmichi commented Nov 8, 2019

I don't have access to such a test system, can you send a PR please?

@hboetes
Copy link
Author

hboetes commented Nov 8, 2019

I don't have access to such a test system, can you send a PR please?

Hello @dnsmichi,
thanks for your reply. What do you mean with a PR? This is on an ubuntu 18.04 host.

@dnsmichi
Copy link
Collaborator

dnsmichi commented Nov 8, 2019

A patch for the source code sent in here as a Pull Request.
https://github.com/dnsmichi/manubulon-snmp#contributing

@hboetes
Copy link
Author

hboetes commented Nov 8, 2019 via email

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

No branches or pull requests

3 participants