espec.ppgia.pucpr.br/monitor
esse link tem um esquema com mrtg que um professor fez pra monitorar
um servidor na faculdade...
entra lá e veja c interessa...
tem um tar com os arquivos q ele usou....
espero que ajude...
Versão Imprimível
espec.ppgia.pucpr.br/monitor
esse link tem um esquema com mrtg que um professor fez pra monitorar
um servidor na faculdade...
entra lá e veja c interessa...
tem um tar com os arquivos q ele usou....
espero que ajude...
Boa idéia essa sua.
Eu fiz aqui no meu mrtg, mas deu erro:
Arquivo de conf mrtg-apache.cfg:
Código :
#Tava faltando o Workdir WorkDir: /srv/www/default/html/mrtg/apache Target[httpd]: '/etc/mrtg-apache.sh' Title[httpd]:"Conexoes no Servidor WEB porta 80" MaxBytes[httpd]:100 PageTop[httpd]: <h1>Conexoes no servidor WEB</h1> Options[httpd]: growright,bits,noinfo
Arquivo mrtg-apache.sh:
Agora, o Erro:
Código :
[root@cbq mrtg]# mrtg /etc/mrtg-apache.cfg ERROR: Target[httpd][_IN_] ''/etc/mrtg-apache.sh'' evaluated to '/etc/mrtg-apache.sh' instead of a number ERROR: Target[httpd][_OUT_] ''/etc/mrtg-apache.sh'' evaluated to '/etc/mrtg-apache.sh' instead of a number WARNING: Skipping Update of httpd, inlast is not defined WARNING: Skipping Update of httpd, outlast is not defined
Detalhe:
Se eu rodar só o script com o lsof, ele mostra a contagem de conexões:
Código :
[root@cbq mrtg]# /etc/mrtg-apache.sh 2
Segundo o manual do MRTG, http://people.ee.ethz.ch/~oetiker/we...reference.html, diz que é pra usar áspa simples invertida (`).
Editei o script, mas ainda não funcionou:
Código :
[root@cbq etc]# mrtg mrtg-apache.cfg WARNING: Problem with External get '/etc/mrtg-apache.sh': Expected a Number for 'out' but nothing' ERROR: Target[httpd][_OUT_] ' $$target[0]{$mode} ' did not eval into defined data Use of uninitialized value in pattern match (m//) at /usr/bin/mrtg line 262. Use of uninitialized value in numeric lt (<) at /usr/bin/mrtg line 269. ERROR: outlast is undefined. This should not be possible
Mas se eu rodar o script, ele mostra 6 conexões:
Código :
[root@cbq etc]# /etc/mrtg-apache.sh 6
Citação:
Postado originalmente por cerealkiller
você ta no caminho certo, continua tentando, infelizmente não poço testar aqui ainda. mas eu to achando eh pq o mrtg necessita de 2 numeros.
quando vc executa o script ele so te fornece um numero, tenta coloca 2 linhas, com 2 portas diferentes, e roda o mrtg.
mas vlw ae galera, gostei de ver :)