SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran...


                SNMP é usado como parte de monitoramento de utilização de recursos em dispositivos ligados na rede, informa utilização de CPU, tráfego de rede,
                status de serviços e etc.

         Estou escrevendo esse artigo por que será pré-requisito na configuração e instalação do Cacti para “grafar” os recursos dos dispositivos monitorados.

         Pré-requisitos
               Instalação mínima do CentOS e RedHat 5.3

         Instalação do serviço SNMPd

         A instalação será feita via Yum

          yum install net‐snmp.i386 net‐snmp‐libs.i386 net‐snmp‐utils.i386

          ...
          Installed: net‐snmp.i386 1:5.3.2.2‐5.el5_3.2 net‐snmp‐libs.i386 1:5.3.2.2‐5.el5_3.2 net‐snmp‐utils.i386
          1:5.3.2.2‐5.el5_3.2
          Dependency Installed: lm_sensors.i386 0:2.10.7‐4.el5
          Complete!

         É interessante garantir que o serviço será iniciado no boot

          chkconfig ‐‐levels 35 snmpd on

         Configurando o serviço SNMP

         Depois de instalado, o SNMP precisa ser configurado para responder a uma comunidade e em que modo ele irá responder.

         Também é interessante colocar uma descrição de quem é o responsável pelo servidor e onde está localizado o equipamento.

         Para iniciar a configuração, vá ao diretório /etc/snmp e apague o arquivo original que está lá ou renomeie, caso queira futuramente consultá-lo.

              1 cd /etc/snmp
              2 mv snmpd.conf snmpd.conf.orig

         Inicie o processo de configuração com o comando snmpconf, faz parte do pacote net-snmp-utils e é uma mão na roda, diga-se de passagem

              1 cd /etc/snmp
              2 snmpconf

         Uma série de questionários será apresentada.

         Na primeira fase

          I can create the following types of configuration files for you.
          Select the file type you wish to create:
          (you can create more than one as you run this program)

              1:    snmpd.conf
              2:    snmp.conf
              3:    snmptrapd.conf

          Other options: quit

          Select File: 1

         Selecione 1 para gerar o arquivo snmpd.conf que é o responsável por colher as métricas de utilização de recursos do SO.

         Aqui nessa sessão da configuração tem uma pegadinha: nem sempre a ordem apresentada é a mesma, então, preste atenção na opção escolhida.

          The configuration information which can be put into snmpd.conf is divided
          into sections. Select a configuration section for snmpd.conf
          that you wish to create:

              1:    Monitor Various Aspects of the Running Host
              2:    Access Control Setup
              3:    Extending the Agent
              4:    Trap Destinations
              5:    System Information Setup
              6:    Agent Operating Mode

          Other options: finished

          Select section: 2

         A primeira configuração é informações de acesso, então é a opção 2 “Access Control Setup”

          Section: Access Control Setup
          Description:
            This section defines who is allowed to talk to your running
            snmp agent.

          Select from:

              1:    a SNMPv3 read‐write user


1 de 4                                                                                                                                                           11/8/2011 13:42
Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran...


              1:   a   SNMPv3 read‐write user
              2:   a   SNMPv3 read‐only user
              3:   a   SNMPv1/SNMPv2c read‐only access community name
              4:   a   SNMPv1/SNMPv2c read‐write access community name

          Other options: finished, list

          Select section: 3

         Permitir acesso somente leitura aos dados do servidor. Evita algumas surpresas :)

         Opção escolhida: 3 “SNMPv1/SNMPv2c read-only access community name”

          Configuring: rocommunity
          Description:
            a SNMPv1/SNMPv2c read‐only access community name
              arguments: community [default|hostname|network/bits] [oid]

          The community name to add read‐only access for: 5nMPC0mmunity

         Nome da comunidade, não coloque “public” por que é muito manjada, e qualquer network scanner vai testar por isso, escolha uma mais difícil, colocando
         números e letras maiúsculas e minúsculas, evite colocar símbolos como $, #, % etc, vai confundir e gerar problemas futuros para scripts e para o próprio
         Cacti. Se utilizar o Nagios então, tá perdido ;)

         O nome escolhido aqui foi 5nMPC0mmunity

          The hostname or network address to accept this community name from [RETURN for all]:

         Quem vai ter acesso ao serviço SNMP, se pressionar direto vai liberar pra todos que souberem o nome da comunidade, caso queira restringir a um host apenas,
         coloque o IP do host, se é para um rede, coloque a rede aqui no formato 192.168.0.0/24

          The OID that this community should be restricted to [RETURN for no‐restriction]:

         Se quer permitir a visualização de apenas alguns recursos, coloque o OID do recurso aqui, no caso, vou deixar liberado para todos os recursos serem
         visualizados

         Finalizada a configuração de controle de acesso, vai voltar para a sessão própria. Como está terminado escreva finished ou apenas f para sair e voltar ao
         menu principal.

          Section: Access Control Setup
          Description:
            This section defines who is allowed to talk to your running
            snmp agent.

          Select from:

              1:   a   SNMPv3 read‐write user
              2:   a   SNMPv3 read‐only user
              3:   a   SNMPv1/SNMPv2c read‐only access community name
              4:   a   SNMPv1/SNMPv2c read‐write access community name

          Other options: finished, list

          Select section: finished

         Próxima fase, informar detalhes do dispositivo, como contato e localização física.

          The configuration information which can be put into snmpd.conf is divided
          into sections. Select a configuration section for snmpd.conf
          that you wish to create:

              1:   Monitor Various Aspects of the Running Host
              2:   Access Control Setup
              3:   Extending the Agent
              4:   Trap Destinations
              5:   System Information Setup
              6:   Agent Operating Mode

          Other options: finished

          Select section: 5

         Escolha a opção 5 “System Information Setup” e pressione

          Section: System Information Setup
          Description:
            This section defines some of the information reported in
            the "system" mib group in the mibII tree.

          Select from:

              1:   The [typically physical] location of the system.
              2:   The contact information for the administrator
              3:   The proper value for the sysServices object.

          Other options: finished, list



