Define agent name using an external command
This post is also available in : Spanish Japanese
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`
El equipo de redacción de Pandora FMS está formado por un conjunto de escritores y profesionales de las TI con una cosa en común: su pasión por la monitorización de sistemas informáticos.
Pandora FMS’s editorial team is made up of a group of writers and IT professionals with one thing in common: their passion for computer system monitoring.