PandoraFMS-Sin_Clasificar-NOusar COMUNIDAD. Funcionalidades Tecnología

Define agent name using an external command

abril 7, 2015

Define agent name using an external command

This post is also available in : Inglés Japonés

Today we want to introduce you a new feature of Pandora FMS available in the 5.1 SP2 version, that allows to define the agent name using an external command.

When the pandora_agent sends the data, the agent name is also sent. Now you can configure the agent name in the agent configuration file (pandora_agent.conf) like shown below:

agent_name www

In this particular case, the agent name will be www. If you haven’t previously set the agent_name, the host name which is set in the Operating System, will be automatically used.

In case of auto scaling system, fixed agent_name has a problem. By auto scaling, several server instances with the same agent name will be created by default. To solve that problem, we’ve improved an agent definition feature in pandora_agent.

Since 5.1 SP2 version of pandora_agent, it has ‘agent_name_cmd’ token. It allows to define any agent name using an external command. For example, the following information can be included:

. The instance ID of AWS

. IP address of the server

. Some individual information identifying the server

When you want to set the agent name to «host name_IP address» in the Linux agent, you’ll have to define it like below:

agent_name_cmd  LANG=C; /bin/echo -n `hostname`; /bin/echo -n «_»; /bin/echo `/s

bin/ifconfig eth0 | /bin/grep ‘inet addr’ | /usr/bin/awk ‘{print $2;}’ | /usr/bin/cut -d: -f2`



Leave a comment

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.