Snmptrap cli command not found

Dear Sir;
I would like to create a bash script using snmptrap but I get snmptrap not found, how can I install/run the snmptrap cli command? There is the snmptraps, can I use it like snmptrap?
Thank you and best regards
opkg list-installed | grep snmp
libnetsnmp - 5.9.1-5
snmp - 2023-02-13-1
snmp-mib - 2023-02-13-1
snmp-mod-chilli - 2023-02-13-1
snmp-mod-device - 2023-02-13-1
snmp-mod-gps - 2023-02-13-1
snmp-mod-gsm - 2023-02-13-1
snmp-mod-io - 2023-02-13-1
snmp-mod-port - 2023-02-13-1
snmp-mod-sqm - 2023-02-13-1
snmp-mod-vlan - 2023-02-13-1
snmp-mod-wireless - 2023-02-13-1
snmpd - 5.9.1-5
snmptrap - 2023-02-13-1
vuci-app-snmp-api - 1
vuci-app-snmp-ui - 1
Collected errors:

Hi,

You might have overlooked it, but the snmptrap package is available in the list you provided. To install it, simply run these commands:

opkg update
opkg install snmptrap

Best regards,

Marijus

Thank you for your suggestion, bellow I show the input messages,
best regards
root@isbt-RUT950:~# opkg update
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/arm_cortex-a7_neon-vfpv4/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://opkg.teltonika-networks.com/371e1c6defd4e26d82b0bfe77e6aa42a1491d84c8f14a01d78b1f176c3387b45/Packages.gz
Updated list of available packages in /var/opkg-lists/tlt_packages
root@isbt-RUT950:~# opkg install snmptrap
Package snmptrap (2023-12-06-1) installed in root is up to date.
root@isbt-RUT950:~# snmptrap
-ash: snmptrap: not found
root@isbt-RUT950:~#

Hello,

Could you clarify the ultimate objective of this SNMP use case? Perhaps the SNMP functionality we’ve already implemented is sufficient(WebUi)?

Best regards,

Marijus

Thank you very much for your prompt reply; I would like to generate a custom SNMP trap periodically, maybe 1min to send variables like din1 state, eqp temperature,hostname and some gsmctl parameters (all in one SNMP trap message).
Thank you and best regards

Hello,

To enable SNMP functionality on your RUTOS device, follow these steps:

  1. Navigate to System → Package Manager → Packages.
  2. Look for the package named “SNMP” and install it.
  3. Once installed, access SNMP services at Services → SNMP.

SNMP trap messages are primarily for triggering alerts, rather than providing detailed device information. For accessing information, it’s better to utilize regular polling at scheduled intervals. You can find a list of SNMP variables here, which provides more comprehensive information compared to trap messages.

Best regards,

Marijus

Dear Sir
Thank you for your kind reply, yes I installed the SNMP using the Package Manager as you indicated, I understand your recommendations, but due to the connectivity scenario, the SNMP manager can’t get the SNMP information from the RUTX devices. The only way is to generate periodic traps from the RUTX devices. At the present moment, the RUTX devices are sending the required information using HTTP and we use a GW(Gateway) to convert HTTP to SNMP traps

Thank you and best regards

This topic was automatically closed after 15 days. New replies are no longer allowed.