1. Home
  2. Knowledge Base
  3. Articles (EN/ES/FR)
  4. How to ask an agent for on-demand information

How to ask an agent for on-demand information

Before the publication of version 3.2, there wasn’t any way for asking the remote Software Agent for information. You had to wait for the agent to reach its interval limit to send its information. The Windows® Agent 3.0 has a not very well known feature called “UDP Server” which allows to receive communication data from outside to ask for information and to force the agent to refresh its cycle which forces it to send the information to the Server.

In 3.2 version, we now have implemented the same feature called ‘REFRESH AGENT’ which is available under the UNIX agent as well. We also have included a ‘default’ alert template and commands, designed for easy handling. You now can setup your agents (for Windows® and UNIX) to receive orders from the Console to report the data immediately, without having to wait for it’s interval any more.

This feature is pretty simple. First, you’re required to setup your agent (Windows® or GNU/Linux) to accept outside connections on a specific UDP port, from a specific IP address (or 0.0.0.0 for anyone, option no recommended). Under Windows®, you can also define other possible things the agent can execute as a result of a remote command. Under UNIX, the only supported operation (at this time) is “REFRESH AGENT”. Clicking on it is going to result on an immediate agent execution which skips its interval.

This is an example of the UDP server settings under the 3.2 Unix software agent:

udp_server 1
udp_server_port 41122
udp_server_auth_address 0.0.0.0

You may enable the server by setting the value of 1 and disable it with 0 under the udp_server option. Setting 0.0.0.0 as source IP address will allow any IP address (option no recommended) .

Pandora FMS Server has a small script which sends the order to the agent. In our default command, its fully operational and ready to be used. This script is written in Perl which acts as a small client to communicate with the simple UDP server, embedded in the agent and sends commands passed to the command line. This is located at:

/usr/share/pandora_server/util/udp_client.pl

Pandora has a default alert action named “Restart agent”, which uses this command to send a “RESTART AGENT” order. Using this action along with a manual alert template, we can restart an agent every time we like to just clicking on it.

To know more about this, check this link:

https://pandorafms.com/manual/en/documentation/02_installation/05_configuration_agents#udp_server

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support