2 de 4                                                                                                                                                         11/8/2011 13:42
Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran...



          Select section: 1

         Opção escolhida 1, para informações de localização do equipamento

          Configuring: syslocation
          Description:
            The [typically physical] location of the system.
              Note that setting this value here means that when trying to
              perform an snmp SET operation to the sysLocation.0 variable will make
              the agent return the "notWritable" error code. IE, including
              this token in the snmpd.conf file will disable write access to
              the variable.
              arguments: location_string

          The location of the system: Data Center, Rack 3

         Informado onde está o equipamento Data Center, Rack 3, pressione quando terminar.

         Voltando para a tela de configuração com informações do equipamento, selecione a opção 2 para dizer quem é o responsável

          Section: System Information Setup
          Description:
            This section defines some of the information reported in
            the "system" mib group in the mibII tree.

          Select from:

              1:   The [typically physical] location of the system.
              2:   The contact information for the administrator
              3:   The proper value for the sysServices object.

          Other options: finished, list

          Select section: 2

          Configuring: syscontact
          Description:
            The contact information for the administrator
              Note that setting this value here means that when trying to
              perform an snmp SET operation to the sysContact.0 variable will make
              the agent return the "notWritable" error code. IE, including
              this token in the snmpd.conf file will disable write access to
              the variable.
              arguments: contact_string

          The contact information: Daniel Kühl Lima

         Informe alguns dados que facilitem a localização do responsável. Aqui foi informado Daniel Kühl Lima. Pressione quando terminar e voltará para a tela de
         configuração de informações.

          Section: System Information Setup
          Description:
            This section defines some of the information reported in
            the "system" mib group in the mibII tree.

          Select from:

              1:   The [typically physical] location of the system.
              2:   The contact information for the administrator
              3:   The proper value for the sysServices object.

          Other options: finished, list

          Select section: finished

         Sessão terminada, dá pra sair dessa tela e voltar ao menu principal. Escreve finished ou f para sair.

         Voltando para o menu principal, e como está tudo configurado como desejamos, escreva finished ou f para salvar e terminar a tarefa.

          The configuration information which can be put into snmpd.conf is divided
          into sections. Select a configuration section for snmpd.conf
          that you wish to create:

              1:   Monitor Various Aspects of the Running Host
              2:   Access Control Setup
              3:   Extending the Agent
              4:   Trap Destinations
              5:   System Information Setup
              6:   Agent Operating Mode

          Other options: finished

          Select section: finished

          I can create the following types of configuration files for you.
          Select the file type you wish to create:


