Skip to main content

What is the snmp community macro name that I can use in PREEXEC command of snmp trap definition? I have tried to use @HOSTSNMPCOMMUNITY@ or @_HOSTSNMPCOMMUNITY@ but it did not work.

snmpget -v 2c -Ovq -c @HOSTSNMPCOMMUNITY@ @HOSTADDRESS@ ifAlias.$1

snmpget -v 2c -Ovq -c @_HOSTSNMPCOMMUNITY@ @HOSTADDRESS@ ifAlias.$1

 

Hello :)

It does not currently seem possible to natively manage the HOSTSNMPCOMMUNITY macro in PREEXEC. We've taken this need into account and we'll be able to work on it. 

According to the investigations I have made on the list of available macros, it may be possible to use the `USERARG1` macro added to the host and filled with the community. You can then use it like this `@USERARG1@` (not sure if it works).


Reply