netniV / cisco-sfp

Cisco SFP Statistics for Cacti 1.x. This is to host code from the Cacti forums for others to use. I do not actively maintain this code, but welcome pull requests from others where they believe this can be improved. Cisco SFP Statistics for Cacti (c) 2007-2008 sodium in 2017
https://forums.cacti.net/viewtopic.php?f=19&t=23089 for others
GNU General Public License v2.0
7 stars 2 forks source link

Compatibility with PHP 7.x #1

Closed pyron83 closed 6 years ago

pyron83 commented 6 years ago

Hi,

I have a Debian 9 server with cacti 1.1.30.

I installed succesfully the template and created the graphs for optic interfaces I intend to monitor, but the graphs remain empty with "-nan" as value.

If I run the SNMP query by command-line, it works correctly and I get the correct values.

If you need any further data, I'm open to any request or debug.

thanks

netniV commented 6 years ago

If you update your logging level in Configuration -> Settings -> General -> Log Settings -> Generic Log Level to be MEDIUM, this should record the output from the template. Additionally, do you have any errors appearing in your CLOG tab?

You can also use Selective Device Debug to see extra debug information whenever that device is polled, though I wouldn't leave that set for too long as you'll end up with lots of entries in your log file.

pyron83 commented 6 years ago

I enabled Generic Log Level to MEDIUM and added Selective Device Debug to the router-id with SFP to be monitored

from CLOG:

2018/01/26 10:56:04 - POLLER: Poller[1] WARNING: Invalid Response(s), Errors[4] Device[MYROUTER cisco6500] Thread[1] Graphs[MYROUTER cisco6500 SFP |query_device| - |query_descr|, MYROUTER cisco6500 SFP |query_device| - |query_descr|] Graphs[MYROUTER cisco6500 SFP |query_device| - |query_descr|, MYROUTER cisco6500 SFP |query_device| - |query_descr|] Graphs[MYROUTER cisco6500 SFP |query_device| - |query_descr|, MYROUTER cisco6500 SFP |query_device| - |query_descr|] Graphs[MYROUTER gi6/2 opt tx graph, MYROUTER gi6/2 opt tx graph] DS[3808, 3809, 3810, 3816] 
(repeated N times)

from cacti.log:

2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3808] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'MYROUTER:176:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '1026', output: U
2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3808] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'MYROUTER:176:2:161:5000:1:10:mycommunity::::::' 'get' 'tx' '1026', output: U
2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3809] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'MYROUTER:176:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '2026', output: U
2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3809] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'MYROUTER:176:2:161:5000:1:10:mycommunity::::::' 'get' 'tx' '2026', output: U
2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3810] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'MYROUTER:176:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '2038', output: U
2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3810] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'MYROUTER:176:2:161:5000:1:10:mycommunity::::::' 'get' 'tx' '2038', output: U
2018/01/26 11:11:06 - POLLER: Poller[1] Device[176] DS[3816] SNMP: v2: MYROUTER, dsname: cdrav_opt_tx_62, oid: , output: U
0xygen8 commented 6 years ago

Please post output from: Devices -> Associated Data Queries -> Verbose Query (then we know indexing goes right)

pyron83 commented 6 years ago

Data Query Debug Information
Total: 0, Delta: 0, Running data query [33].
Total: 0, Delta: 0, Found type = '6' [Script Query - Script Server].
Total: 0, Delta: 0, Found data query XML file at '/usr/share/cacti/site/resource/script_server/cisco_sfp.xml'
Total: 0, Delta: 0, XML file parsed ok.
Total: 0, Delta: 0, <arg_num_indexes> missing in XML file, 'Index Count Changed' not supported
Total: 0.54, Delta: 0.54, Executing script for list of indexes '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:176:2:161:5000:1:10:mycommunity::::::' 'index'' Index Count: 3
Click to show data query output for 'index'
Found index: 1026
Found index: 2026
Found index: 2038
Click to show data query output for field 'sfpindex'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:176:2:161:5000:1:10:mycommunity::::::' 'query' 'sfpindex''
Found item [sfpindex='1026'] index: 1026
Found item [sfpindex='2026'] index: 2026
Found item [sfpindex='2038'] index: 2038
Click to show data query output for field 'status'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:176:2:161:5000:1:10:mycommunity::::::' 'query' 'status''
Found item [status='TX Online / RX Online'] index: 1026
Found item [status='TX Online / RX Online'] index: 2026
Found item [status='TX Online / RX Online'] index: 2038
Click to show data query output for field 'interface'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:176:2:161:5000:1:10:mycommunity::::::' 'query' 'interface''
Click to show data query output for field 'descr'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:176:2:161:5000:1:10:mycommunity::::::' 'query' 'descr''
Total: 1.15, Delta: 0.61, Update data query sort cache complete
Total: 1.15, Delta: 0, Updated data query index ordering
Total: 1.15, Delta: 0, Update re-index cache complete
Total: 1.15, Delta: 0, Update graph data query cache complete
Total: 1.15, Delta: 0, Update data source data query cache complete
Total: 1.15, Delta: 0, Update data query cache complete
Total: 1.18, Delta: 0.02, Update poller cache from query complete
Total: 1.18, Delta: 0, Automation execute data query complete
Total: 1.18, Delta: 0, Plugin hooks complete
pyron83 commented 6 years ago

this is an snmpwalk on the device about item index 203X


snmpwalk -v2c -cmycommunity myrouter 1.3.6.1.4.1.9.9.91.1.1.1.1.4 | grep -E 203.*
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2035 = INTEGER: 363
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2036 = INTEGER: 32
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2037 = INTEGER: 295
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2038 = INTEGER: 20
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2039 = INTEGER: -288
0xygen8 commented 6 years ago

