[FUG-BR] Gateway + PHP + SNMP

Gilberto Villani Brito linux em giboia.org
Quinta Julho 12 16:15:28 BRT 2007


On 12/07/07, Diego Pitombeira <pitombera at gmail.com> wrote:
> ThOLOko escreveu:
> > Nossa,, obrigado pela ajuda!!!
> >
> > Se tiver alguem q tenha alguma solução mais AGRADAVEL...              me
> > contate OK??
> >
> > Vlw abraços!!!
> >
> > Em 12/07/07, Diego Pitombeira <pitombera at gmail.com> escreveu:
> >
> >> Danilo Bedani escreveu:
> >>
> >>> Pq coisa sem sentido?
> >>>
> >>> Em 12/07/07, Diego Pitombeira <pitombera at gmail.com> escreveu:
> >>>
> >>>
> >>>> ThOLOko escreveu:
> >>>>
> >>>>
> >>>>> Seria algo assim:
> >>>>>
> >>>>> Algum comando do php resultaria: 167kbps no ip 189.14.x.y (no momento
> >>>>>
> >> da
> >>
> >>>>> consulta)
> >>>>>
> >>>>>
> >>>>> Em 12/07/07, Thiago H. Pojda <thiago.pojda at gmail.com> escreveu:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> lista de funções SNMP aceitas pelo PHP:
> >>>>>>
> >>>>>> http://php.net/snmp
> >>>>>>
> >>>>>> É isso?
> >>>>>>
> >>>>>> On 7/12/07, ThOLOko <tholoko at gmail.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> Nao queria algo pronto Thiago... tipo... desenvolvi meu sistema
> >>>>>>>
> >>>>>>>
> >>>> interno
> >>>>
> >>>>
> >>>>>> em
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> PHP... e gstaria de saber o qto o usuario esta consumindo de
> >>>>>>>
> >> banda...
> >>
> >>>>>>>
> >>>>>> com
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> alguma funcao em php + snmp... ou algo diferente... para integrar
> >>>>>>>
> >>>>>>>
> >>>> nesse
> >>>>
> >>>>
> >>>>>>> meu
> >>>>>>> sistema.,,,
> >>>>>>>
> >>>>>>>
> >>>>>>> Abraços! -
> >>>>>>>
> >>>>>>>
> >>>>>>> Em 12/07/07, Diego Pitombeira <pitombera at gmail.com> escreveu:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> ThOLOko escreveu:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> Mto complicado???
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Em 12/07/07, Márcio Luciano Donada <mdonada at auroraalimentos.com.br
> >>>>>>>>>
> >>>>>>>>> escreveu:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
> >>>>>>>>>> Hash: SHA1
> >>>>>>>>>>
> >>>>>>>>>> ThOLOko escreveu:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>> Fala GalerinhaBSD...
> >>>>>>>>>>>
> >>>>>>>>>>> EH o seguinte... consigo de alguma forma pegar o trafico de
> >>>>>>>>>>>
> >> banda
> >>
> >>>>>>>>>>> que estah passando no momento saindo do gateway, de um
> >>>>>>>>>>>
> >> determinado
> >>
> >>>>>>>>>>> IP com agum script em PHP + SNMP???
> >>>>>>>>>>>
> >>>>>>>>>>> Abraços!
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>> Sim!
> >>>>>>>>>>
> >>>>>>>>>> -----BEGIN PGP SIGNATURE-----
> >>>>>>>>>> Version: GnuPG v1.4.5 (MingW32)
> >>>>>>>>>>
> >>>>>>>>>> iD8DBQFGlnJxbjyCr4Ixg0wRArV3AJ4yvhnr/nVlQnoHTc14111BnT9PhQCfWsgJ
> >>>>>>>>>> FkQWWOkxn79nieV4fze/fqY=
> >>>>>>>>>> =gcnj
> >>>>>>>>>> -----END PGP SIGNATURE-----
> >>>>>>>>>>
> >>>>>>>>>> -------------------------
> >>>>>>>>>> Histórico: http://www.fug.com.br/historico/html/freebsd/
> >>>>>>>>>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>> pq não tentam ser mais objetivos?
> >>>>>>>>
> >>>>>>>> []'s
> >>>>>>>> -------------------------
> >>>>>>>> Histórico: http://www.fug.com.br/historico/html/freebsd/
> >>>>>>>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> --
> >>>>>>> ThOLOko
> >>>>>>> -FreeBSD-
> >>>>>>> UniX TeaM
> >>>>>>> -------------------------
> >>>>>>> Histórico: http://www.fug.com.br/historico/html/freebsd/
> >>>>>>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> --
> >>>>>> Thiago Henrique Pojda
> >>>>>> Curitiba - PR - Brasil
> >>>>>> +55 41 99239019
> >>>>>> -------------------------
> >>>>>> Histórico: http://www.fug.com.br/historico/html/freebsd/
> >>>>>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>> kra .. leu a doc? vc vai ter q aprender a fz consultas no snmp @_@
> >>>>
> >>>> jogue duro em seu script ai, coisa mais sem sentido.
> >>>>
> >>>>
> >>>> []'s
> >>>> -------------------------
> >>>> Histórico: http://www.fug.com.br/historico/html/freebsd/
> >>>> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >> O caminho das pedras já foi passado. Sugeriram o cacti, passaram o link
> >> da doc do php+snmp.
> >>
> >> []'s
> >> -------------------------
> >> Histórico: http://www.fug.com.br/historico/html/freebsd/
> >> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
> >>
> >>
> >
> >
> >
> >
> Dei uma pesquisada rápida e achei isso.
>
> "SNMP só conta tráfego por interface, independente de protocolo, IP, porta,
> etc.
>
> []'s Erwin"
> http://www.fug.com.br/historico/html/freebsd/2002-09/msg01371.html
>
> Bem antigo o post ... se ele ainda estiver correto, o snmp não resolverá seu problema.
>
> []'s
>
>
> -------------------------
> Histórico: http://www.fug.com.br/historico/html/freebsd/
> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
>

Você pode usar PF ou ipfw para contar os bytes de cada ip + um script
que o snmpd do gw irá executar e o php no servidor web para contar
esses numeros e publicar no site.

Tenho algo assim funcionando com PF + snmpd + scripts + Cacti.
Fiz um tutorial de como instalar e configurar, se tiver interesse eu
mando, mas é para o Cacti.

Abraços
-- 
Gilberto Villani Brito
System Administrator
Londrina - PR
Brazil
gilbertovb(a)gmail.com


Mais detalhes sobre a lista de discussão freebsd