3 de 4                                                                                                                                                     11/8/2011 13:42
Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran...


          Select the file type you wish to create:
          (you can create more than one as you run this program)

               1:   snmpd.conf
               2:   snmp.conf
               3:   snmptrapd.conf

          Other options: quit

          Select File: quit

         Escreva quit para sair de vez.

         Iniciando o serviço SNMP

         Com o serviço configurado é hora de iniciar.

               1 service snmpd start

               1 Starting snmpd:                                                                 [   OK    ]

         Verificando o funcionamento

         Pra verificar se está tudo a contento, execute o comando a seguir que irá se conectar ao serviço SNMP e retornará as métricas do sistema.

               1 snmpwalk ‐c 5nMPC0mmunity ‐v2c localhost
         SNMPv2-MIB::sysDescr.0 = STRING: Linux localhost.localdomain 2.6.30.5-fogonacaixadagua #7 SMP Fri Sep 11 11:32:29 BRT 2009 i686
         SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
         DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (13823) 0:02:18.23
         SNMPv2-MIB::sysContact.0 = STRING: "Daniel Kühl Lima"
         SNMPv2-MIB::sysName.0 = STRING: localhost.localdomain
         SNMPv2-MIB::sysLocation.0 = STRING: "Data Center, Rack 3"
         SNMPv2-MIB::sysORLastChange.0 = Timeticks: (9) 0:00:00.09

         ...

         No final do processo o arquivo /etc/snmp/snmpd.conf ficou assim:
         ###########################################################################
         #
         # snmpd.conf
         #
         #   - created by the snmpconf configuration program
         #

         ###########################################################################
         # SECTION: Access Control Setup
         #
         #   This section defines who is allowed to talk to your running
         #   snmp agent.

         # rocommunity: a SNMPv1/SNMPv2c read-only access community name
         #   arguments: community [default|hostname|network/bits] [oid]

         rocommunity     5nMPC0mmunity

         ###########################################################################
         # SECTION: System Information Setup
         #
         #   This section defines some of the information reported in
         #   the "system" mib group in the mibII tree.

         # syslocation: The [typically physical] location of the system.
         #   Note that setting this value here means that when trying to
         #   perform an snmp SET operation to the sysLocation.0 variable will make
         #   the agent return the "notWritable" error code. IE, including
         #   this token in the snmpd.conf file will disable write access to
         #   the variable.
         #   arguments: location_string

         syslocation     "Data Center, Rack 3"

         # syscontact: The contact information for the administrator
         #   Note that setting this value here means that when trying to
         #   perform an snmp SET operation to the sysContact.0 variable will make
         #   the agent return the "notWritable" error code. IE, including
         #   this token in the snmpd.conf file will disable write access to
         #   the variable.
         #   arguments: contact_string

         syscontact    "Daniel Kühl Lima"

         Pronto.




4 de 4                                                                                                                                               11/8/2011 13:42

Mais conteúdo relacionado

Mais procurados

Driver Configuration Webinar
Driver Configuration WebinarDriver Configuration Webinar
Driver Configuration WebinarAVEVA
 
3929 linux passo a passo 1
3929 linux passo a passo 1 3929 linux passo a passo 1
3929 linux passo a passo 1 Márcio Roberto
 
Arquitetura de Computadores: Processos e Threads
Arquitetura de Computadores: Processos e ThreadsArquitetura de Computadores: Processos e Threads
Arquitetura de Computadores: Processos e ThreadsEvandro Júnior
 
Processos threads senai
Processos threads senaiProcessos threads senai
Processos threads senaiCarlos Melo
 
Redes prática - Inetd
Redes prática - InetdRedes prática - Inetd
Redes prática - InetdLuiz Arthur
 
Servidor de internet (NAT, Squid, Sarg)
Servidor de internet (NAT, Squid, Sarg)Servidor de internet (NAT, Squid, Sarg)
Servidor de internet (NAT, Squid, Sarg)Danilo Filitto
 
Processos e threads
Processos e threadsProcessos e threads
Processos e threadsSilvino Neto
 
Sistemas operacionais 14
Sistemas operacionais 14Sistemas operacionais 14
Sistemas operacionais 14Nauber Gois
 
Visão Geral: Introdução
Visão Geral: IntroduçãoVisão Geral: Introdução
Visão Geral: IntroduçãoAlexandre Duarte
 
Ferramentas para Detecção de Problemas em Redes
Ferramentas para Detecção de Problemas em RedesFerramentas para Detecção de Problemas em Redes
Ferramentas para Detecção de Problemas em RedesFrederico Madeira
 
Systemd: A nova fronteira - João Avelino Bellomo Filho
Systemd: A nova fronteira - João Avelino Bellomo FilhoSystemd: A nova fronteira - João Avelino Bellomo Filho
Systemd: A nova fronteira - João Avelino Bellomo FilhoTchelinux
 
Apostila 5 processos e threads
Apostila 5   processos e threadsApostila 5   processos e threads
Apostila 5 processos e threadsPaulo Fonseca
 
Princípios básicos da análise de malware
Princípios básicos da análise de malwarePrincípios básicos da análise de malware
Princípios básicos da análise de malwareMarcelo Souza
 
Gerências de Processos: Sincronização
Gerências de Processos: SincronizaçãoGerências de Processos: Sincronização
Gerências de Processos: SincronizaçãoAlexandre Duarte
 

Mais procurados (20)

Driver Configuration Webinar
Driver Configuration WebinarDriver Configuration Webinar
Driver Configuration Webinar
 
3929 linux passo a passo 1
3929 linux passo a passo 1 3929 linux passo a passo 1
3929 linux passo a passo 1
 
Administração de Redes Linux - II
Administração de Redes Linux - IIAdministração de Redes Linux - II
Administração de Redes Linux - II
 
Apresentacao Aula03 So
Apresentacao Aula03 SoApresentacao Aula03 So
Apresentacao Aula03 So
 