seems like everything goes ok

pyron83 commented 6 years ago

Is there something useful I'm missing?

0xygen8 commented 6 years ago

at this point I would place cacti in full debug mode and try looking for clues there

pyron83 commented 6 years ago

I may have found something with full debug:


thrown in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 142
--
#0 /usr/share/cacti/site/scripts/ss_65xx_sfp.php(30): ss_sfp('myrouter...', 'query', 'descr')
2018/01/26 12:06:43 - ERROR PHP ERROR: Uncaught Error: Call to  undefined function ereg_replace() in  /usr/share/cacti/site/scripts/ss_65xx_sfp.php:142
thrown in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 184
#0 /usr/share/cacti/site/scripts/ss_65xx_sfp.php(30): ss_sfp('myrouter...', 'query', 'interface')
2018/01/26 12:06:43 - ERROR PHP ERROR: Uncaught Error: Call to  undefined function ereg_replace() in  /usr/share/cacti/site/scripts/ss_65xx_sfp.ph
pyron83 commented 6 years ago

I'm not sure, but it looks he doesn't like:

ereg_replace('.*\.[0-9]+\.[0-9]+\.([0-9]+)$', '.1.3.6.1.2.1.47.1.1.1.1.2.\\1', $var[$i]["oid"])

maybe because I'm on PHP7? (debian 9)

http://php.net/manual/it/function.ereg-replace.php

So to summarize: ereg_replace is a deprecated search and replace action where preg_replace can be used instead, and it follows a pattern as described earlier where it takes the input data, finds a match based on what you are looking for, replaces it with something else you define, and then gives you an output data variable that you can use in your script or page. Hopefully by understanding the process, the php code functions wont seem like voodoo and you could troubleshoot and fix many of the deprecated errors yourself

netniV commented 6 years ago

That could be a good find. I'll take a look into it.

netniV commented 6 years ago

And immediately it shoots out in the English version of that function help page: image

Stupid that it doesn't appear on your language specific version.

pyron83 commented 6 years ago

yep that warning it's missing in italian, really weird

netniV commented 6 years ago

If you edit ss_65xx_sfp.php there are two places where ereg_xxx is used, just change the e to a p and it should all work magically. If so, I'll submit the fix.

pyron83 commented 6 years ago

mmm I edited as you said, but now I get:


2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 234 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined variable: cmd in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 234
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 103 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined variable: cmd in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 103
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 87 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined variable: cmd in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 87
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 69 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 7 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 69
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 51 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 6 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 51
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 50 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 5 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 50
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 49 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 4 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 49
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 48 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 3 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 48
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 47 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 2 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 47
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 46 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined offset: 1 in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 46
2018/01/26 15:32:52 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 44 CactiErrorHandler)(/lib/functions.php: 4434 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP NOTICE: Undefined variable: snmp_auth in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 44
2018/01/26 15:32:52 - CMDPHP PHP ERROR WARNING Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 43 CactiErrorHandler)(/lib/functions.php: 4429 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP WARNING: Missing argument 2 for ss_sfp(), called in /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line 30 and defined in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 43
2018/01/26 15:32:52 - CMDPHP PHP ERROR WARNING Backtrace: (/scripts/ss_65xx_sfp.php: 30 ss_sfp)(/scripts/ss_65xx_sfp.php: 43 CactiErrorHandler)(/lib/functions.php: 4429 cacti_debug_backtrace)
2018/01/26 15:32:52 - ERROR PHP WARNING: Missing argument 1 for ss_sfp(), called in /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line 30 and defined in file: /usr/share/cacti/site/scripts/ss_65xx_sfp.php on line: 43

I'm not an expert of PHP at all, but shouldn't I also modify the pattern?

https://stackoverflow.com/questions/10159990/converting-an-ereg-replace-to-preg-replace

if I understood correctly, I should add some delimeters to the regexp:

> 

7         down vote | One of the differences between ereg_replace() and preg_replace() is that the pattern must be enclosed by delimiters: delimiter + pattern + delimiter. As stated in the documentation, a delimiter can be any non-alphanumeric, non-backslash, non-whitespace character. This means that valid delimiters are: /, #, ~, +, %, @, ! and <>, with the first two being most often used (but this is just my guess).
-- | --

> 
pyron83 commented 6 years ago

instead of: $sensor_name = (cacti_snmp_get($hostname, $snmp_community, ereg_replace('.*\.[0-9]+\.[0-9]+\.([0-9]+)$', '.1.3.6.1.2.1.47.1.1.1.1.2.\\1', $var[$i]["oid"]), $snmp_version

something like this? $sensor_name = (cacti_snmp_get($hostname, $snmp_community, preg_replace('#.*\.[0-9]+\.[0-9]+\.([0-9]+)$#', '.1.3.6.1.2.1.47.1.1.1.1.2.\\1', $var[$i]["oid"]), $snmp_version,

0xygen8 commented 6 years ago

https://stackoverflow.com/questions/3132844/function-ereg-replace-is-deprecated-how-to-clear-this-bug#3132859

$mytext = eregreplace('[^A-Za-z0-9]', '', $mytext );

is changed to

$mytext = pregreplace('/[^A-Za-z0-9]/', '', $mytext );

netniV commented 6 years ago

Ah yeah forgot that preg_xxx functions expect the regex to start and end with the same character so it knows it to be the delimiter.

netniV commented 6 years ago

@pyron83 have you managed to test this any further with the recommended changes?

pyron83 commented 6 years ago

nope, I didn't have the time.

I'm gonna see if I can try today.

thanks.

-- Andrea Turbiglio

2018-01-28 0:35 GMT+01:00 netniV notifications@github.com:

@pyron83 https://github.com/pyron83 have you managed to test this any further with the recommended changes?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/netniV/cisco-sfp/issues/1#issuecomment-361024544, or mute the thread https://github.com/notifications/unsubscribe-auth/AhgxABfPQ3UdeZv7Ar58y1QaHD3VZegWks5tO7KrgaJpZM4RseMB .

pyron83 commented 6 years ago

I was busy today, so I didn't have much spare time to give a look at this issue.

Anyway, I don't see any error left in the logs, but still the graphs say "nan".

If I remember correctly, sometimes Cacti has issues at filling the RRD files even after the underlying problem has been corrected. The solution should be to delete the RRDs in questione and let the poller re-create the files.

Is it correct? It's a lot of time this kind of issue doesn't happen in my environment, so I'm not sure 100%

netniV commented 6 years ago

You should only need to recreate the files if there is corruption or you want to reset. That aside, as soon as data comes to cacti, it should go into your RRD files as long as the user the poller is running under has access to write it and the website user has access to read ti.

pyron83 commented 6 years ago

well that's weird, because the other graphs I've on Cacti are fine.

maybe i'm missing something

I'll try again tomorrow

-- Andrea Turbiglio

2018-01-29 16:38 GMT+01:00 netniV notifications@github.com:

You should only need to recreate the files if there is corruption or you want to reset. That aside, as soon as data comes to cacti, it should go into your RRD files as long as the user the poller is running under has access to write it and the website user has access to read ti.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/netniV/cisco-sfp/issues/1#issuecomment-361284434, or mute the thread https://github.com/notifications/unsubscribe-auth/AhgxAEtNmoUHO_gAXC9mNSls8kft8xW7ks5tPeXzgaJpZM4RseMB .

pyron83 commented 6 years ago

It looks like Cacti is updating the RRD file:


2018/01/30 08:31:15 - POLLER: Poller[1] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/myrouter_cisco6500_sfp_rx_3810.rrd --template sfp_tx:sfp_rx 1517297449:U:U 

But the graphs it's empty.

Need to investigate.
netniV commented 6 years ago

Yes, that is saying it did not get any tx/rx values from the script in the output value. I think this may be one of those parts where the poller is actually sending the input values through with quotes and rather than being around the entire string, it's around each field which breaks it.

Do you have your poller output cache for this template?

pyron83 commented 6 years ago

Script: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '1063'
RRD: /usr/share/cacti/site/rra/myrouter_cisco6500_sfp_rx_3811.rrd

Data Source Debug

/usr/bin/rrdtool create \
/usr/share/cacti/site/rra/myrouter_cisco6500_sfp_rx_3811.rrd \
--step 300  \
DS:sfp_tx:GAUGE:600:-40:10 \
DS:sfp_rx:GAUGE:600:-40:10 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

RRD File Information
Header

filename    /usr/share/cacti/site/rra/myrouter_cisco6500_sfp_rx_3811.rrd
rrd_version     0003
step    300
last_update     1517300729 [2018/01/30 09:25:29]
Data Source Items
    Type
    Minimal Heartbeat
    Min
    Max
    Last DS
    Value
    Unknown Sec
sfp_tx  GAUGE   600     -40     10  U   NaN     29
sfp_rx  GAUGE   600     -40     10  U   NaN     29
Round Robin Archive
    Consolidation Function
    Rows
    Cur Row
    PDP per Row
    X Files Factor
    CDP Prep Value (0)
    CDP Unknown Data points (0)
0   AVERAGE     600     235     1   0.5     NaN     0
1   AVERAGE     700     550     6   0.5     0   5
2   AVERAGE     775     376     24  0.5     0   5
3   AVERAGE     797     738     288     0.5     0   101
4   MIN     600     580     1   0.5     NaN     0
5   MIN     700     383     6   0.5     0   5
6   MIN     775     368     24  0.5     0   5
7   MIN     797     196     288     0.5     0   101
8   MAX     600     231     1   0.5     NaN     0
9   MAX     700     308     6   0.5     0   5
10  MAX     775     631     24  0.5     0   5
11  MAX     797     422     288     0.5     0   101
12  LAST    600     66  1   0.5     NaN     0
13  LAST    700     315     6   0.5     NaN     5
14  LAST    775     281     24  0.5     NaN     5
15  LAST    797     61  288     0.5     NaN     101
netniV commented 6 years ago

What happens if you run the script at command line:

/usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '1063'

The problem is that I don't have something I can query this against so I'm working purely from what I can read in the code. 1063 should be the base value to use with SNMP walk. If you specify 'rx' instead of 'tx' (as you have above) it adds one to this.

Maybe also try an SNMPWALK for

.1.3.6.1.4.1.9.9.91.1.1.1.1.5.1063
.1.3.6.1.4.1.9.9.91.1.1.1.1.5.1064
netniV commented 6 years ago

Also, since you must have this device with the associated query, what happens when you use the verbose query (when editing the device, go down the bottom).

pyron83 commented 6 years ago

1) /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '1063'
 -40

2) snmpwalk -v2c -cmycommunity myrouter .1.3.6.1.4.1.9.9.91.1.1.1.1.5.1063
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1063 = INTEGER: 1
snmpwalk -v2c -cmycommunity myrouter .1.3.6.1.4.1.9.9.91.1.1.1.1.5.1064
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1064 = INTEGER:1

3) verbose query

Data Query Debug Information
Total: 0, Delta: 0, Running data query [33].
Total: 0, Delta: 0, Found type = '6' [Script Query - Script Server].
Total: 0, Delta: 0, Found data query XML file at '/usr/share/cacti/site/resource/script_server/cisco_sfp.xml'
Total: 0, Delta: 0, XML file parsed ok.
Total: 0, Delta: 0, <arg_num_indexes> missing in XML file, 'Index Count Changed' not supported
Total: 0.16, Delta: 0.16, Executing script for list of indexes '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'index'' Index Count: 3
Click to show data query output for 'index'
Found index: 1063
Found index: 1279
Found index: 1291
Click to show data query output for field 'sfpindex'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'query' 'sfpindex''
Found item [sfpindex='1063'] index: 1063
Found item [sfpindex='1279'] index: 1279
Found item [sfpindex='1291'] index: 1291
Click to show data query output for field 'status'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'query' 'status''
Found item [status='TX Online / RX Online'] index: 1063
Found item [status='TX Online / RX Online'] index: 1279
Found item [status='TX Online / RX Online'] index: 1291
Click to show data query output for field 'interface'
Executing script query '"/usr/bin/php" -q /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'query' 'interface''
Found item [interface='GigabitEthernet1/5'] index: 1063
Found item [interface='GigabitEthernet1/23'] index: 1279
Found item [interface='GigabitEthernet1/24'] index: 1291
Click to show data query output for field 'descr'
Total: 0.82, Delta: 0.66, Update data query sort cache complete
Total: 0.82, Delta: 0, Updated data query index ordering
Total: 0.83, Delta: 0.01, Update re-index cache complete
Total: 0.83, Delta: 0, Update graph data query cache complete
Total: 0.83, Delta: 0, Update data source data query cache complete
Total: 0.83, Delta: 0, Update data query cache complete
Total: 0.85, Delta: 0.02, Update poller cache from query complete
Total: 0.85, Delta: 0, Automation execute data query complete
Total: 0.85, Delta: 0, Plugin hooks complete
netniV commented 6 years ago

OK, can you do me one last favour, can you get me the SNMP walk for this OID: ".1.3.6.1.4.1.9.9.91.1.1.1.1.1"

There will likely be a lot of data, but I want to see what is being returned and then walk through the script.

pyron83 commented 6 years ago

you're the one doing me a favour ;)


myhost:/home/myself# snmpwalk -v2c -cmycommunity myrouter .1.3.6.1.4.1.9.9.91.1.1.1.1.1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.12 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.18 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.19 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.20 = INTEGER: 13
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.21 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.22 = INTEGER: 3
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.29 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.30 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.31 = INTEGER: 13
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.32 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.33 = INTEGER: 3
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.38 = INTEGER: 13
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.39 = INTEGER: 13
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.42 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.43 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.46 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.47 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.50 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.51 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.54 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.55 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.58 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.59 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1002 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1003 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1004 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1005 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1006 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1007 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1060 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1061 = INTEGER: 4
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1062 = INTEGER: 5
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1063 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1064 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1276 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1277 = INTEGER: 4
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1278 = INTEGER: 5
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1279 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1280 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1288 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1289 = INTEGER: 4
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1290 = INTEGER: 5
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1291 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1292 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.2001 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.2002 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.2003 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.2004 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3002 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3003 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3004 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3005 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3006 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3007 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3008 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3009 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3010 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3011 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3015 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3016 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3019 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.3020 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4002 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4003 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4004 = INTEGER: 12
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4005 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4006 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4007 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4008 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4009 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4010 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4011 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4015 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4016 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4019 = INTEGER: 8
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.4020 = INTEGER: 8
netniV commented 6 years ago

OK, so from above, I work out that the index is correct so if you could put these in a separate posts:

.1.3.6.1.2.1.47.1.1.1.1.2 .1.3.6.1.4.1.9.9.91.1.1.1.1.4 .1.3.6.1.4.1.9.9.91.1.1.1.1.5

pyron83 commented 6 years ago

root@myhost:/home/myself# snmpwalk -v2c -cmycommunity myrouter .1.3.6.1.2.1.47.1.1.1.1.2 SNMPv2-SMI::mib-2.47.1.1.1.1.2.1 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotChassis System" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.5 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.6 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.7 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.8 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.9 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.10 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slotPhysical Slot" SNMPv2-SMI::mib-2.47.1.1.1.1.2.11 = STRING: "Cisco Systems, Inc. Catalyst 6500 9-slot backplane" SNMPv2-SMI::mib-2.47.1.1.1.1.2.12 = STRING: "fan-tray 1 fan-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.13 = STRING: "Container of Fan FRU" SNMPv2-SMI::mib-2.47.1.1.1.1.2.14 = STRING: "Enhanced 9-slot Fan Tray 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.15 = STRING: "Container of Container of Power Supply" SNMPv2-SMI::mib-2.47.1.1.1.1.2.16 = STRING: "Container of Power Supply 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.17 = STRING: "AC power supply, 3000 watt 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.18 = STRING: "power-supply 1 fan-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.19 = STRING: "power-supply 1 power-output-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.20 = STRING: "power-supply 1 power-output-mode Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.21 = STRING: "power-supply 1 incompatible with fan Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.22 = STRING: "power-supply 1 power-input Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.27 = STRING: "Container of Power Supply 2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.28 = STRING: "AC power supply, 3000 watt 2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.29 = STRING: "power-supply 2 fan-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.30 = STRING: "power-supply 2 power-output-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.31 = STRING: "power-supply 2 power-output-mode Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.32 = STRING: "power-supply 2 incompatible with fan Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.33 = STRING: "power-supply 2 power-input Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.38 = STRING: "Sensor for counting number of OK VTTs" SNMPv2-SMI::mib-2.47.1.1.1.1.2.39 = STRING: "Sensor for counting number of OK Clocks" SNMPv2-SMI::mib-2.47.1.1.1.1.2.40 = STRING: "Container of VTT" SNMPv2-SMI::mib-2.47.1.1.1.1.2.41 = STRING: "VTT-E FRU 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.42 = STRING: "VTT-E FRU 1 OK Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.43 = STRING: "VTT-E FRU 1 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.44 = STRING: "Container of VTT" SNMPv2-SMI::mib-2.47.1.1.1.1.2.45 = STRING: "VTT-E FRU 2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.46 = STRING: "VTT-E FRU 2 OK Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.47 = STRING: "VTT-E FRU 2 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.48 = STRING: "Container of VTT" SNMPv2-SMI::mib-2.47.1.1.1.1.2.49 = STRING: "VTT-E FRU 3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.50 = STRING: "VTT-E FRU 3 OK Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.51 = STRING: "VTT-E FRU 3 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.52 = STRING: "Container of Clock" SNMPv2-SMI::mib-2.47.1.1.1.1.2.53 = STRING: "OSR-7600 Clock FRU 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.54 = STRING: "OSR-7600 Clock FRU 1 OK Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.55 = STRING: "OSR-7600 Clock FRU 1 In Using Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.56 = STRING: "Container of Clock" SNMPv2-SMI::mib-2.47.1.1.1.1.2.57 = STRING: "OSR-7600 Clock FRU 2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.58 = STRING: "OSR-7600 Clock FRU 2 OK Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.59 = STRING: "OSR-7600 Clock FRU 2 In Using Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1000 = STRING: "WS-X6724-SFP CEF720 24 port 1000mb SFP Rev. 4.3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1001 = STRING: "CPU of Module 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1002 = STRING: "module 1 power-output-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1003 = STRING: "module 1 insufficient cooling Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1004 = STRING: "module 1 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1005 = STRING: "module 1 inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1006 = STRING: "module 1 device-1 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1007 = STRING: "module 1 device-2 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1008 = STRING: "Switching Engine Container 1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1009 = STRING: "WS-F6700-CFC Centralized Forwarding Card Rev. 4.1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1010 = STRING: "Gigabit Port Container Gi1/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1011 = STRING: "1000BaseSX Gi1/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1022 = STRING: "Gigabit Port Container Gi1/2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1034 = STRING: "Gigabit Port Container Gi1/3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1035 = STRING: "1000BaseSX Gi1/3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1046 = STRING: "Gigabit Port Container Gi1/4" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1047 = STRING: "1000BaseSX Gi1/4" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1058 = STRING: "Gigabit Port Container Gi1/5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1059 = STRING: "1000BaseZX Gi1/5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1060 = STRING: "GigabitEthernet1/5 Module Temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1061 = STRING: "GigabitEthernet1/5 Supply Voltage Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1062 = STRING: "GigabitEthernet1/5 Bias Current Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1063 = STRING: "GigabitEthernet1/5 Transmit Power Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1064 = STRING: "GigabitEthernet1/5 Receive Power Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1070 = STRING: "Gigabit Port Container Gi1/6" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1082 = STRING: "Gigabit Port Container Gi1/7" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1083 = STRING: "1000BaseSX Gi1/7" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1094 = STRING: "Gigabit Port Container Gi1/8" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1095 = STRING: "1000BaseSX Gi1/8" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1106 = STRING: "Gigabit Port Container Gi1/9" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1107 = STRING: "1000BaseSX Gi1/9" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1118 = STRING: "Gigabit Port Container Gi1/10" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1119 = STRING: "1000BaseSX Gi1/10" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1130 = STRING: "Gigabit Port Container Gi1/11" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1131 = STRING: "1000BaseSX Gi1/11" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1142 = STRING: "Gigabit Port Container Gi1/12" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1143 = STRING: "1000BaseSX Gi1/12" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1154 = STRING: "Gigabit Port Container Gi1/13" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1155 = STRING: "1000BaseSX Gi1/13" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1166 = STRING: "Gigabit Port Container Gi1/14" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1167 = STRING: "1000BaseSX Gi1/14" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1178 = STRING: "Gigabit Port Container Gi1/15" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1179 = STRING: "1000BaseSX Gi1/15" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1190 = STRING: "Gigabit Port Container Gi1/16" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1191 = STRING: "1000BaseSX Gi1/16" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1202 = STRING: "Gigabit Port Container Gi1/17" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1203 = STRING: "1000BaseSX Gi1/17" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1214 = STRING: "Gigabit Port Container Gi1/18" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1215 = STRING: "1000BaseSX Gi1/18" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1226 = STRING: "Gigabit Port Container Gi1/19" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1227 = STRING: "1000BaseSX Gi1/19" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1238 = STRING: "Gigabit Port Container Gi1/20" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1250 = STRING: "Gigabit Port Container Gi1/21" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1262 = STRING: "Gigabit Port Container Gi1/22" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1274 = STRING: "Gigabit Port Container Gi1/23" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1275 = STRING: "1000BaseSX Gi1/23" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1276 = STRING: "GigabitEthernet1/23 Module Temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1277 = STRING: "GigabitEthernet1/23 Supply Voltage Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1278 = STRING: "GigabitEthernet1/23 Bias Current Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1279 = STRING: "GigabitEthernet1/23 Transmit Power Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1280 = STRING: "GigabitEthernet1/23 Receive Power Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1286 = STRING: "Gigabit Port Container Gi1/24" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1287 = STRING: "1000BaseSX Gi1/24" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1288 = STRING: "GigabitEthernet1/24 Module Temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1289 = STRING: "GigabitEthernet1/24 Supply Voltage Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1290 = STRING: "GigabitEthernet1/24 Bias Current Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1291 = STRING: "GigabitEthernet1/24 Transmit Power Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.1292 = STRING: "GigabitEthernet1/24 Receive Power Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2000 = STRING: "WS-X6148A-GE-TX 48-port 10/100/1000 RJ45 EtherModule Rev. 4.2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2001 = STRING: "module 4 power-output-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2002 = STRING: "module 4 insufficient cooling Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2003 = STRING: "module 4 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2004 = STRING: "module 4 inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2005 = STRING: "10/100/1000BaseT Gi4/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2006 = STRING: "10/100/1000BaseT Gi4/2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2007 = STRING: "10/100/1000BaseT Gi4/3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2008 = STRING: "10/100/1000BaseT Gi4/4" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2009 = STRING: "10/100/1000BaseT Gi4/5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2010 = STRING: "10/100/1000BaseT Gi4/6" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2011 = STRING: "10/100/1000BaseT Gi4/7" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2012 = STRING: "10/100/1000BaseT Gi4/8" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2013 = STRING: "10/100/1000BaseT Gi4/9" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2014 = STRING: "10/100/1000BaseT Gi4/10" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2015 = STRING: "10/100/1000BaseT Gi4/11" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2016 = STRING: "10/100/1000BaseT Gi4/12" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2017 = STRING: "10/100/1000BaseT Gi4/13" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2018 = STRING: "10/100/1000BaseT Gi4/14" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2019 = STRING: "10/100/1000BaseT Gi4/15" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2020 = STRING: "10/100/1000BaseT Gi4/16" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2021 = STRING: "10/100/1000BaseT Gi4/17" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2022 = STRING: "10/100/1000BaseT Gi4/18" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2023 = STRING: "10/100/1000BaseT Gi4/19" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2024 = STRING: "10/100/1000BaseT Gi4/20" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2025 = STRING: "10/100/1000BaseT Gi4/21" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2026 = STRING: "10/100/1000BaseT Gi4/22" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2027 = STRING: "10/100/1000BaseT Gi4/23" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2028 = STRING: "10/100/1000BaseT Gi4/24" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2029 = STRING: "10/100/1000BaseT Gi4/25" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2030 = STRING: "10/100/1000BaseT Gi4/26" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2031 = STRING: "10/100/1000BaseT Gi4/27" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2032 = STRING: "10/100/1000BaseT Gi4/28" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2033 = STRING: "10/100/1000BaseT Gi4/29" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2034 = STRING: "10/100/1000BaseT Gi4/30" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2035 = STRING: "10/100/1000BaseT Gi4/31" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2036 = STRING: "10/100/1000BaseT Gi4/32" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2037 = STRING: "10/100/1000BaseT Gi4/33" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2038 = STRING: "10/100/1000BaseT Gi4/34" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2039 = STRING: "10/100/1000BaseT Gi4/35" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2040 = STRING: "10/100/1000BaseT Gi4/36" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2041 = STRING: "10/100/1000BaseT Gi4/37" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2042 = STRING: "10/100/1000BaseT Gi4/38" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2043 = STRING: "10/100/1000BaseT Gi4/39" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2044 = STRING: "10/100/1000BaseT Gi4/40" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2045 = STRING: "10/100/1000BaseT Gi4/41" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2046 = STRING: "10/100/1000BaseT Gi4/42" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2047 = STRING: "10/100/1000BaseT Gi4/43" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2048 = STRING: "10/100/1000BaseT Gi4/44" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2049 = STRING: "10/100/1000BaseT Gi4/45" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2050 = STRING: "10/100/1000BaseT Gi4/46" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2051 = STRING: "10/100/1000BaseT Gi4/47" SNMPv2-SMI::mib-2.47.1.1.1.1.2.2052 = STRING: "10/100/1000BaseT Gi4/48" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3000 = STRING: "VS-S720-10G 5 ports Supervisor Engine 720 10GE Rev. 3.2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3001 = STRING: "CPU of Switching Processor 5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3002 = STRING: "module 5 power-output-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3003 = STRING: "module 5 insufficient cooling Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3004 = STRING: "module 5 fan-upgrade required Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3005 = STRING: "module 5 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3006 = STRING: "module 5 inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3007 = STRING: "module 5 device-1 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3008 = STRING: "module 5 device-2 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3009 = STRING: "module 5 asic-1 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3010 = STRING: "module 5 asic-3 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3011 = STRING: "module 5 asic-4 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3012 = STRING: "MSFC Container 5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3013 = STRING: "VS-F6K-MSFC3 MSFC3 Daughterboard Rev. 5.0" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3014 = STRING: "CPU of Routing Processor 5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3015 = STRING: "module 5 RP outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3016 = STRING: "module 5 RP inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3017 = STRING: "Switching Engine Container 5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3018 = STRING: "VS-F6K-PFC3C Policy Feature Card 3 Rev. 1.1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3019 = STRING: "module 5 EARL outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3020 = STRING: "module 5 EARL inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3021 = STRING: "Gigabit Port Container Gi5/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3022 = STRING: "1000BaseLH Gi5/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3033 = STRING: "Gigabit Port Container Gi5/2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3045 = STRING: "10/100/1000BaseT Gi5/3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3046 = STRING: "10-Gigabit Port Container Te5/4" SNMPv2-SMI::mib-2.47.1.1.1.1.2.3058 = STRING: "10-Gigabit Port Container Te5/5" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4000 = STRING: "VS-S720-10G 5 ports Supervisor Engine 720 10GE Rev. 3.2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4001 = STRING: "CPU of Switching Processor 6" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4002 = STRING: "module 6 power-output-fail Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4003 = STRING: "module 6 insufficient cooling Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4004 = STRING: "module 6 fan-upgrade required Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4005 = STRING: "module 6 outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4006 = STRING: "module 6 inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4007 = STRING: "module 6 device-1 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4008 = STRING: "module 6 device-2 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4009 = STRING: "module 6 asic-1 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4010 = STRING: "module 6 asic-3 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4011 = STRING: "module 6 asic-4 temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4012 = STRING: "MSFC Container 6" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4013 = STRING: "VS-F6K-MSFC3 MSFC3 Daughterboard Rev. 5.0" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4014 = STRING: "CPU of Routing Processor 6" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4015 = STRING: "module 6 RP outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4016 = STRING: "module 6 RP inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4017 = STRING: "Switching Engine Container 6" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4018 = STRING: "VS-F6K-PFC3C Policy Feature Card 3 Rev. 1.1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4019 = STRING: "module 6 EARL outlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4020 = STRING: "module 6 EARL inlet temperature Sensor" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4021 = STRING: "Gigabit Port Container Gi6/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4022 = STRING: "1000BaseLH Gi6/1" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4033 = STRING: "Gigabit Port Container Gi6/2" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4045 = STRING: "10/100/1000BaseT Gi6/3" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4046 = STRING: "10-Gigabit Port Container Te6/4" SNMPv2-SMI::mib-2.47.1.1.1.1.2.4058 = STRING: "10-Gigabit Port Container Te6/5"

pyron83 commented 6 years ago

root@myhost:/home/myself# snmpwalk -v2c -cmycommunity myrouter .1.3.6.1.4.1.9.9.91.1.1.1.1.4
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.12 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.18 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.19 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.20 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.21 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.22 = INTEGER: 220
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.29 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.30 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.31 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.32 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.33 = INTEGER: 220
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.38 = INTEGER: 3
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.39 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.42 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.43 = INTEGER: 33
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.46 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.47 = INTEGER: 25
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.50 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.51 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.54 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.55 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.58 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.59 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1003 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1004 = INTEGER: 28
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1005 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1006 = INTEGER: 24
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1007 = INTEGER: 30
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1060 = INTEGER: 260
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1061 = INTEGER: 32
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1062 = INTEGER: 120
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1063 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1064 = INTEGER: -153
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1276 = INTEGER: 258
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1277 = INTEGER: 32
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1278 = INTEGER: 23
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1279 = INTEGER: -64
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1280 = INTEGER: -62
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1288 = INTEGER: 266
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1289 = INTEGER: 32
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1290 = INTEGER: 23
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1291 = INTEGER: -62
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1292 = INTEGER: -72
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2001 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2003 = INTEGER: 25
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.2004 = INTEGER: 25
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3003 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3004 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3005 = INTEGER: 31
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3006 = INTEGER: 24
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3007 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3008 = INTEGER: 30
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3009 = INTEGER: 51
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3010 = INTEGER: 35
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3011 = INTEGER: 47
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3015 = INTEGER: 25
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3016 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3019 = INTEGER: 28
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.3020 = INTEGER: 23
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4003 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4004 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4005 = INTEGER: 33
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4006 = INTEGER: 23
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4007 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4008 = INTEGER: 30
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4009 = INTEGER: 52
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4010 = INTEGER: 35
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4011 = INTEGER: 47
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4015 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4016 = INTEGER: 25
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4019 = INTEGER: 28
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.4020 = INTEGER: 23
pyron83 commented 6 years ago

root@myhost:/home/myself# snmpwalk -v2c -cmycommunity myrouter .1.3.6.1.4.1.9.9.91.1.1.1.1.5
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.12 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.18 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.19 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.20 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.21 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.22 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.29 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.30 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.31 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.32 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.33 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.38 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.39 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.42 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.43 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.46 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.47 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.50 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.51 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.54 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.55 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.58 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.59 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1003 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1004 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1005 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1006 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1007 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1060 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1061 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1062 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1063 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1064 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1276 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1277 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1278 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1279 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1280 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1288 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1289 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1290 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1291 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1292 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.2001 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.2002 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.2003 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.2004 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3003 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3004 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3005 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3006 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3007 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3008 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3009 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3010 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3011 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3015 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3016 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3019 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.3020 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4002 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4003 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4004 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4005 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4006 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4007 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4008 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4009 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4010 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4011 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4015 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4016 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4019 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.4020 = INTEGER: 1
netniV commented 6 years ago

Thanks for that. I can see from a quick line count that the .4 and .5 match up:

  227 /tmp/snmp1
   77 /tmp/snmp2
   77 /tmp/snmp3

I'll look further into this now.

0xygen8 commented 6 years ago

hmm, you define the RRD as DS:sfp_tx:GAUGE:600:-40:10 and have an output:

/usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '1063' -> -40 do you have a SFP output with a connection this would not show anything

other did you let cacti create the RRD file or did you create it by hand? if it is the latter please check if the cacti user is able to update the RRD file (check with rrdtool dump [rrdfile] and look at the top if the file was updated in the last cacti run

pyron83 commented 6 years ago

1) "do you have a SFP output with a connection this would not show anything"

sorry is it a question?

anyway yes that interface has a connection

myrouter_c6509#sh interfaces gigabitEthernet 1/5 transceiver detail ITU Channel not available (Wavelength not available), Transceiver is externally calibrated. mA: milliamperes, dBm: decibels (milliwatts), NA or N/A: not applicable. ++ : high alarm, + : high warning, - : low warning, -- : low alarm. A2D readouts (if they differ), are reported in parentheses. The threshold values are calibrated.

                        High Alarm  High Warn  Low Warn   Low Alarm
       Temperature         Threshold   Threshold  Threshold  Threshold

Port (Celsius) (Celsius) (Celsius) (Celsius) (Celsius)


Gi1/5 25.9 95.5 90.5 -9.4 -44.4

                        High Alarm  High Warn  Low Warn   Low Alarm
        Voltage            Threshold   Threshold  Threshold  Threshold

Port (Volts) (Volts) (Volts) (Volts) (Volts)


Gi1/5 3.23 4.00 3.60 3.00 0.00

                        High Alarm  High Warn  Low Warn   Low Alarm
        Current            Threshold   Threshold  Threshold  Threshold

Port (milliamperes) (mA) (mA) (mA) (mA)


Gi1/5 12.0 70.0 60.0 0.0 0.0

        Optical            High Alarm  High Warn  Low Warn   Low Alarm
        Transmit Power     Threshold   Threshold  Threshold  Threshold

Port (dBm) (dBm) (dBm) (dBm) (dBm)


Gi1/5 2.6 8.0 6.0 -1.0 -3.0

        Optical            High Alarm  High Warn  Low Warn   Low Alarm
        Receive Power      Threshold   Threshold  Threshold  Threshold

Port (dBm) (dBm) (dBm) (dBm) (dBm)


Gi1/5 -15.3 0.0 0.0 -40.0 -40.0

2) "other did you let cacti create the RRD file or did you create it by hand"

Cacti created the RRD file, it wasn't created manually

netniV commented 6 years ago

Right, so based of the logic in the code, I can see that you have the following indexes which are SFP:

$ grep ": 14" /tmp/snmp0
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1063 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1064 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1279 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1280 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1291 = INTEGER: 14
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.1.1292 = INTEGER: 14

If we look these up in the interfaces file we get:

$ grep "1063\|1064\|1279\|1280\|1291\|1292" /tmp/snmp1
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1063 = STRING: "GigabitEthernet1/5 Transmit Power Sensor"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1064 = STRING: "GigabitEthernet1/5 Receive Power Sensor"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1279 = STRING: "GigabitEthernet1/23 Transmit Power Sensor"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1280 = STRING: "GigabitEthernet1/23 Receive Power Sensor"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1291 = STRING: "GigabitEthernet1/24 Transmit Power Sensor"
SNMPv2-SMI::mib-2.47.1.1.1.1.2.1292 = STRING: "GigabitEthernet1/24 Receive Power Sensor"

This confirms what we believed above. Now we need to check the status of these interfaces to make sure that they are active and without error:

$ grep "1063\|1064\|1279\|1280\|1291\|1292" /tmp/snmp3
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1063 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1064 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1279 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1280 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1291 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.5.1292 = INTEGER: 1

A '1' indicates that the device is active and working. So now we get the values:

$ grep "1063\|1064\|1279\|1280\|1291\|1292" /tmp/snmp2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1063 = INTEGER: 26
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1064 = INTEGER: -153
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1279 = INTEGER: -64
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1280 = INTEGER: -62
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1291 = INTEGER: -62
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1292 = INTEGER: -72

These values seem high compared to what is the minimum/maximum until you realise that there is a /10 to divide that value by 10 so in reality the results are:

SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1063 = INTEGER: 2.6
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1064 = INTEGER: -15.3
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1279 = INTEGER: -6.4
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1280 = INTEGER: -6.2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1291 = INTEGER: -6.2
SNMPv2-SMI::enterprises.9.9.91.1.1.1.1.4.1292 = INTEGER: -7.2

These all fall within the -40 to 10 min/max values of the data source template (Templates -> Data Source -> Cisco 65xx - SFP statistics -> sfp_rx and sfp_tx). However, you are seeing -40 from the ss_cisco_sfp.php function so this would suggest that it didn't even manage to retrieve the value.

So, I've just pushed an update https://github.com/netniV/cisco-sfp/commit/e14123ab4b45075ff5505ab17114a545de3f922a which should have the fixes for the ereg_xxx functions and also now records the output of the value if logging is set to HIGH

0xygen8 commented 6 years ago

show the output of ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '2026' show the output of ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '2038'

netniV commented 6 years ago

@0xygen8 I would expect those to give the same -40 error given the above raw values from the SNMPWALK, though it's always worth asking.

pyron83 commented 6 years ago

show the output of ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '2026' show the output of ss_65xx_sfp.php 'myrouter:5:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '2038' >

both -40

pyron83 commented 6 years ago

So, I've just pushed an update e14123a which should have the fixes for the ereg_xxx functions and also now records the output of the value if logging is set to HIGH

I'm gonna test the new build ASAP

thanks

0xygen8 commented 6 years ago

the problem is this: when the code fails the plugin defaults to -40

cacti_log('Failed to retrieve valid status for Cisco SFP Index \''.$int.\', found: \'' .$int_status.'\'',false,'CISCO-SFP',POLLER_VERBOSITY_HIGH); // if not ok, send -40, symbolic for lights off $result = "-40";

netniV commented 6 years ago

Yeah, that's why I've now added the $int and $int_status to a log, lets see what the values are in the log files. As I can't truly test this, let me know if there are any coding errors or the plugin gets disabled.

0xygen8 commented 6 years ago

I'm doing this from memory as my test environment is still 0.8x and testing in production is a 'no-no' :)

pyron83 commented 6 years ago

2018/01/30 15:55:53 - POLLER: Poller[1] Device[myrouter cisco6500] Graphs[myrouter cisco6500 SFP |query_device| - myinterfacename, myrouter cisco6500 SFP |query_device| - myinterfacename] DS[3865] CMD: /usr/share/cacti/site/scripts/ss_65xx_sfp.php 'myrouter.mydomain:176:2:161:5000:1:10:mycommunity::::::' 'get' 'rx' '1026', output: U

i'm confused, does it means it still gets no value from the query?

netniV commented 6 years ago

Was there any CLOG entries for CISCO-SFP? (Or even a backtrace?)

pyron83 commented 6 years ago

nope, I'm looking thoroughly and I don't see any error

netniV commented 6 years ago

There should be because I just ran this directly and it failed to even parse... Something I should have done before committing it. That's what you get for rushing.

The latest commit https://github.com/netniV/cisco-sfp/commit/108de5ae39a5e179a758794bb3dd342382c96b12 should now work.