This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sdk:status-values-via-snmp [2015/07/03 14:44] – fachet | sdk:status-values-via-snmp [2020/07/21 08:31] (current) – [Access via SNMP] fachet | ||
---|---|---|---|
Line 30: | Line 30: | ||
===== Access via SNMP ===== | ===== Access via SNMP ===== | ||
- | Please use SNMP v3 for accessing the router. | + | Using SNMP v1/2c there are two communities. The "read" |
- | First create a user (SYSTEM-> | + | |
+ | You can also use SNMP v3 for accessing the router. | ||
Attention must be paid to the fact that SNMP passwords have to be more than 8 characters long. Shorter passwords have to be doubled for SNMP (e.g. admin01 becomes admin01admin01). | Attention must be paid to the fact that SNMP passwords have to be more than 8 characters long. Shorter passwords have to be doubled for SNMP (e.g. admin01 becomes admin01admin01). | ||
+ | Only the user " | ||
To see the values run on linux: \\ | To see the values run on linux: \\ | ||
**snmpwalk -v 3 -u < | **snmpwalk -v 3 -u < | ||
Line 47: | Line 49: | ||
{{: | {{: | ||
+ | |||
{{: | {{: | ||
+ | *if you use SNMP v1/2c with the MibBrowser please set either the " | ||
+ | For easier use please copy the NetModule private MIB (NETMODULE-VENDOR-MIB.mib into the MIB directory (e.g. C:\Program Files\MibBrowser Free Tool\mibs) and load it File-> | ||
===== Useful ===== | ===== Useful ===== | ||
Line 97: | Line 102: | ||
</ | </ | ||
+ | ===== Extended example ===== | ||
<code c status_snmp2.are> | <code c status_snmp2.are> | ||
/* DESC: This script extends MIB entries of the SNMP agent | /* DESC: This script extends MIB entries of the SNMP agent | ||
- | * with values from nb_status for temperature, | + | * with values from nb_status for temperature, |
- | | + | * transferred data on mobile network |
+ | * reset of transferred data counter | ||
* Copyright (coffee) 2014 NetModule AG, Switzerland | * Copyright (coffee) 2014 NetModule AG, Switzerland | ||
*/ | */ | ||
Line 108: | Line 114: | ||
if (nb_snmp_register(" | if (nb_snmp_register(" | ||
if (nb_snmp_register(" | if (nb_snmp_register(" | ||
+ | if (nb_snmp_register(" | ||
if (nb_snmp_link() == -1)exit(6); | if (nb_snmp_link() == -1)exit(6); | ||
Line 119: | Line 125: | ||
if (nb_snmp_update(" | if (nb_snmp_update(" | ||
if (nb_snmp_update(" | if (nb_snmp_update(" | ||
- | sleep(5); | + | |
- | } | + | if (s = nb_snmp_listen(5)) |
+ | if (s.name == " | ||
+ | nb_reset_statistics(" | ||
+ | if (nb_snmp_update(" | ||
+ | } | ||
+ | } </ | ||
+ | |||
+ | Please extend the NetModule router MIB (VENODR-MIB.txt before "trap objects" | ||
+ | < | ||
+ | -- **************************************************************************** | ||
+ | -- NBSdkTable | ||
+ | -- **************************************************************************** | ||
+ | sdkTemperature OBJECT-TYPE | ||
+ | SYNTAX | ||
+ | MAX-ACCESS | ||
+ | STATUS | ||
+ | DESCRIPTION | ||
+ | "The temperature of the WWAN Module 1" | ||
+ | ::= { sdk 1 } | ||
+ | |||
+ | sdkRSRQ OBJECT-TYPE | ||
+ | SYNTAX | ||
+ | MAX-ACCESS | ||
+ | STATUS | ||
+ | DESCRIPTION | ||
+ | "The RSRQ of the WWAN Module 1" | ||
+ | ::= { sdk 2 } | ||
+ | |||
+ | sdkDataDownloaded OBJECT-TYPE | ||
+ | SYNTAX | ||
+ | MAX-ACCESS | ||
+ | STATUS | ||
+ | DESCRIPTION | ||
+ | "The data downloaded on the WAN interface" | ||
+ | ::= { sdk 3 } | ||
+ | |||
+ | sdkDataUploaded OBJECT-TYPE | ||
+ | SYNTAX | ||
+ | MAX-ACCESS | ||
+ | STATUS | ||
+ | DESCRIPTION | ||
+ | "The data uploaded on the WAN interface" | ||
+ | ::= { sdk 4 } | ||
+ | |||
+ | sdkDataReset OBJECT-TYPE | ||
+ | SYNTAX | ||
+ | MAX-ACCESS | ||
+ | STATUS | ||
+ | DESCRIPTION | ||
+ | "Write ' | ||
+ | ::= { sdk 5 } | ||
</ | </ | ||
+ | {{: |