Arquitetura de Computadores: Processos e Threads
Arquitetura de Computadores: Processos e ThreadsArquitetura de Computadores: Processos e Threads
Arquitetura de Computadores: Processos e Threads
 
Processos e threads cap 02 (i unidade)
Processos e threads   cap 02 (i unidade)Processos e threads   cap 02 (i unidade)
Processos e threads cap 02 (i unidade)
 
Processos threads senai
Processos threads senaiProcessos threads senai
Processos threads senai
 
Dhcp com controle_ip_compartilhamento
Dhcp com controle_ip_compartilhamentoDhcp com controle_ip_compartilhamento
Dhcp com controle_ip_compartilhamento
 
Redes prática - Inetd
Redes prática - InetdRedes prática - Inetd
Redes prática - Inetd
 
02 so
02 so02 so
02 so
 
Thedude
ThedudeThedude
Thedude
 
Servidor de internet (NAT, Squid, Sarg)
Servidor de internet (NAT, Squid, Sarg)Servidor de internet (NAT, Squid, Sarg)
Servidor de internet (NAT, Squid, Sarg)
 
Processos e threads
Processos e threadsProcessos e threads
Processos e threads
 
Sistemas operacionais 14
Sistemas operacionais 14Sistemas operacionais 14
Sistemas operacionais 14
 
Visão Geral: Introdução
Visão Geral: IntroduçãoVisão Geral: Introdução
Visão Geral: Introdução
 
Ferramentas para Detecção de Problemas em Redes
Ferramentas para Detecção de Problemas em RedesFerramentas para Detecção de Problemas em Redes
Ferramentas para Detecção de Problemas em Redes
 
Systemd: A nova fronteira - João Avelino Bellomo Filho
Systemd: A nova fronteira - João Avelino Bellomo FilhoSystemd: A nova fronteira - João Avelino Bellomo Filho
Systemd: A nova fronteira - João Avelino Bellomo Filho
 
Apostila 5 processos e threads
Apostila 5   processos e threadsApostila 5   processos e threads
Apostila 5 processos e threads
 
Princípios básicos da análise de malware
Princípios básicos da análise de malwarePrincípios básicos da análise de malware
Princípios básicos da análise de malware
 
Gerências de Processos: Sincronização
Gerências de Processos: SincronizaçãoGerências de Processos: Sincronização
Gerências de Processos: Sincronização
 

Destaque

Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Carlos Eduardo
 
Instalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yumInstalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yumCarlos Eduardo
 
Compartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCompartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCarlos Eduardo
 
Iptables bridging and firewalling
Iptables bridging and firewallingIptables bridging and firewalling
Iptables bridging and firewallingCarlos Eduardo
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Carlos Eduardo
 

Destaque (8)

Otimizando seu Squid
Otimizando seu SquidOtimizando seu Squid
Otimizando seu Squid
 
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
 
Instalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yumInstalando rrd tool-no-centos-5-usando-yum
Instalando rrd tool-no-centos-5-usando-yum
 
Compartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCompartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupo
 
Canivete shell
Canivete shellCanivete shell
Canivete shell
 
Iptables bridging and firewalling
Iptables bridging and firewallingIptables bridging and firewalling
Iptables bridging and firewalling
 
Instalação geo ip
Instalação geo ipInstalação geo ip
Instalação geo ip
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 

Semelhante a Instalando e configurando o serviço snmpd no red hat 5.3 cent_os

Configurando rede local
Configurando rede localConfigurando rede local
Configurando rede localFelipe Pereira
 
Configurando uma rede local com acesso internet
Configurando uma rede local com acesso  internetConfigurando uma rede local com acesso  internet
Configurando uma rede local com acesso internetTiago
 
Tutorial completo montando uma lan house
Tutorial completo montando uma lan houseTutorial completo montando uma lan house
Tutorial completo montando uma lan housejulioblogger
 
Nmap Avaliando Rede Em Ambiente Linux
Nmap  Avaliando Rede Em Ambiente LinuxNmap  Avaliando Rede Em Ambiente Linux
Nmap Avaliando Rede Em Ambiente Linux987123987123
 
Alta Disponibilidade na Prática utilizando servidores Linux
Alta Disponibilidade na Prática utilizando servidores LinuxAlta Disponibilidade na Prática utilizando servidores Linux
Alta Disponibilidade na Prática utilizando servidores Linuxelliando dias
 
Disciplina_Redes e Segurança de Sistemas - Mapeamento de Redes
Disciplina_Redes e Segurança de Sistemas - Mapeamento de RedesDisciplina_Redes e Segurança de Sistemas - Mapeamento de Redes
Disciplina_Redes e Segurança de Sistemas - Mapeamento de RedesRogério Almeida
 
Zabbix + SNMP: Compartilhando experiências sobre SNMP
Zabbix + SNMP: Compartilhando experiências sobre SNMPZabbix + SNMP: Compartilhando experiências sobre SNMP
Zabbix + SNMP: Compartilhando experiências sobre SNMPAndré Déo
 
