Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            CAgentSnmpPourSupervision agent = new CAgentSnmpPourSupervision();

            agent.TypeAgent   = m_baseHandlers;
            agent.Ip          = "172.16.1.200";
            agent.SnmpVersion = VersionCode.V1;
            agent.SnmpPort    = 161;
            agent.Communaute  = "public";
            agent.FillFromSNMP(m_baseHandlers.AgentAssocie);
        }
Exemple #2
0
        /// /////////////////////////////////////////////
        public CResultAErreur InitEntitesFromSnmpInContexteCourant()
        {
            CResultAErreur            result   = CResultAErreur.True;
            CMemoryDb                 database = CMemoryDbPourSupervision.GetMemoryDb(ContexteDonnee);
            CAgentSnmpPourSupervision agent    = GetAgentPourSupervision(database, false);

            if (agent != null)
            {
                result = agent.FillFromSNMP(new CInterrogateurSnmp());
                if (result)
                {
                    result = MapEntitesFromSNMP(agent);
                }
            }
            if (result)
            {
                LastUpdateDateFromSNMP = DateTime.Now;
            }
            return(result);
        }