Nota: Este artigo foi publicado originalmente em 2013. Alguns passos, comandos ou versoes de software podem ter mudado. Consulte a documentacao atual do New Relic para as informacoes mais recentes.
Neste guia passo a passo, voce aprendera a instalar o agente de monitoramento de servidor NewRelic no Ubuntu.
Como: Instalar o agente de monitoramento de servidor NewRelic no Ubuntu
(http://www.NewRelic.com “New Relic Homepage”) e uma empresa que oferece servicos de monitoramento para todas as suas aplicacoes web. Ela tem suporte para uma ampla variedade de tecnologias, focando principalmente em aplicacoes/sites web. Para instalar o agente de monitoramento de servidor NewRelic em uma maquina Ubuntu, basta seguir estas instrucoes:
Vou guia-lo pelos passos aqui:
- Inicie uma sessao de terminal com super administrador para evitar problemas com permissoes (usar sudo em tudo e bem cansativo)
sudo bash
- Adicione a lista de distribuicao do NewRelic ao seu sistema
echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
- Obtenha a chave para os pacotes de distribuicao
wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
- Atualize a lista de pacotes disponiveis
apt-get update
- Instale o daemon mais recente de monitoramento de sistema NewRelic
apt-get install newrelic-sysmond
- Configure sua licenca de servidor para que as informacoes cheguem aos seus dashboards
nrsysmond-config --set license_key=SUA.CHAVE.DE.LICENCA.AQUI
- Configure suas opcoes. Em particular, gosto de ativar o SSL
nano /etc/newrelic/nrsysmond.cfg- ssl=true
- Inicie o daemon do agente de monitoramento de servidor NewRelic
/etc/init.d/newrelic-sysmond start
- Aproveite!
Aqui esta um exemplo do arquivo /etc/newrelic/nrsysmond.cfg com as descricoes para que voce possa ver se ha alguma opcao que deseja modificar:
New Relic Server Monitor configuration file.
Lines that begin with a # are comment lines and are ignored by the server
monitor. For those options that have command line equivalents, if the
option is specified on the command line it will over-ride any value set
in this file.
Option : license_key
Value : 40-character hexadecimal string provided by New Relic. This is
required in order for the server monitor to start.
Default: none
license_key=AQUI_VAI_SUA_CHAVE_DE_LICENCA
Option : loglevel
Value : Level of detail you want in the log file (as defined by the logfile
setting below. Valid values are (in increasing levels of verbosity):
error - show errors only
warning - show errors and warnings
info - show minimal additional information messages
verbose - show more detailed information messages
debug - show debug messages
verbosedebug - show very detailed debug messages
Default: error
loglevel=info
Option : logfile
Value : Name of the file where the server monitor will store it’s log
messages.
Default: none. However it is highly recommended you set a value for this.
logfile=/var/log/newrelic/nrsysmond.log
Option : ssl
Value : Whether or not to use the Secure Sockets Layer (SSL) for all
communication with the New Relic collector.
Default: false
ssl=true
Resumo
Voce aprendeu com sucesso a instalar o agente de monitoramento de servidor NewRelic no Ubuntu. Se encontrar algum problema, verifique os pre-requisitos e certifique-se de que seu ambiente New Relic esta configurado corretamente.