Resumo comandos cisco
Resumo comandos ciscoResumo comandos cisco
Resumo comandos ciscoAllan Alencar
 
Linux4all#2
Linux4all#2Linux4all#2
Linux4all#2Daniel
 
Implantação de sistemas desegurança com linux
Implantação de sistemas desegurança com linuxImplantação de sistemas desegurança com linux
Implantação de sistemas desegurança com linuxSoftD Abreu
 
Unidade5 roteiro footprint
Unidade5 roteiro footprintUnidade5 roteiro footprint
Unidade5 roteiro footprintLeandro Almeida
 
Administração de Rede Local
Administração de Rede LocalAdministração de Rede Local
Administração de Rede Localcymbron
 
SOP M3 Apresentação 10ºAno v004.PDF
SOP M3 Apresentação 10ºAno v004.PDFSOP M3 Apresentação 10ºAno v004.PDF
SOP M3 Apresentação 10ºAno v004.PDFFChico2
 
Zabbix e SNMP - Zabbix Conference LatAm - André Déo
Zabbix e SNMP - Zabbix Conference LatAm - André DéoZabbix e SNMP - Zabbix Conference LatAm - André Déo
Zabbix e SNMP - Zabbix Conference LatAm - André DéoAndré Déo
 
Zabbix e SNMP - Zabbix Conference LatAM 2016
Zabbix e SNMP - Zabbix Conference LatAM 2016Zabbix e SNMP - Zabbix Conference LatAM 2016
Zabbix e SNMP - Zabbix Conference LatAM 2016André Déo
 
Docslide.com.br manual haxorware-11-r38-pt-br
Docslide.com.br manual haxorware-11-r38-pt-brDocslide.com.br manual haxorware-11-r38-pt-br
Docslide.com.br manual haxorware-11-r38-pt-brVagner Ferreira de Morais
 

Semelhante a Instalando e configurando o serviço snmpd no red hat 5.3 cent_os (20)

Configurando rede local
Configurando rede localConfigurando rede local
Configurando rede local
 
Configurando uma rede local com acesso internet
Configurando uma rede local com acesso  internetConfigurando uma rede local com acesso  internet
Configurando uma rede local com acesso internet
 
Tutorial completo montando uma lan house
Tutorial completo montando uma lan houseTutorial completo montando uma lan house
Tutorial completo montando uma lan house
 
Nmap Avaliando Rede Em Ambiente Linux
Nmap  Avaliando Rede Em Ambiente LinuxNmap  Avaliando Rede Em Ambiente Linux
Nmap Avaliando Rede Em Ambiente Linux
 
Alta Disponibilidade na Prática utilizando servidores Linux
Alta Disponibilidade na Prática utilizando servidores LinuxAlta Disponibilidade na Prática utilizando servidores Linux
Alta Disponibilidade na Prática utilizando servidores Linux
 
Disciplina_Redes e Segurança de Sistemas - Mapeamento de Redes
Disciplina_Redes e Segurança de Sistemas - Mapeamento de RedesDisciplina_Redes e Segurança de Sistemas - Mapeamento de Redes
Disciplina_Redes e Segurança de Sistemas - Mapeamento de Redes
 
Zabbix + SNMP: Compartilhando experiências sobre SNMP
Zabbix + SNMP: Compartilhando experiências sobre SNMPZabbix + SNMP: Compartilhando experiências sobre SNMP
Zabbix + SNMP: Compartilhando experiências sobre SNMP
 
MRTG - SNMP na Prática
MRTG - SNMP na PráticaMRTG - SNMP na Prática
MRTG - SNMP na Prática
 
Resumo comandos cisco
Resumo comandos ciscoResumo comandos cisco
Resumo comandos cisco
 
Agr aula3
Agr aula3Agr aula3
Agr aula3
 
Linux4all#2
Linux4all#2Linux4all#2
Linux4all#2
 
Manual roteador kaiomy
Manual roteador kaiomyManual roteador kaiomy
Manual roteador kaiomy
 
Implantação de sistemas desegurança com linux
Implantação de sistemas desegurança com linuxImplantação de sistemas desegurança com linux
Implantação de sistemas desegurança com linux
 
Unidade5 roteiro footprint
Unidade5 roteiro footprintUnidade5 roteiro footprint
Unidade5 roteiro footprint
 
Administração de Rede Local
Administração de Rede LocalAdministração de Rede Local
Administração de Rede Local
 
SOP M3 Apresentação 10ºAno v004.PDF
SOP M3 Apresentação 10ºAno v004.PDFSOP M3 Apresentação 10ºAno v004.PDF
SOP M3 Apresentação 10ºAno v004.PDF
 
