The hanotify utility

The hanotify utility enables you to construct user-defined messages. The utility forwards messages to HAD, which stores them in its internal message queue. Along with other messages, user-defined messages are also forwarded to the notifier process for delivery to email recipients, SNMP consoles, or both.

Click the thumbnail above to view full-sized image.

Example of hanotify command

hanotify -i 1.3.6.1.4.1.1302.3.8.10.2.8.0.10 -l Warning -n

agentres -T 7 -t "custom agent" -o 4 -S sys1 -L mv -p

sys2 -P mv -c MyAgent -C 7 -O johndoe -m "Custom message"

In this example, the number 1.3.6.1.4.1.1302.3.8.10.2.8.0.10 is the OID for the message being sent. Because it is a user-defined message, VCS has no way of knowing the OID associated with the SNMP trap corresponding to this message. Users must provide the OID.

The message severity level is set to Warning. The affected systems are sys1 and sys2. Running this command sends a custom message for the resource agentres from the agent MyAgent.