[AGENT++] Best way to update sysContact++

Leo Lei nsinit at 163.com
Fri Feb 9 03:05:46 CET 2007


Hi, Johnny Ljunggren£º

	i did that as the following:

[code]
        if(CNMS_Global::pConfig->get("NMS_Agent", "agentName", tmpStr) != 0)
        {
                LOG_BEGIN(INFO_LOG | 1);
                LOG("get agentName failure from NMS_Agent.conf ");
                LOG_END;
                // using persistent storage
        }
        else
        {
                LOG_BEGIN(INFO_LOG | 1);
                LOG("serverName from agentName in NMS_Agent.conf");
                LOG_END;

                // overriding persistent storage
                nss_server_system_mib_serverName::instance->set_state(OctetStr(tmpStr));
        }
[/code]
	
notice: you should call this code after mib->init() which is loading the data from the persistent storage. 


>
>Hello
>
>What is the best way of updating sysContact and siblings during run-time?
>I'm trying to read snmpd.conf to get syscontact/syslocation and then set
>those values for my agent.
>
>Thanks
>-- 
>Johnny Ljunggren, Navtek AS
>
>_______________________________________________
>AGENTPP mailing list
>AGENTPP at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/agentpp
>


Best regards,
Leo Lei





More information about the AGENTPP mailing list