Zabbix e SNMP - Zabbix Conference LatAm - André Déo
Zabbix e SNMP - Zabbix Conference LatAm - André DéoZabbix e SNMP - Zabbix Conference LatAm - André Déo
Zabbix e SNMP - Zabbix Conference LatAm - André Déo
 
Zabbix e SNMP - Zabbix Conference LatAM 2016
Zabbix e SNMP - Zabbix Conference LatAM 2016Zabbix e SNMP - Zabbix Conference LatAM 2016
Zabbix e SNMP - Zabbix Conference LatAM 2016
 
Introdução ao SNMP
Introdução ao SNMPIntrodução ao SNMP
Introdução ao SNMP
 
Docslide.com.br manual haxorware-11-r38-pt-br
Docslide.com.br manual haxorware-11-r38-pt-brDocslide.com.br manual haxorware-11-r38-pt-br
Docslide.com.br manual haxorware-11-r38-pt-br
 

Mais de Carlos Eduardo

Criando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCriando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCarlos Eduardo
 
Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Carlos Eduardo
 
Configuração dns memorial descritivo
Configuração dns   memorial descritivoConfiguração dns   memorial descritivo
Configuração dns memorial descritivoCarlos Eduardo
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiCarlos Eduardo
 
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Carlos Eduardo
 
Migrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseMigrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseCarlos Eduardo
 
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Carlos Eduardo
 
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36   privilege escalation exploitExploit access root to kernel 2.6.32 2.6.36   privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploitCarlos Eduardo
 
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
How to root phones or tablets running android 2.3 gingerbread    jailbreak an...How to root phones or tablets running android 2.3 gingerbread    jailbreak an...
How to root phones or tablets running android 2.3 gingerbread jailbreak an...Carlos Eduardo
 
Converting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxConverting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxCarlos Eduardo
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Carlos Eduardo
 
Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machineCarlos Eduardo
 
Como criar um repositório Ubuntu
Como criar um repositório UbuntuComo criar um repositório Ubuntu
Como criar um repositório UbuntuCarlos Eduardo
 
Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008Carlos Eduardo
 
Alterar password linux user pam autentication
Alterar password linux user   pam autenticationAlterar password linux user   pam autentication
Alterar password linux user pam autenticationCarlos Eduardo
 
Linux instalação e-conf postfix - pop3 eimap
Linux instalação e-conf postfix - pop3 eimapLinux instalação e-conf postfix - pop3 eimap
Linux instalação e-conf postfix - pop3 eimapCarlos Eduardo
 

Mais de Carlos Eduardo (20)

Criando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCriando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ Nagios
 
Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003
 
Configuração dns memorial descritivo
Configuração dns   memorial descritivoConfiguração dns   memorial descritivo
Configuração dns memorial descritivo
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wiki
 
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
 
Migrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseMigrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail database
 
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
Poppassd setup howto for rhel cent os 5 ‹‹ linux mail server setup and howto ...
 
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36   privilege escalation exploitExploit access root to kernel 2.6.32 2.6.36   privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
 
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
How to root phones or tablets running android 2.3 gingerbread    jailbreak an...How to root phones or tablets running android 2.3 gingerbread    jailbreak an...
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
 
Lsof
LsofLsof
Lsof
 
Converting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxConverting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual box
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
 
Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machine
 
Comando kvm terminal
Comando kvm terminalComando kvm terminal
Comando kvm terminal
 
Como criar um repositório Ubuntu
Como criar um repositório UbuntuComo criar um repositório Ubuntu
Como criar um repositório Ubuntu
 
Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008Backup Incremental auto - Windows Server 2008
Backup Incremental auto - Windows Server 2008
 
SSL no apache
SSL no apacheSSL no apache
SSL no apache
 
Alterar password linux user pam autentication
Alterar password linux user   pam autenticationAlterar password linux user   pam autentication
Alterar password linux user pam autentication
 
Postfix, Imap e Pop3
Postfix, Imap e Pop3Postfix, Imap e Pop3
Postfix, Imap e Pop3
 
Linux instalação e-conf postfix - pop3 eimap
Linux instalação e-conf postfix - pop3 eimapLinux instalação e-conf postfix - pop3 eimap
Linux instalação e-conf postfix - pop3 eimap
 

