[AGENT++] Please clarify NotificationOriginator usage

Yasemin YILMAZ yaseyilmaz at gmail.com
Tue Apr 20 15:34:32 CEST 2010


Hi all,

I'm in confusion for which NotificationOriginator usage mechanism sould be
processed. I have eight NOTIFICATION-TYPE traps that does not contain any
objects (OBJECTS declaration), in order to only send trap such as coldStart
trap. For example;

myCpuUsageExceededTrap NOTIFICATION-TYPE
    STATUS current
    DESCRIPTION ""
    ::= { myTraps 6 }


I've read agentpp list's subjects related to NotificationOriginator but I
can not understand completely when NotificationOriginator::generate or
Mib::instance->notify should be prefer to call? Or we can say there is no
differences between them?

If I use NotificationOriginator as following is it a fault, isn't it?
Because Mib constructor sets it's notificationSender to 0 and if we don't
call set_notification_sender to set myNO and Mib's notify function creates
newly NotificationOriginator instance and sets to local member
notificationSender. In that case, how can Mib instance know trap destination
(myDest("127.0.0.1/162") )? (if Mib doesn not use myNO).

    Vbx* vbs = 0;
    NotificationOriginator myNO;
    UdpAddress myDest("127.0.0.1/162");
    myNO.add_v1_trap_destination(myDest);
    mib->notify("", cpuTrapOid, vbs, 0);


Sould we prefer to call myNO.generate instead of mib->notify if we
decide not to use Mib instance's notificationSender? If we do such,
are any properties usage disabled?

One more a question. We see that agentpp_notifytest_mib.h created a
agentppNotifyTestAllTypes class derived NotificationOriginator. Is
that a mandotory?
Must we create a class derived NotificationOriginator equaled to
NOTIFICATION-TYPE in MIB module file written according to SMIv2
standart?

Can we say such thing: we write only #define for trap oid and we use
as following:

    #define cpuTrapOid     "1.3.6.1.4.1.53600.6.2.0.1"
        ....

    Vbx* vbs = 0;
    NotificationOriginator myNO;
    UdpAddress myDest("127.0.0.1/162");
    myNO.add_v1_trap_destination(myDest);
    myNO.generate(vbs, 0, cpuTrapOid, "", "");

Please clarify these topics.

Thanks in advance for your explanations and helps,


Best regards,
Yasemin




 equaled to <http://www.tureng.com/search/equaled+to>
 f



More information about the AGENTPP mailing list