Heartbeat SNMP4J: How to send SNMP heartbeat message using SNMP4J?

606 views Asked by At

How do I send a SNMP Heartbeat to NMS using SNMP4J? I am currently implementing a basic agent used to send only traps to NMS.

Thanks in advance.

1

There are 1 answers

0
Abhinav P On BEST ANSWER

Usually, it is the other way around. The NMS keeps a track of the network elements connected to it. Anyway, from any side if you want to perform heartbeat the concept is - Periodically poll the agent for these two scenarios.

  1. The agent replies back which mean that the agent is up and running.
  2. No reply from the agent after certain no of retries, which means the agent is down. Do the follow-up action.

In SNMP you can perform this using a simple GET on a particular OID. If the response you get is null. It implies that the agent is down.

The period of polling can be set based on how fast you want the knowledge that the agent is down. If you want immediate information that the agent is down, then the polling period will be very small and vice-versa.