Instalando e configurando o serviço snmpd no red hat 5.3 cent_os

  • 1. Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran... SNMP é usado como parte de monitoramento de utilização de recursos em dispositivos ligados na rede, informa utilização de CPU, tráfego de rede, status de serviços e etc. Estou escrevendo esse artigo por que será pré-requisito na configuração e instalação do Cacti para “grafar” os recursos dos dispositivos monitorados. Pré-requisitos Instalação mínima do CentOS e RedHat 5.3 Instalação do serviço SNMPd A instalação será feita via Yum yum install net‐snmp.i386 net‐snmp‐libs.i386 net‐snmp‐utils.i386 ... Installed: net‐snmp.i386 1:5.3.2.2‐5.el5_3.2 net‐snmp‐libs.i386 1:5.3.2.2‐5.el5_3.2 net‐snmp‐utils.i386 1:5.3.2.2‐5.el5_3.2 Dependency Installed: lm_sensors.i386 0:2.10.7‐4.el5 Complete! É interessante garantir que o serviço será iniciado no boot chkconfig ‐‐levels 35 snmpd on Configurando o serviço SNMP Depois de instalado, o SNMP precisa ser configurado para responder a uma comunidade e em que modo ele irá responder. Também é interessante colocar uma descrição de quem é o responsável pelo servidor e onde está localizado o equipamento. Para iniciar a configuração, vá ao diretório /etc/snmp e apague o arquivo original que está lá ou renomeie, caso queira futuramente consultá-lo. 1 cd /etc/snmp 2 mv snmpd.conf snmpd.conf.orig Inicie o processo de configuração com o comando snmpconf, faz parte do pacote net-snmp-utils e é uma mão na roda, diga-se de passagem 1 cd /etc/snmp 2 snmpconf Uma série de questionários será apresentada. Na primeira fase I can create the following types of configuration files for you. Select the file type you wish to create: (you can create more than one as you run this program) 1: snmpd.conf 2: snmp.conf 3: snmptrapd.conf Other options: quit Select File: 1 Selecione 1 para gerar o arquivo snmpd.conf que é o responsável por colher as métricas de utilização de recursos do SO. Aqui nessa sessão da configuração tem uma pegadinha: nem sempre a ordem apresentada é a mesma, então, preste atenção na opção escolhida. The configuration information which can be put into snmpd.conf is divided into sections. Select a configuration section for snmpd.conf that you wish to create: 1: Monitor Various Aspects of the Running Host 2: Access Control Setup 3: Extending the Agent 4: Trap Destinations 5: System Information Setup 6: Agent Operating Mode Other options: finished Select section: 2 A primeira configuração é informações de acesso, então é a opção 2 “Access Control Setup” Section: Access Control Setup Description: This section defines who is allowed to talk to your running snmp agent. Select from: 1: a SNMPv3 read‐write user 1 de 4 11/8/2011 13:42
  • 2. Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran... 1: a SNMPv3 read‐write user 2: a SNMPv3 read‐only user 3: a SNMPv1/SNMPv2c read‐only access community name 4: a SNMPv1/SNMPv2c read‐write access community name Other options: finished, list Select section: 3 Permitir acesso somente leitura aos dados do servidor. Evita algumas surpresas :) Opção escolhida: 3 “SNMPv1/SNMPv2c read-only access community name” Configuring: rocommunity Description: a SNMPv1/SNMPv2c read‐only access community name arguments: community [default|hostname|network/bits] [oid] The community name to add read‐only access for: 5nMPC0mmunity Nome da comunidade, não coloque “public” por que é muito manjada, e qualquer network scanner vai testar por isso, escolha uma mais difícil, colocando números e letras maiúsculas e minúsculas, evite colocar símbolos como $, #, % etc, vai confundir e gerar problemas futuros para scripts e para o próprio Cacti. Se utilizar o Nagios então, tá perdido ;) O nome escolhido aqui foi 5nMPC0mmunity The hostname or network address to accept this community name from [RETURN for all]: Quem vai ter acesso ao serviço SNMP, se pressionar direto vai liberar pra todos que souberem o nome da comunidade, caso queira restringir a um host apenas, coloque o IP do host, se é para um rede, coloque a rede aqui no formato 192.168.0.0/24 The OID that this community should be restricted to [RETURN for no‐restriction]: Se quer permitir a visualização de apenas alguns recursos, coloque o OID do recurso aqui, no caso, vou deixar liberado para todos os recursos serem visualizados Finalizada a configuração de controle de acesso, vai voltar para a sessão própria. Como está terminado escreva finished ou apenas f para sair e voltar ao menu principal. Section: Access Control Setup Description: This section defines who is allowed to talk to your running snmp agent. Select from: 1: a SNMPv3 read‐write user 2: a SNMPv3 read‐only user 3: a SNMPv1/SNMPv2c read‐only access community name 4: a SNMPv1/SNMPv2c read‐write access community name Other options: finished, list Select section: finished Próxima fase, informar detalhes do dispositivo, como contato e localização física. The configuration information which can be put into snmpd.conf is divided into sections. Select a configuration section for snmpd.conf that you wish to create: 1: Monitor Various Aspects of the Running Host 2: Access Control Setup 3: Extending the Agent 4: Trap Destinations 5: System Information Setup 6: Agent Operating Mode Other options: finished Select section: 5 Escolha a opção 5 “System Information Setup” e pressione Section: System Information Setup Description: This section defines some of the information reported in the "system" mib group in the mibII tree. Select from: 1: The [typically physical] location of the system. 2: The contact information for the administrator 3: The proper value for the sysServices object. Other options: finished, list 2 de 4 11/8/2011 13:42
  • 3. Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran... Select section: 1 Opção escolhida 1, para informações de localização do equipamento Configuring: syslocation Description: The [typically physical] location of the system. Note that setting this value here means that when trying to perform an snmp SET operation to the sysLocation.0 variable will make the agent return the "notWritable" error code. IE, including this token in the snmpd.conf file will disable write access to the variable. arguments: location_string The location of the system: Data Center, Rack 3 Informado onde está o equipamento Data Center, Rack 3, pressione quando terminar. Voltando para a tela de configuração com informações do equipamento, selecione a opção 2 para dizer quem é o responsável Section: System Information Setup Description: This section defines some of the information reported in the "system" mib group in the mibII tree. Select from: 1: The [typically physical] location of the system. 2: The contact information for the administrator 3: The proper value for the sysServices object. Other options: finished, list Select section: 2 Configuring: syscontact Description: The contact information for the administrator Note that setting this value here means that when trying to perform an snmp SET operation to the sysContact.0 variable will make the agent return the "notWritable" error code. IE, including this token in the snmpd.conf file will disable write access to the variable. arguments: contact_string The contact information: Daniel Kühl Lima Informe alguns dados que facilitem a localização do responsável. Aqui foi informado Daniel Kühl Lima. Pressione quando terminar e voltará para a tela de configuração de informações. Section: System Information Setup Description: This section defines some of the information reported in the "system" mib group in the mibII tree. Select from: 1: The [typically physical] location of the system. 2: The contact information for the administrator 3: The proper value for the sysServices object. Other options: finished, list Select section: finished Sessão terminada, dá pra sair dessa tela e voltar ao menu principal. Escreve finished ou f para sair. Voltando para o menu principal, e como está tudo configurado como desejamos, escreva finished ou f para salvar e terminar a tarefa. The configuration information which can be put into snmpd.conf is divided into sections. Select a configuration section for snmpd.conf that you wish to create: 1: Monitor Various Aspects of the Running Host 2: Access Control Setup 3: Extending the Agent 4: Trap Destinations 5: System Information Setup 6: Agent Operating Mode Other options: finished Select section: finished I can create the following types of configuration files for you. Select the file type you wish to create: 3 de 4 11/8/2011 13:42
  • 4. Instalando e configurando o serviço SNMPd no Red Hat 5.3 / CentOS 5.3... http://www.fogonacaixadagua.com.br/2009/09/instalando-e-configuran... Select the file type you wish to create: (you can create more than one as you run this program) 1: snmpd.conf 2: snmp.conf 3: snmptrapd.conf Other options: quit Select File: quit Escreva quit para sair de vez. Iniciando o serviço SNMP Com o serviço configurado é hora de iniciar. 1 service snmpd start 1 Starting snmpd: [ OK ] Verificando o funcionamento Pra verificar se está tudo a contento, execute o comando a seguir que irá se conectar ao serviço SNMP e retornará as métricas do sistema. 1 snmpwalk ‐c 5nMPC0mmunity ‐v2c localhost SNMPv2-MIB::sysDescr.0 = STRING: Linux localhost.localdomain 2.6.30.5-fogonacaixadagua #7 SMP Fri Sep 11 11:32:29 BRT 2009 i686 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (13823) 0:02:18.23 SNMPv2-MIB::sysContact.0 = STRING: "Daniel Kühl Lima" SNMPv2-MIB::sysName.0 = STRING: localhost.localdomain SNMPv2-MIB::sysLocation.0 = STRING: "Data Center, Rack 3" SNMPv2-MIB::sysORLastChange.0 = Timeticks: (9) 0:00:00.09 ... No final do processo o arquivo /etc/snmp/snmpd.conf ficou assim: ########################################################################### # # snmpd.conf # # - created by the snmpconf configuration program # ########################################################################### # SECTION: Access Control Setup # # This section defines who is allowed to talk to your running # snmp agent. # rocommunity: a SNMPv1/SNMPv2c read-only access community name # arguments: community [default|hostname|network/bits] [oid] rocommunity 5nMPC0mmunity ########################################################################### # SECTION: System Information Setup # # This section defines some of the information reported in # the "system" mib group in the mibII tree. # syslocation: The [typically physical] location of the system. # Note that setting this value here means that when trying to # perform an snmp SET operation to the sysLocation.0 variable will make # the agent return the "notWritable" error code. IE, including # this token in the snmpd.conf file will disable write access to # the variable. # arguments: location_string syslocation "Data Center, Rack 3" # syscontact: The contact information for the administrator # Note that setting this value here means that when trying to # perform an snmp SET operation to the sysContact.0 variable will make # the agent return the "notWritable" error code. IE, including # this token in the snmpd.conf file will disable write access to # the variable. # arguments: contact_string syscontact "Daniel Kühl Lima" Pronto. 4 de 4 11/8/2011 13:42