Trigger Test SNMP Trap
paulinomreyes opened this issue · comments
Not an issue but is there a way for this library to trigger a test snmp trap? I'd like to send a test trap and verify if the management server is able to receive the trap.
**** Update
Looks like HP iLO scripting does support the above.
SEND_SNMP_TEST_TRAP
Use the SEND_SNMP_TEST_TRAP command to send a test SNMP trap to the configured alert
destinations. For this command to parse correctly, the command must appear within a RIB_INFO
command block, and RIB_INFO MODE must be set to write.
For example:
<RIB_INFO MODE="Write">
<SEND_SNMP_TEST_TRAP/>
</RIB_INFO>
how do i set the connection/api to have write access. When I added SEND_SNMP_TEST_TRAP I am getting
hpilo.IloError: iLO information is open for read-only access. Write access is required for this operation.
I should be using _control_tag. Tried to add the below and works like a charm. Sadly iLO 3 doesn't support this.
def send_snmp_trap(self):
return self._control_tag('RIB_INFO', 'SEND_SNMP_TEST_TRAP')
<!-- Firmware support information for this script: -->
<!-- iLO 4 - version 2.10 or later. -->
<!-- iLO 3 - None. -->
<!-- iLO 2 - None. -->
Added in ec1e678.